本文整理汇总了Java中org.eclipse.swt.browser.Browser.addLocationListener方法的典型用法代码示例。如果您正苦于以下问题:Java Browser.addLocationListener方法的具体用法?Java Browser.addLocationListener怎么用?Java Browser.addLocationListener使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.browser.Browser
的用法示例。
在下文中一共展示了Browser.addLocationListener方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createUI_10_SearchInternal
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
private void createUI_10_SearchInternal(final Composite parent) {
try {
_browser = new Browser(parent, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).applyTo(_browser);
} catch (final SWTError e) {
StatusUtil.showStatus("Could not instantiate Browser: " + e.getMessage(), e);//$NON-NLS-1$
return;
}
_browser.addLocationListener(new LocationAdapter() {
@Override
public void changing(final LocationEvent event) {
SearchMgr.onBrowserLocation(event);
}
});
}
示例2: createBrowserSection
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
private void createBrowserSection( Composite parent )
{
browserContainer = toolkit.createComposite( parent );
browserContainer.setLayoutData( new GridData( GridData.FILL_BOTH ) );
GridLayout layout = new GridLayout( );
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.horizontalSpacing = 0;
layout.verticalSpacing = 0;
layout.numColumns = 1;
browserContainer.setLayout( layout );
browser = new Browser( browserContainer, SWT.NONE );
browser.setLayoutData( new GridData( GridData.FILL_BOTH ) );
browser.addLocationListener( new ReportLocationListener( this ) );
sashForm.setMaximizedControl( browserContainer );
}
示例3: BrowserComposite
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
public BrowserComposite(Composite parentComposite, int flags, BrowserListener browserListener) {
super(parentComposite, flags);
setLayout(new GridLayout());
// the browser itself
browser = new Browser(this, SWT.NONE);
browser.setDragDetect(false);
// setup layout data for the browser
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
browser.setLayoutData(gridData);
browser.addLocationListener(browserListener);
browser.addProgressListener(browserListener);
browser.addMenuDetectListener(browserListener);
}
示例4: createPartControl
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent){
browser = new Browser(parent, SWT.NONE);
browser.addLocationListener(new LocationAdapter() {
@Override
public void changed(LocationEvent arg0){
String text = getText(arg0.location);
System.out.println(text);
}
});
// browser.setUrl("http://ch.oddb.org");
browser.setUrl("http://santesuisse.oddb.org/");
}
示例5: createPartControl
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
try {
browser = new Browser(parent, SWT.NONE);
browser.setText(EsbStartingHelper.getHelper().getHtmlContent());
browser.addLocationListener(new BrowserDynamicPartLocationListener());
} catch (IOException e) {
ExceptionHandler.process(e);
} catch (Throwable t) {
Exception ex = new Exception("The internal web browser can not be access,the starting page won't be displayed");
ExceptionHandler.process(ex);
}
}
示例6: createPartControl
import org.eclipse.swt.browser.Browser; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent){
browser = new Browser(parent, SWT.NONE);
browser.addLocationListener(new LocationAdapter() {
@Override
public void changed(LocationEvent arg0){
String text = browser.getText();
// System.out.println(text);
}
});
browser.setUrl("http://www.compendium.ch/search/de"); //$NON-NLS-1$
}