本文整理了Java中org.eclipse.swt.browser.Browser.addOpenWindowListener()
方法的一些代码示例,展示了Browser.addOpenWindowListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.addOpenWindowListener()
方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:addOpenWindowListener
[英]Adds the listener to the collection of listeners who will be notified when a new window needs to be created.
This notification occurs when a javascript command such as window.open
gets executed by a Browser
.
[中]将侦听器添加到侦听器集合中,当需要创建新窗口时,将通知这些侦听器。
当window.open
等javascript命令被Browser
执行时,会发生此通知。
代码示例来源:origin: pentaho/pentaho-kettle
final SpoonBrowser browser = new SpoonBrowser( cTabFolder, spoon, urlString, isURL, showControls, listener );
browser.getBrowser().addOpenWindowListener( new OpenWindowListener() {
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void
addOpenWindowListener(
OpenWindowListener l )
{
browser.addOpenWindowListener(
new org.eclipse.swt.browser.OpenWindowListener(){
@Override
public void open(org.eclipse.swt.browser.WindowEvent event){
l.open( new WindowEventImpl( event ));
}
});
}
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
browser.addOpenWindowListener(new OpenWindowListener() {
public void open(WindowEvent event) {
if (statusURL != null) {
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
private void initialize(Browser browser) {
browser.addOpenWindowListener(new OpenWindowListener() {
public void open(WindowEvent event) {
if (System.currentTimeMillis() - modalRequestTime <= 1000) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
@Override
protected void createContent(Composite parent) {
fBrowser= new Browser(parent, SWT.NONE);
fBrowser.setJavascriptEnabled(false);
Display display= getShell().getDisplay();
fBrowser.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fBrowser.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
fBrowser.addProgressListener(new ProgressAdapter() {
@Override
public void completed(ProgressEvent event) {
fCompleted= true;
}
});
// Cancel opening of new windows
fBrowser.addOpenWindowListener(event -> event.required= true);
// Replace browser's built-in context menu with none
fBrowser.setMenu(new Menu(getShell(), SWT.NONE));
createTextLayout();
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
@Override
protected void createContent(Composite parent) {
fBrowser= new Browser(parent, SWT.NONE);
fBrowser.setJavascriptEnabled(false);
Display display= getShell().getDisplay();
fBrowser.setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
fBrowser.setBackground(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND));
fBrowser.addProgressListener(new ProgressAdapter() {
@Override
public void completed(ProgressEvent event) {
fCompleted= true;
}
});
fBrowser.addOpenWindowListener(new OpenWindowListener() {
@Override
public void open(WindowEvent event) {
event.required= true; // Cancel opening of new windows
}
});
// Replace browser's built-in context menu with none
fBrowser.setMenu(new Menu(getShell(), SWT.NONE));
createTextLayout();
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
final Display display = parent.getDisplay();
browser.setData("org.eclipse.swt.examples.browserexample.BrowserApplication", this);
browser.addOpenWindowListener(event -> {
Shell shell = new Shell(display);
if (icon != null) shell.setImage(icon);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
browser.addOpenWindowListener (event -> log (eventName, event));
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
fIsUsingBrowserWidget= true;
addLinkListener(fBrowser);
fBrowser.addOpenWindowListener(new OpenWindowListener() {
@Override
public void open(WindowEvent event) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
fIsUsingBrowserWidget= true;
addLinkListener(fBrowser);
fBrowser.addOpenWindowListener(new OpenWindowListener() {
@Override
public void open(WindowEvent event) {
内容来源于网络,如有侵权,请联系作者删除!