org.eclipse.swt.browser.Browser.getStyle()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中org.eclipse.swt.browser.Browser.getStyle()方法的一些代码示例,展示了Browser.getStyle()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.getStyle()方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:getStyle

Browser.getStyle介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

/**
   * 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);
  }
}

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

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;
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

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 ();
      }
    });
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

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 ();
      }
    });
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

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 ();
      }
    });
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

@Override
public Object getWebBrowser () {
  if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
  if (webBrowserObject != null) return webBrowserObject;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

@Override
public Object getWebBrowser () {
  if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
  if (webBrowserObject != null) return webBrowserObject;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
public Object getWebBrowser () {
  if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
  if (webBrowserObject != null) return webBrowserObject;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

@Override
public Object getWebBrowser () {
  if ((browser.getStyle () & SWT.MOZILLA) == 0) return null;
  if (webBrowserObject != null) return webBrowserObject;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

final Browser localBrowser = new Browser(shell, browser.getStyle());
data = new GridData();
data.exclude = true;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

final Browser localBrowser = new Browser(shell, browser.getStyle());
data = new GridData();
data.exclude = true;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

final Browser localBrowser = new Browser(shell, browser.getStyle());
data = new GridData();
data.exclude = true;

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

style = getStyle ();
webBrowser = new BrowserFactory ().createWebBrowser (style);
if (webBrowser != null) {

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

style = getStyle ();
webBrowser = new BrowserFactory ().createWebBrowser (style);
if (webBrowser != null) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

style = getStyle ();
webBrowser = new BrowserFactory ().createWebBrowser (style);
if (webBrowser != null) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

style = getStyle ();
webBrowser = new BrowserFactory ().createWebBrowser (style);
if (webBrowser != null) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

style = getStyle ();
webBrowser = new BrowserFactory ().createWebBrowser (style);
if (webBrowser != null) {

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

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;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

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;

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

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;

相关文章