Java 类org.eclipse.swt.browser.OpenWindowListener 实例源码

项目:BiglyBT    文件:BrowserWrapperSWT.java   
@Override
public void
addOpenWindowListener(
    OpenWindowListener      l )
{
    browser.addOpenWindowListener( l );
}
项目:BiglyBT    文件:BrowserWrapperFake.java   
@Override
public void
addOpenWindowListener(
    OpenWindowListener      l )
{
}
项目:team-explorer-everywhere    文件:FullFeaturedBrowser.java   
public void addOpenWindowListener(final OpenWindowListener listener) {
    browser.addOpenWindowListener(listener);
}
项目:team-explorer-everywhere    文件:FullFeaturedBrowser.java   
public void removeOpenWindowListener(final OpenWindowListener listener) {
    browser.removeOpenWindowListener(listener);
}
项目:APICloud-Studio    文件:WebKitBrowser.java   
public void addOpenWindowListener(OpenWindowListener listener) {
}
项目:APICloud-Studio    文件:WebKitBrowser.java   
public void removeOpenWindowListener(OpenWindowListener listener) {
}
项目:APICloud-Studio    文件:WebKitBrowser4Mac.java   
public void addOpenWindowListener(OpenWindowListener listener) {
    super.addOpenWindowListener(listener);
}
项目:APICloud-Studio    文件:WebKitBrowser4Mac.java   
public void removeOpenWindowListener(OpenWindowListener listener) {
    super.removeOpenWindowListener(listener);
}
项目:translationstudio8    文件:BrowserTab.java   
public void hookOpenListner() {
    openLisenter = new OpenWindowListener() {
        @Override
        public void open(WindowEvent event) {
            event.required=true;
            BrowserComponent app = new BrowserComponent(false);
            event.browser = app.getBrowser();
        }
    };
    browser.addOpenWindowListener(openLisenter);

}
项目:AcademicTorrents-Downloader    文件:BrowserWrapper.java   
public void
addOpenWindowListener(
    OpenWindowListener      l )
{
    browser.addOpenWindowListener( l );
}
项目:Eclipse-Postfix-Code-Completion-Juno38    文件:JavadocView.java   
@Override
protected void internalCreatePartControl(Composite parent) {
    try {
        fBrowser= new Browser(parent, SWT.NONE);
        fBrowser.setJavascriptEnabled(false);
        fIsUsingBrowserWidget= true;
        addLinkListener(fBrowser);
        fBrowser.addOpenWindowListener(new OpenWindowListener() {
            public void open(WindowEvent event) {
                event.required= true; // Cancel opening of new windows
            }
        });

    } catch (SWTError er) {

        /* The Browser widget throws an SWTError if it fails to
         * instantiate properly. Application code should catch
         * this SWTError and disable any feature requiring the
         * Browser widget.
         * Platform requirements for the SWT Browser widget are available
         * from the SWT FAQ web site.
         */

        IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
        boolean doNotWarn= store.getBoolean(DO_NOT_WARN_PREFERENCE_KEY);
        if (WARNING_DIALOG_ENABLED) {
            if (!doNotWarn) {
                String title= InfoViewMessages.JavadocView_error_noBrowser_title;
                String message= InfoViewMessages.JavadocView_error_noBrowser_message;
                String toggleMessage= InfoViewMessages.JavadocView_error_noBrowser_doNotWarn;
                MessageDialogWithToggle dialog= MessageDialogWithToggle.openError(parent.getShell(), title, message, toggleMessage, false, null, null);
                if (dialog.getReturnCode() == Window.OK)
                    store.setValue(DO_NOT_WARN_PREFERENCE_KEY, dialog.getToggleState());
            }
        }

        fIsUsingBrowserWidget= false;
    }

    if (!fIsUsingBrowserWidget) {
        fText= new StyledText(parent, SWT.V_SCROLL | SWT.H_SCROLL);
        fText.setEditable(false);
        fPresenter= new HTMLTextPresenter(false);

        fText.addControlListener(new ControlAdapter() {
            /*
             * @see org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.swt.events.ControlEvent)
             */
            @Override
            public void controlResized(ControlEvent e) {
                doSetInput(fOriginalInput);
            }
        });
    }

    initStyleSheet();
    listenForFontChanges();
    getViewSite().setSelectionProvider(new SelectionProvider(getControl()));
}
项目:Eclipse-Postfix-Code-Completion    文件:JavadocView.java   
@Override
protected void internalCreatePartControl(Composite parent) {
    try {
        fBrowser= new Browser(parent, SWT.NONE);
        fBrowser.setJavascriptEnabled(false);
        fIsUsingBrowserWidget= true;
        addLinkListener(fBrowser);
        fBrowser.addOpenWindowListener(new OpenWindowListener() {
            public void open(WindowEvent event) {
                event.required= true; // Cancel opening of new windows
            }
        });

    } catch (SWTError er) {

        /* The Browser widget throws an SWTError if it fails to
         * instantiate properly. Application code should catch
         * this SWTError and disable any feature requiring the
         * Browser widget.
         * Platform requirements for the SWT Browser widget are available
         * from the SWT FAQ web site.
         */

        IPreferenceStore store= JavaPlugin.getDefault().getPreferenceStore();
        boolean doNotWarn= store.getBoolean(DO_NOT_WARN_PREFERENCE_KEY);
        if (WARNING_DIALOG_ENABLED) {
            if (!doNotWarn) {
                String title= InfoViewMessages.JavadocView_error_noBrowser_title;
                String message= InfoViewMessages.JavadocView_error_noBrowser_message;
                String toggleMessage= InfoViewMessages.JavadocView_error_noBrowser_doNotWarn;
                MessageDialogWithToggle dialog= MessageDialogWithToggle.openError(parent.getShell(), title, message, toggleMessage, false, null, null);
                if (dialog.getReturnCode() == Window.OK)
                    store.setValue(DO_NOT_WARN_PREFERENCE_KEY, dialog.getToggleState());
            }
        }

        fIsUsingBrowserWidget= false;
    }

    if (!fIsUsingBrowserWidget) {
        fText= new StyledText(parent, SWT.V_SCROLL | SWT.H_SCROLL);
        fText.setEditable(false);
        fPresenter= new HTMLTextPresenter(false);

        fText.addControlListener(new ControlAdapter() {
            /*
             * @see org.eclipse.swt.events.ControlAdapter#controlResized(org.eclipse.swt.events.ControlEvent)
             */
            @Override
            public void controlResized(ControlEvent e) {
                doSetInput(fOriginalInput);
            }
        });
    }

    initStyleSheet();
    listenForFontChanges();
    getViewSite().setSelectionProvider(new SelectionProvider(getControl()));
}