本文整理了Java中org.eclipse.swt.browser.Browser.addLocationListener()
方法的一些代码示例,展示了Browser.addLocationListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Browser.addLocationListener()
方法的具体详情如下:
包路径:org.eclipse.swt.browser.Browser
类名称:Browser
方法名:addLocationListener
[英]Adds the listener to the collection of listeners who will be notified when the current location has changed or is about to change.
This notification typically occurs when the application navigates to a new location with #setUrl(String) or when the user activates a hyperlink.
[中]将侦听器添加到侦听器集合中,当当前位置已更改或即将更改时,将通知这些侦听器。
此通知通常在应用程序使用#setUrl(字符串)导航到新位置或用户激活超链接时发生。
代码示例来源:origin: pentaho/pentaho-kettle
public void addLocationListener( LocationListener listener ) {
browser.addLocationListener( listener );
}
代码示例来源:origin: pentaho/pentaho-kettle
private void addProgressAndLocationListener() {
ProgressListener progressListener = new ProgressListener() {
@Override
public void changed( ProgressEvent event ) {
}
@Override
public void completed( ProgressEvent event ) {
if ( fromPrint ) {
wBrowser.execute( PRINT_SCRIPT );
fromPrint = false;
}
setForwardBackEnable();
}
};
LocationListener listener = new LocationListener() {
@Override
public void changing( LocationEvent event ) {
if ( event.location.endsWith( ".pdf" ) ) {
Program.launch( event.location );
event.doit = false;
}
}
@Override
public void changed( LocationEvent event ) {
textURL.setText( event.location );
}
};
wBrowser.addProgressListener( progressListener );
wBrowser.addLocationListener( listener );
}
代码示例来源:origin: pentaho/pentaho-kettle
browser.addLocationListener( locationListener );
browser.addLocationListener( listener );
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface.text
/**
* Adds the listener to the collection of listeners who will be
* notified when the current location has changed or is about to change.
*
* @param listener the location listener
* @since 3.4
*/
public void addLocationListener(LocationListener listener) {
fBrowser.addLocationListener(listener);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface.text
/**
* Adds the listener to the collection of listeners who will be
* notified when the current location has changed or is about to change.
*
* @param listener the location listener
* @since 3.4
*/
public void addLocationListener(LocationListener listener) {
fBrowser.addLocationListener(listener);
}
代码示例来源:origin: BiglySoftware/BiglyBT
@Override
public void
addLocationListener(
LocationListener l )
{
browser.addLocationListener( l );
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
browser.addLocationListener(JavaElementLinks.createLocationListener(new JavaElementLinks.ILinkHandler() {
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
browser.addLocationListener(JavaElementLinks.createLocationListener(new JavaElementLinks.ILinkHandler() {
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
private void displayURLExternal(WindowEvent e) {
if (externalBrowser == null) {
final Shell externalShell = new Shell(shell, SWT.NONE);
externalBrowser = new Browser(externalShell, SWT.NONE);
externalBrowser.addLocationListener(new LocationAdapter() {
public void changing(final LocationEvent e) {
e.doit = false;
try {
BaseHelpSystem.getHelpBrowser(true).displayURL(e.location);
}
catch (Throwable t) {
String msg = "Error opening external Web browser"; //$NON-NLS-1$
HelpUIPlugin.logError(msg, t);
}
}
});
}
e.browser = externalBrowser;
}
public boolean isDisposed() {
代码示例来源:origin: stackoverflow.com
browser.addLocationListener(new LocationListener() {
public void changing(LocationEvent event) {
System.out.println(event);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
browser.addLocationListener (new LocationAdapter () {
@Override
public void changing (LocationEvent event) {
代码示例来源:origin: stackoverflow.com
browser.addLocationListener(new LocationListener(){
public void changed(LocationEvent e){
代码示例来源:origin: org.eclipse.recommenders.extdoc/rcp
browser.setLayoutData(new GridData(GridData.FILL_BOTH));
browser.setText(html);
browser.addLocationListener(JavaElementLinks
.createLocationListener(new JavaElementLinks.ILinkHandler() {
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
public BrowserPart(final Composite parent, FormToolkit toolkit,
final IToolBarManager tbm) {
browser = new Browser(parent, SWT.NULL);
browser.addLocationListener(new LocationListener() {
public void changing(LocationEvent event) {
if (redirectLink(event.location))
代码示例来源:origin: org.eclipse.mylyn.commons.repositories/ui
dialog.create();
dialog.getBrowser().addLocationListener(new LocationAdapter() {
@Override
public void changing(LocationEvent event) {
代码示例来源:origin: org.eclipse/org.eclipse.help.ui
event.browser = browser;
browser.addLocationListener(new LocationListener() {
public void changing(LocationEvent e) {
代码示例来源:origin: org.eclipse.mylyn.commons/workbench
browser.addLocationListener(new LocationListener() {
public void changing(LocationEvent event) {
代码示例来源:origin: org.xworker/xworker_swt
browser.addLocationListener(new LocationListener() {
代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.intro
browser.addLocationListener(urlListener);
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples
browser.addLocationListener (new LocationListener () {
@Override
public void changed(LocationEvent event) {
内容来源于网络,如有侵权,请联系作者删除!