diff options
author | Christophe Cornu <ccornu> | 2004-10-12 20:28:44 +0000 |
---|---|---|
committer | Christophe Cornu <ccornu> | 2004-10-12 20:28:44 +0000 |
commit | 85a3f9e2dc43ba5ad8bca3a79a8dfea2f9e82bd8 (patch) | |
tree | 3467aae601084ab2e5cef46a7b05430bd65c2898 /examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser | |
parent | 71e4ffbe11013023eea3c43aa2229a5bfe70fa11 (diff) | |
download | eclipse.platform.swt-85a3f9e2dc43ba5ad8bca3a79a8dfea2f9e82bd8.tar.gz eclipse.platform.swt-85a3f9e2dc43ba5ad8bca3a79a8dfea2f9e82bd8.tar.xz eclipse.platform.swt-85a3f9e2dc43ba5ad8bca3a79a8dfea2f9e82bd8.zip |
*** empty log message ***
Diffstat (limited to 'examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser')
-rw-r--r-- | examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java index 58a73ee7a8..9d360a962e 100644 --- a/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java +++ b/examples/org.eclipse.swt.examples.browser.demos/src/org/eclipse/swt/examples/browser/demos/views/BrowserDemoView.java @@ -18,7 +18,7 @@ public class BrowserDemoView extends ViewPart { final static String URL = "http://www.org.eclipse.swt.examples.browser.demos.pawns/"; static String PLUGIN_PATH = BrowserDemoPlugin.PLUGIN_PATH; - static String CSS_FOLDER = "css1"; + static String CSS_FOLDER = "css2"; static String URL_CSS = PLUGIN_PATH+CSS_FOLDER+"/style.css"; static String URL_WELCOME =PLUGIN_PATH+CSS_FOLDER+"/welcome.html"; @@ -40,6 +40,7 @@ public class BrowserDemoView extends ViewPart { static Pawns ttr = null; static int[] move = new int[2]; + static Menu menu = null; public BrowserDemoView() { } @@ -50,9 +51,25 @@ public class BrowserDemoView extends ViewPart { e.printStackTrace(); return; } + + menu = new Menu(parent.getShell(), SWT.POP_UP); + MenuItem item = new MenuItem(menu, SWT.PUSH); + item.setText("End Game"); + item.addListener(SWT.Selection, new Listener() { + public void handleEvent(Event e) { + game = null; + isWhite = true; + cntWhite = 0; cntBlack = 0; + ttr = null; + browser.setUrl(URL_WELCOME); + } + }); + browser.setMenu(menu); + reversiListener = new ReversiListener(); browser.addLocationListener(reversiListener); browser.setUrl(URL_WELCOME); + } private void showMessage(String message) { |