本文整理汇总了Java中org.eclipse.swt.browser.ProgressEvent类的典型用法代码示例。如果您正苦于以下问题:Java ProgressEvent类的具体用法?Java ProgressEvent怎么用?Java ProgressEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ProgressEvent类属于org.eclipse.swt.browser包,在下文中一共展示了ProgressEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createPartControl
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
final Composite compo = GamaToolbarFactory.createToolbars(this, parent);
browser = new Browser(compo, SWT.NONE);
browser.addProgressListener(new ProgressListener() {
@Override
public void changed(final ProgressEvent arg0) {}
@Override
public void completed(final ProgressEvent event) {
checkButtons();
}
});
parent.layout();
openInput();
}
示例2: onBrowserCompleted
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
private void onBrowserCompleted(final ProgressEvent event) {
if (_reloadedTourMarkerId == null) {
return;
}
// get local copy
final long reloadedTourMarkerId = _reloadedTourMarkerId;
/*
* This must be run async otherwise an endless loop will happen
*/
_browser.getDisplay().asyncExec(new Runnable() {
@Override
public void run() {
final String href = "location.href='" + createHtml_MarkerName(reloadedTourMarkerId) + "'"; //$NON-NLS-1$ //$NON-NLS-2$
_browser.execute(href);
}
});
_reloadedTourMarkerId = null;
}
示例3: createWidget
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@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;
}
示例4: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
public void completed(ProgressEvent e) {
super.completed(e);
ConvertigoPlugin.logDebug("=== Start fireDocumentCompletedListeners ====");
selectedElement = null;
// Signal the listeners that the document is now built...
fireDocumentCompletedListeners();
ConvertigoPlugin.logDebug("=== Stop fireDocumentCompletedListeners ====");
}
示例5: onLoadStart
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
public void onLoadStart(CefBrowser cefBrowser, int frameIdentifer) {
if (!this.m_isLoading) {
return;
}
if (this.m_ready) {
this.m_ready = false;
ProgressEvent event = new ProgressEvent(browser);
event.current = 0;
event.total = 100;
browser.notifyListeners(event);
}
}
示例6: onLoadEnd
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
public void onLoadEnd(CefBrowser cefBrowser, int frameIdentifier,
int httpStatusCode) {
if (!this.m_ready) {
ProgressEvent event = new ProgressEvent(browser);
if (!(m_isLoading)) {
event.current = 100;
event.total = 100;
m_ready = true;
browser.notifyListeners(event);
}
}
}
示例7: onBrowser_Completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
private void onBrowser_Completed(final ProgressEvent event) {
_isBrowserCompleted = true;
// a redraw MUST be done otherwise nothing is displayed
_browser.setRedraw(true);
// show already logged items
final CopyOnWriteArrayList<TourLog> importLogs = TourLogManager.getLogs();
for (final TourLog importLog : importLogs) {
addLog(importLog);
}
}
示例8: onBrowser_Completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
private void onBrowser_Completed(final ProgressEvent event) {
_isBrowserCompleted = true;
if (_isInUIStartup) {
_isInUIStartup = false;
// a redraw MUST be done otherwise nothing is displayed
_browser.setRedraw(true);
// set focus that clicking on an action works the 1st and not the 2nd time
_browser.setFocus();
// dashboard is visible, activate background task
setWatcher_On();
// make the import tiles visible otherwise they are 'hidden' after the startup
_isShowWatcherAnimation = true;
updateUI_WatcherAnimation(isWatchingOn() //
? DOM_CLASS_DEVICE_ON_ANIMATED
: DOM_CLASS_DEVICE_OFF_ANIMATED);
}
if (_isDeviceStateUpdateDelayed.getAndSet(false)) {
updateUI_DeviceState_DOM();
}
}
示例9: changed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
/**
* Handles when the progress changes
* @param ProgressEvent Progress event data
*/
public void changed(ProgressEvent event) {
if(progressBar.isDisposed()==false && event.total>0) {
if(event.total>progress.getMaximum()) {
progressBar.setMaximum(event.total);
}
if(event.current<progress.getMaximum()) {
progress.setVisible(true);
progress.setSelection(event.current);
}else {
progress.setSelection(event.current);
}
}
}
示例10: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
/**
* Handles when the progress completes
* @param ProgressEvent Progress event data
*/
public void completed(ProgressEvent event) {
progress.setVisible(false);
progress.setMaximum(1);
progress.setSelection(0);
browser.evaluate("var links=document.getElementsByTagName('a');" +
"for(var i=0;i<links.length;i++) { "+
"links[i].href='#'; "+
"}");
}
示例11: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
/** As soon as a page is completely loaded, it is possible to jump to a previously defined anchor */
public void completed(ProgressEvent event) {
String anchor = BrowserFacade.getFutureJumpAnchor();
if (!anchor.equals(UIConstants.NO_ANCHOR_DEFINED)) {
BrowserFacade.jumpToAnchor(BrowserFacade.getFutureJumpAnchor());
}
ApplicationUI.createOrRetrieveAlbumItemBrowser().execute("");
}
示例12: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
public void completed(ProgressEvent arg0) {
getCookies();
}
示例13: changed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
public void changed(final ProgressEvent event) {
for (final IBrowserProgressListener listener : new LinkedList<IBrowserProgressListener>(progressListeners)) {
listener.loadProgressChanged(event.current, event.total);
}
}
示例14: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
@Override
public void completed(final ProgressEvent event) {
for (final IBrowserProgressListener listener : new LinkedList<IBrowserProgressListener>(progressListeners)) {
listener.loadFinished();
}
}
示例15: completed
import org.eclipse.swt.browser.ProgressEvent; //导入依赖的package包/类
public void completed(ProgressEvent arg0) {
getCookies();
}
开发者ID:AcademicTorrents,项目名称:AcademicTorrents-Downloader,代码行数:4,代码来源:ExternalLoginCookieListener.java