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

项目:Rel    文件:BrowserNative.java   
@Override
public boolean createWidget(Composite parent) {
    if (Util.isMac())
        style = new Style(-3);
    else
        style = new Style(0);
    try {
        browser = new BrowserNativeWidget(parent, SWT.BORDER);
        browser.setJavascriptEnabled(true);
        browser.addProgressListener(new ProgressAdapter() {
            @Override
            public void completed(ProgressEvent event) {
                pumpQueue();
            }
        });
    } catch (Throwable t) {
        System.out.println("BrowserNative: Native browser not available: " + t);
        return false;
    }
    clear();
    return true;
}