Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/BrowserTab.java14
1 files changed, 4 insertions, 10 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 19f8477862..2f90c64ee2 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, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 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
@@ -45,7 +45,7 @@ class BrowserTab extends Tab {
Group browserGroup;
/* Style widgets added to the "Style" group */
- Button mozillaButton, webKitButton;
+ Button webKitButton;
String errorMessage, lastText, lastUrl;
@@ -89,7 +89,6 @@ class BrowserTab extends Tab {
/* Compute the widget style */
int style = getDefaultStyle();
if (borderButton.getSelection ()) style |= SWT.BORDER;
- if (mozillaButton.getSelection ()) style |= SWT.MOZILLA;
if (webKitButton.getSelection ()) style |= SWT.WEBKIT;
/* Create the example widgets */
@@ -97,13 +96,13 @@ class BrowserTab extends Tab {
browser = new Browser (browserGroup, style);
} catch (SWTError e) { // Probably missing browser
try {
- browser = new Browser (browserGroup, style & ~(SWT.MOZILLA | SWT.WEBKIT));
+ browser = new Browser (browserGroup, style & ~(SWT.WEBKIT));
} catch (SWTError e2) { // Unsupported platform
errorMessage = e.getMessage();
return;
}
MessageBox dialog = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);
- String resourceString = (style & SWT.MOZILLA) != 0 ? "MozillaNotFound" : "WebKitNotFound";
+ String resourceString = "WebKitNotFound";
dialog.setMessage(ControlExample.getResourceString(resourceString, e.getMessage()));
dialog.open();
}
@@ -167,12 +166,8 @@ class BrowserTab extends Tab {
super.createStyleGroup ();
/* Create the extra widgets */
- mozillaButton = new Button (styleGroup, SWT.CHECK);
- mozillaButton.setText ("SWT.MOZILLA");
- mozillaButton.addListener(SWT.Selection, event -> webKitButton.setSelection(false));
webKitButton = new Button (styleGroup, SWT.CHECK);
webKitButton.setText ("SWT.WEBKIT");
- webKitButton.addListener(SWT.Selection, event -> mozillaButton.setSelection(false));
borderButton = new Button (styleGroup, SWT.CHECK);
borderButton.setText ("SWT.BORDER");
}
@@ -357,7 +352,6 @@ class BrowserTab extends Tab {
@Override
void setExampleWidgetState () {
super.setExampleWidgetState ();
- mozillaButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.MOZILLA) != 0);
webKitButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.WEBKIT) != 0);
borderButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.BORDER) != 0);
}

Back to the top