/** * Sets the state of the "Example" widgets. */ @Override void setExampleWidgetState () { super.setExampleWidgetState (); webKitButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.WEBKIT) != 0); borderButton.setSelection (browser == null ? false : (browser.getStyle () & SWT.BORDER) != 0); } }
public Object getWebBrowser () { if ((browser.getStyle () & SWT.MOZILLA) == 0) return null; if (webBrowserObject != null) return webBrowserObject; try { Class clazz = Class.forName ("org.mozilla.xpcom.Mozilla"); //$NON-NLS-1$ Method method = clazz.getMethod ("getInstance", new Class[0]); //$NON-NLS-1$ Object mozilla = method.invoke (null, new Object[0]); method = clazz.getMethod ("wrapXPCOMObject", new Class[] {Long.TYPE, String.class}); //$NON-NLS-1$ webBrowserObject = method.invoke (mozilla, new Object[] {new Long (webBrowser.getAddress ()), !IsPre_4 ? nsIWebBrowser.NS_IWEBBROWSER_10_IID_STR : nsIWebBrowser.NS_IWEBBROWSER_IID_STR}); /* * The following AddRef() is needed to offset the automatic Release() that * will be performed by JavaXPCOM when webBrowserObject is finalized. */ webBrowser.AddRef (); return webBrowserObject; } catch (ClassNotFoundException e) { } catch (NoSuchMethodException e) { } catch (IllegalArgumentException e) { } catch (IllegalAccessException e) { } catch (InvocationTargetException e) { } return null; }
void handleMouseDown () { int shellStyle = browser.getShell ().getStyle (); if ((shellStyle & SWT.ON_TOP) != 0 && (((shellStyle & SWT.NO_FOCUS) == 0) || ((browser.getStyle () & SWT.NO_FOCUS) == 0))) { browser.getDisplay ().asyncExec (new Runnable () { @Override public void run () { if (browser == null || browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); } }); } }
void handleMouseDown () { int shellStyle = browser.getShell ().getStyle (); if ((shellStyle & SWT.ON_TOP) != 0 && (((shellStyle & SWT.NO_FOCUS) == 0) || ((browser.getStyle () & SWT.NO_FOCUS) == 0))) { browser.getDisplay ().asyncExec (new Runnable () { @Override public void run () { if (browser == null || browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); } }); } }
void handleMouseDown () { int shellStyle = browser.getShell ().getStyle (); if ((shellStyle & SWT.ON_TOP) != 0 && (((shellStyle & SWT.NO_FOCUS) == 0) || ((browser.getStyle () & SWT.NO_FOCUS) == 0))) { browser.getDisplay ().asyncExec (new Runnable () { @Override public void run () { if (browser == null || browser.isDisposed ()) return; ((Mozilla)browser.webBrowser).Activate (); } }); } }
@Override public Object getWebBrowser () { if ((browser.getStyle () & SWT.MOZILLA) == 0) return null; if (webBrowserObject != null) return webBrowserObject;
@Override public Object getWebBrowser () { if ((browser.getStyle () & SWT.MOZILLA) == 0) return null; if (webBrowserObject != null) return webBrowserObject;
@Override public Object getWebBrowser () { if ((browser.getStyle () & SWT.MOZILLA) == 0) return null; if (webBrowserObject != null) return webBrowserObject;
@Override public Object getWebBrowser () { if ((browser.getStyle () & SWT.MOZILLA) == 0) return null; if (webBrowserObject != null) return webBrowserObject;
final Browser localBrowser = new Browser(shell, browser.getStyle()); data = new GridData(); data.exclude = true;
final Browser localBrowser = new Browser(shell, browser.getStyle()); data = new GridData(); data.exclude = true;
final Browser localBrowser = new Browser(shell, browser.getStyle()); data = new GridData(); data.exclude = true;
style = getStyle (); webBrowser = new BrowserFactory ().createWebBrowser (style); if (webBrowser != null) {
style = getStyle (); webBrowser = new BrowserFactory ().createWebBrowser (style); if (webBrowser != null) {
style = getStyle (); webBrowser = new BrowserFactory ().createWebBrowser (style); if (webBrowser != null) {
style = getStyle (); webBrowser = new BrowserFactory ().createWebBrowser (style); if (webBrowser != null) {
style = getStyle (); webBrowser = new BrowserFactory ().createWebBrowser (style); if (webBrowser != null) {
new Shell (src.getShell(), style); shell.setLayout (new FillLayout ()); browser = new Browser (shell, src == null ? SWT.MOZILLA : src.getStyle () & SWT.MOZILLA); browser.addVisibilityWindowListener (new VisibilityWindowListener () { public void hide (WindowEvent event) { String platform = Platform.PLATFORM; boolean isMozillaNativePlatform = platform.equals ("gtk") || platform.equals ("motif"); //$NON-NLS-1$ //$NON-NLS-2$ doit = isMozillaNativePlatform || (browser.getStyle () & SWT.MOZILLA) != 0;
new Shell (src.getShell(), style); shell.setLayout (new FillLayout ()); browser = new Browser (shell, src == null ? SWT.MOZILLA : src.getStyle () & SWT.MOZILLA); browser.addVisibilityWindowListener (new VisibilityWindowListener () { @Override String platform = Platform.PLATFORM; boolean isMozillaNativePlatform = platform.equals ("gtk"); //$NON-NLS-1$ doit = isMozillaNativePlatform || (browser.getStyle () & SWT.MOZILLA) != 0;
new Shell (src.getShell(), style); shell.setLayout (new FillLayout ()); browser = new Browser (shell, src == null ? SWT.MOZILLA : src.getStyle () & SWT.MOZILLA); browser.addVisibilityWindowListener (new VisibilityWindowListener () { @Override String platform = Platform.PLATFORM; boolean isMozillaNativePlatform = platform.equals ("gtk"); //$NON-NLS-1$ doit = isMozillaNativePlatform || (browser.getStyle () & SWT.MOZILLA) != 0;