Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed2012-03-24 22:58:03 -0400
committerGrant Gayed2012-03-29 11:07:01 -0400
commit7b1329ce4559c314d7caaf6d49255a2e36ae8db9 (patch)
treee6c3caae2c69ab33a15e5d3587c8bf6f68791046 /examples
parent5b4363330acbbd4eecdd36d4c211071a9e9ed361 (diff)
downloadeclipse.platform.swt-7b1329ce4559c314d7caaf6d49255a2e36ae8db9.tar.gz
eclipse.platform.swt-7b1329ce4559c314d7caaf6d49255a2e36ae8db9.tar.xz
eclipse.platform.swt-7b1329ce4559c314d7caaf6d49255a2e36ae8db9.zip
initial
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java8
-rw-r--r--examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java9
2 files changed, 14 insertions, 3 deletions
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java
index 3c4023d3c4..64729df4f3 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet128.java
@@ -19,12 +19,18 @@ package org.eclipse.swt.snippets;
* @since 3.0
*/
import org.eclipse.swt.*;
+import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.browser.*;
public class Snippet128 {
public static void main(String [] args) {
+ Device.DEBUG = true;
+ System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-10\\xulrunner\\");
+// System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-10\\mozilla-release\\obj-i686-pc-mingw32\\dist\\bin\\");
+// System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-3.6.23\\xulrunner\\");
+
Display display = new Display();
final Shell shell = new Shell(display);
GridLayout gridLayout = new GridLayout();
@@ -58,7 +64,7 @@ public class Snippet128 {
final Browser browser;
try {
- browser = new Browser(shell, SWT.NONE);
+ browser = new Browser(shell, SWT.MOZILLA);
} catch (SWTError e) {
System.out.println("Could not instantiate Browser: " + e.getMessage());
display.dispose();
diff --git a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java
index 5595e64860..f246a31b2f 100644
--- a/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java
+++ b/examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet307.java
@@ -20,12 +20,17 @@ package org.eclipse.swt.snippets;
*/
import org.eclipse.swt.*;
import org.eclipse.swt.browser.*;
+import org.eclipse.swt.graphics.Device;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;
public class Snippet307 {
public static void main (String [] args) {
+ Device.DEBUG = true;
+ System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-10\\xulrunner\\");
+// System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-10\\mozilla-release\\obj-i686-pc-mingw32\\dist\\bin\\");
+// System.setProperty("org.eclipse.swt.browser.XULRunnerPath","C:\\xulrunner-3.6.23\\xulrunner\\");
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout (new FillLayout ());
@@ -33,17 +38,17 @@ public static void main (String [] args) {
final Browser browser;
try {
- browser = new Browser (shell, SWT.NONE);
+ browser = new Browser (shell, SWT.MOZILLA);
} catch (SWTError e) {
System.out.println ("Could not instantiate Browser: " + e.getMessage ());
display.dispose();
return;
}
browser.setText (createHTML ());
- final BrowserFunction function = new CustomFunction (browser, "theJavaFunction");
browser.addProgressListener (new ProgressAdapter () {
public void completed (ProgressEvent event) {
+ final BrowserFunction function = new CustomFunction (browser, "theJavaFunction");
browser.addLocationListener (new LocationAdapter () {
public void changed (LocationEvent event) {
browser.removeLocationListener (this);

Back to the top