From 523cfe8f03b47eb57d09eba7390e82723bb777f8 Mon Sep 17 00:00:00 2001 From: Carolyn MacLeod Date: Fri, 11 May 2012 13:50:12 -0400 Subject: Bug 375980 - ControlExample should support Browser#addAuthenticationListener(..) --- .../src/org/eclipse/swt/examples/controlexample/BrowserTab.java | 9 ++++++++- .../src/org/eclipse/swt/examples/controlexample/Tab.java | 3 +-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java index 7705dfc080..4dee5fd91b 100644 --- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java +++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -272,6 +272,13 @@ class BrowserTab extends Tab { */ void hookCustomListener (final String eventName) { if (browser == null) return; + if (eventName == "AuthenticationListener") { + browser.addAuthenticationListener(new AuthenticationListener () { + public void authenticate(AuthenticationEvent event) { + log (eventName, event); + } + }); + } if (eventName == "CloseWindowListener") { browser.addCloseWindowListener (new CloseWindowListener () { public void close(WindowEvent event) { diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java index aa6f5edd88..01fcd21f47 100644 --- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java +++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/Tab.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2007 IBM Corporation and others. + * Copyright (c) 2000, 2012 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -784,7 +784,6 @@ abstract class Tab { final Table table = new Table (dialog, SWT.BORDER | SWT.V_SCROLL | SWT.CHECK); GridData data = new GridData(GridData.FILL_BOTH); data.verticalSpan = 3; - data.heightHint = 440; table.setLayoutData(data); for (int i = 0; i < EVENT_INFO.length; i++) { TableItem item = new TableItem (table, SWT.NONE); -- cgit