@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(); }
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; }
@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; }
@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 ===="); }
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); } }
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); } } }
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); } }
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(); } }
/** * 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); } } }
/** * 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='#'; "+ "}"); }
@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(""); }
@Override public void completed(ProgressEvent arg0) { getCookies(); }
@Override public void changed(final ProgressEvent event) { for (final IBrowserProgressListener listener : new LinkedList<IBrowserProgressListener>(progressListeners)) { listener.loadProgressChanged(event.current, event.total); } }
@Override public void completed(final ProgressEvent event) { for (final IBrowserProgressListener listener : new LinkedList<IBrowserProgressListener>(progressListeners)) { listener.loadFinished(); } }
public void completed(ProgressEvent arg0) { getCookies(); }
public void changed( ProgressEvent event ) { }
@Override public void changed(ProgressEvent event) { // TODO refactor }
@Override public void changed(ProgressEvent arg0) { }
public void changed(ProgressEvent arg0) { }