List of usage examples for com.google.gwt.user.client DeferredCommand addPause
@Deprecated public static void addPause()
From source file:com.google.gwt.sample.feedreader.client.GwtFeedReader.java
License:Apache License
public void onModuleLoad() { // The first thing that we want to do is to get the Ajax Feed API // to download and initialize. All of the other initialization should // be deferred until the iframe kicks off Loader.init(getApiFeedKey(), new Loader.LoaderCallback() { public void onError(Throwable t) { Window.alert("Unable to initialize AJAX Feed API.\n" + t.getMessage()); t.printStackTrace();//from w w w . ja v a 2 s . c o m } public void onLoad() { onAjaxFeedLoad(); } }); // Make sure the Loader's modifications to the DOM have taken effect before // we do anything else. DeferredCommand.addPause(); DeferredCommand.addCommand(new Command() { public void execute() { initialize(); } }); }
From source file:com.google.gwt.sample.feedreader.client.WallToWallPanel.java
License:Apache License
/** * Display the panel, removing any currently-displayed panel from the screen. * If the panel is already displayed, calling this method again will produce * no result./*from ww w . j ava 2s .c om*/ */ protected void enter() { if (isAttached()) { return; } if (activePanel != null) { // Save the label to scroll to when backing into the parent panel. if (activePanel == parent) { parent.setLastSelectedLabel(getLabel()); } RootPanel.get().remove(activePanel); } activePanel = WallToWallPanel.this; RootPanel.get().add(WallToWallPanel.this, 0, 0); DeferredCommand.addPause(); DeferredCommand.addCommand(new ScrollToCommand(lastSelectedLabel)); }
From source file:com.parabay.client.ui.components.WallToWallPanel.java
License:Apache License
/** * Display the panel, removing any currently-displayed panel from the * screen. If the panel is already displayed, calling this method again will * produce no result.//from w w w .j ava 2 s . c o m */ protected void enterImpl() { if (isAttached()) { return; } if (activePanel != null) { // Save the label to scroll to when backing into the parent panel. if (activePanel == parent) { parent.setLastSelectedLabel(getLabel()); } RootPanel.get().remove(activePanel); } activePanel = WallToWallPanel.this; RootPanel.get().add(WallToWallPanel.this, 0, 0); DeferredCommand.addPause(); DeferredCommand.addCommand(new ScrollToCommand(lastSelectedLabel)); }
From source file:edu.caltech.ipac.firefly.ui.background.DownloadGroupPanel.java
private void abort() { if (_monItem.getStatus().isDone()) { _content.clear();/*from ww w . j av a 2s . c o m*/ _content.setHeight("3px"); BackgroundMonitor mon = Application.getInstance().getBackgroundMonitor(); mon.removeItem(_monItem); } else if (!_aborted && !_monItem.isDone()) { DeferredCommand.addPause(); DeferredCommand.addCommand(new Command() { public void execute() { confirmAbort(); } }); } }
From source file:edu.caltech.ipac.firefly.visualize.AllPlots.java
void hideMouseReadout() { if (FFToolEnv.isAPIMode()) { final WebMouseReadout r = (WebMouseReadout) _mouseReadout; r.hideMouseReadout();/*from w w w . ja v a2s .c om*/ DeferredCommand.addPause(); DeferredCommand.addPause(); DeferredCommand.addCommand(new Command() { public void execute() { r.hideMouseReadout(); } }); } }