本文整理匯總了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$
}