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

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

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

Browser.getShell介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

@Override
 public void close( WindowEvent event ) {
  Browser browser = (Browser) event.widget;
  Shell shell = browser.getShell();
  shell.close();
 }
} );

代码示例来源:origin: pentaho/pentaho-kettle

@Override public void close( WindowEvent event ) {
  Browser browser = (Browser) event.widget;
  Shell shell = browser.getShell();
  shell.close();
 }
} );

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public Shell
getShell()
{
  return( browser.getShell());
}

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

public void changed(TitleEvent event) {
    if (event.title != null && event.title.length() > 0) {
      Browser browser = (Browser) event.widget;
      Shell shell = browser.getShell();
      shell.setText(event.title);
    }
  }
});

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

public void close(WindowEvent event) {
    Browser browser = (Browser) event.widget;
    Shell shell = browser.getShell();
    shell.close();
  }
});

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

int SizeBrowserTo (int aCX, int aCY) {
  size = new Point (aCX, aCY);
  boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0;
  if (isChrome) {
    Shell shell = browser.getShell ();
    shell.setSize (shell.computeSize (size.x, size.y));
  }
  return XPCOM.NS_OK;
}

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

int SizeBrowserTo (int aCX, int aCY) {
  size = new Point (aCX, aCY);
  boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0;
  if (isChrome) {
    Shell shell = browser.getShell ();
    shell.setSize (shell.computeSize (size.x, size.y));
  }
  return XPCOM.NS_OK;
}

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

int SizeBrowserTo (int aCX, int aCY) {
  size = new Point (aCX, aCY);
  boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0;
  if (isChrome) {
    Shell shell = browser.getShell ();
    shell.setSize (shell.computeSize (size.x, size.y));
  }
  return XPCOM.NS_OK;
}

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

int SizeBrowserTo (int aCX, int aCY) {
  size = new Point (aCX, aCY);
  boolean isChrome = (chromeFlags & nsIWebBrowserChrome.CHROME_OPENAS_CHROME) != 0;
  if (isChrome) {
    Shell shell = browser.getShell ();
    shell.setSize (shell.computeSize (size.x, size.y));
  }
  return XPCOM.NS_OK;
}

代码示例来源:origin: openaudible/openaudible

public void setVisible(boolean b) {
    
    if (!isDisposed()) {
      browser.getShell().setVisible(b);
    }
  }
}

代码示例来源: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.swt.cocoa.macosx/x86_64

boolean webView_runBeforeUnloadConfirmPanelWithMessage_initiatedByFrame(long /*int*/ sender, long /*int*/ messageID, long /*int*/ frame) {
  NSString message = new NSString(messageID);
  StringBuffer text = new StringBuffer(Compatibility.getMessage("SWT_OnBeforeUnload_Message1")); //$NON-NLS-1$
  text.append("\n\n"); //$NON-NLS-1$
  text.append(message.getString());
  text.append("\n\n"); //$NON-NLS-1$
  text.append(Compatibility.getMessage("SWT_OnBeforeUnload_Message2")); //$NON-NLS-1$
  MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION | SWT.SHEET);
  messageBox.setMessage(text.toString());
  return messageBox.open() == SWT.OK;
}

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

int GetVisibility (long /*int*/ aVisibility) {
  boolean visible = browser.isVisible () && !browser.getShell ().getMinimized ();
  XPCOM.memmove (aVisibility, new boolean[] {visible});
  return XPCOM.NS_OK;
}

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

int GetVisibility (int /*long*/ aVisibility) {
  boolean visible = browser.isVisible () && !browser.getShell ().getMinimized ();
  XPCOM.memmove (aVisibility, new boolean[] {visible});
  return XPCOM.NS_OK;
}

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

int GetVisibility (long /*int*/ aVisibility) {
  boolean visible = browser.isVisible () && !browser.getShell ().getMinimized ();
  XPCOM.memmove (aVisibility, new boolean[] {visible});
  return XPCOM.NS_OK;
}

代码示例来源:origin: org.eclipse/org.eclipse.help.ui

public void show(WindowEvent event) {
    Browser browser = (Browser) event.widget;
    Shell shell = browser.getShell();
    if (event.location != null)
      shell.setLocation(event.location);
    if (event.size != null) {
      Point size = event.size;
      shell.setSize(shell.computeSize(size.x, size.y));
    }
    shell.open();
  }
});

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

int runOpenPanelForFileButtonWithResultListener (int /*long*/ sender, int /*long*/ resultListener) {
  Shell parent = browser.getShell ();
  FileDialog dialog = new FileDialog (parent, SWT.NONE);
  String result = dialog.open ();
  IWebOpenPanelResultListener listener = new IWebOpenPanelResultListener (resultListener);
  if (result == null) {
    listener.cancel ();
  } else {
    listener.chooseFilename (WebKit.createBSTR (result));
  }
  return COM.S_OK;
}

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

void webView_runOpenPanelForFileButtonWithResultListener(long /*int*/ sender, long /*int*/ resultListenerID) {
  FileDialog dialog = new FileDialog(browser.getShell(), SWT.NONE);
  String result = dialog.open();
  WebOpenPanelResultListener resultListener = new WebOpenPanelResultListener(resultListenerID);
  if (result == null) {
    resultListener.cancel();
    return;
  }
  resultListener.chooseFilename(NSString.stringWith(result));
}

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

int webView_runJavaScriptConfirmPanelWithMessage(long /*int*/ sender, long /*int*/ messageID) {
  NSString message = new NSString(messageID);
  String text = message.getString();

  MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.CANCEL | SWT.ICON_QUESTION);
  messageBox.setText("Javascript");	//$NON-NLS-1$
  messageBox.setMessage(text);
  return messageBox.open() == SWT.OK ? 1 : 0;
}

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

void webView_runJavaScriptAlertPanelWithMessage(long /*int*/ sender, long /*int*/ messageID) {
  NSString message = new NSString(messageID);
  String text = message.getString();

  MessageBox messageBox = new MessageBox(browser.getShell(), SWT.OK | SWT.ICON_WARNING);
  messageBox.setText("Javascript");	//$NON-NLS-1$
  messageBox.setMessage(text);
  messageBox.open();
}

相关文章