本文整理汇总了Java中com.google.gwt.user.client.DeferredCommand类的典型用法代码示例。如果您正苦于以下问题:Java DeferredCommand类的具体用法?Java DeferredCommand怎么用?Java DeferredCommand使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DeferredCommand类属于com.google.gwt.user.client包,在下文中一共展示了DeferredCommand类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: show
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void show() {
super.show();
// Wizard size (having it resize between page changes is quite annoying)
int width = 340;
int height = 40;
this.center();
setPixelSize(width, height);
super.setPagePanelHeight(85);
DeferredCommand.addCommand(new Command() {
public void execute() {
projectNameTextBox.setFocus(true);
projectNameTextBox.selectAll();
}
});
}
示例2: show
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void show() {
super.show();
// Wizard size (having it resize between page changes is quite annoying)
int width = 320;
int height = 40;
this.center();
setPixelSize(width, height);
super.setPagePanelHeight(40);
DeferredCommand.addCommand(new Command() {
public void execute() {
projectNameTextBox.setFocus(true);
projectNameTextBox.selectAll();
}
});
}
示例3: show
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void show() {
super.show();
// Wizard size (having it resize between page changes is quite annoying)
int width = 500;
int height = 40;
this.center();
setPixelSize(width, height);
super.setPagePanelHeight(40);
DeferredCommand.addCommand(new Command() {
public void execute() {
urlTextBox.setFocus(true);
urlTextBox.selectAll();
}
});
}
示例4: show
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void show() {
super.show();
int width = 320;
int height = 40;
this.center();
setPixelSize(width, height);
super.setPagePanelHeight(40);
DeferredCommand.addCommand(new Command() {
public void execute() {
renameTextBox.setFocus(true);
}
});
}
示例5: it
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public static void it(String html) {
try {
buildFrame(html);
if (USE_TIMER) {
Timer timer = new Timer() {
public void run() {
printFrame();
}
};
timer.schedule(TIMER_DELAY * 1000);
} else {
DeferredCommand.addCommand(new Command() {
public void execute() {
printFrame();
}
});
}
} catch (Throwable exc) {
Window.alert(exc.getMessage());
}
}
示例6: initOptimalSize
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
protected void initOptimalSize() {
_scroll.setVisible(false);
DeferredCommand.addCommand(new Command() {
public void execute() {
Element e = _panel.getCellFormatter().getElement(0, 0);
int w = DOM.getElementPropertyInt(e, "offsetWidth");
int h = DOM.getElementPropertyInt(e, "offsetHeight");
GWT.log("Initial table size is " + w + "," + h, null);
if(w == 0 || h == 0) {
_scroll.setVisible(true); // Skip all this if it is used inside a TabPanel
} else {
w -= 2; if(w < 0) w = 0;
h -= 2; if(h < 0) h = 0;
_scroll.setSize("" + w + "px", "" + h + "px");
_scroll.setVisible(true);
w = DOM.getElementPropertyInt(e, "offsetWidth");
h = DOM.getElementPropertyInt(e, "offsetHeight");
GWT.log("Now table size is " + w + "," + h, null);
}
}
});
}
示例7: updateModel
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
private void updateModel(final ContentPanel cp, final CIModel model) {
DeferredCommand.addCommand(new Command() {
public void execute() {
localData = new CIModelCollection();
localData.addCIModel("offspring", model);
baseData = localData.copy();
redraw();
/*
cp.remove(currentGrid);
currentGrid = new CIPropertyGrid(gridModelConfig, localData);
currentGrid.setPermissions(permissions);
cp.add(currentGrid);
cp.layout();
setHeader(getParent(), "Properties for " + model.getDisplayName());
*/
}
});
}
示例8: updateAsync
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
private void updateAsync(final boolean resolveNow) {
if (_activeTask != null) _activeTask.cancel();
DeferredCommand.addCommand(new Command() {
public void execute() {
updateFeedback();
if (posFd.getInputType() == Name) {
if (resolveNow) {
triggerResolver(true);
} else {
triggerResolverWithWait();
}
}
}
});
}
示例9: onShow
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void onShow() {
_showing= true;
if (_plotDeck.getMPW()!=null) {
_plotDeck.getMPW().setActive(true);
AllPlots.getInstance().setSelectedMPW(_plotDeck.getMPW());
}
if (_plotDeck.getMPW().isInit()) {
_plotDeck.getMPW().getOps(new MiniPlotWidget.OpsAsync() {
public void ops(PlotWidgetOps widgetOps) {
final WebPlotView pv= widgetOps.getPlotView();
if (pv!=null && pv.size()>0 && pv.getPrimaryPlot()==null) {
pv.setPrimaryPlot(pv.get(0));
}
DeferredCommand.addCommand(new Command() {
public void execute() {
if (pv!=null) pv.notifyWidgetShowing();
}
});
}
});
}
super.onShow();
}
示例10: changePanel
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
private void changePanel(String list) {
_columns.clear();
vp.remove(table);
vp.remove(html);
if (panel != null && vp.getWidgetIndex(panel) >= 0) {
vp.remove(panel);
}
if (list.equalsIgnoreCase("short")) {
buildPanel(true);
} else {
buildPanel(false);
}
DeferredCommand.addCommand(new Command() {
public void execute() { onResize(); }
});
}
示例11: onLoad
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
protected void onLoad() {
super.onLoad();
getEventManager().fireEvent(new WebEvent(this, ON_LOAD));
DeferredCommand.addCommand(new Command(){
public void execute() {
if (GwtUtil.isOnDisplay(Component.this)) {
if (isInit()) {
onShow();
} else {
// due to async init, this init() could return false.
// in that case, add a listener to execute this request once it is initialized.
eventManager.addListener(ON_INIT, new WebEventListener(){
public void eventNotify(WebEvent ev) {
eventManager.removeListener(ON_INIT, this);
onShow();
}
});
}
}
}
});
}
示例12: maskAndExecute
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public static void maskAndExecute(String msg,
Widget widget,
MaskPane.MaskHint hint,
final Runnable runnable) {
final MaskPane mp = mask(msg, widget, hint);
mp.show();
DeferredCommand.addCommand(new Command() {
public void execute() {
try {
runnable.run();
} finally {
mp.hide();
}
}
});
}
示例13: setVisible
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public void setVisible(boolean visible, PopupPane.Align alignAt, int xOffset, int yOffset) {
if (_firstTime && visible) deferredBuild();
setContainerVisible(visible, alignAt, xOffset, yOffset);
if ( visible) {
final boolean first= _firstTime;
DeferredCommand.addCommand(new Command() {
public void execute() {
if (first) {
onFirstVisible();
if (_theWidget instanceof RequiresResize && !_sizeSet) {
int maxW= Math.max(_theWidget.getOffsetHeight(),_buttons.getOffsetHeight());
setDefaultContentSize(maxW, _theWidget.getOffsetHeight()+_buttons.getOffsetHeight());
}
}
onVisible();
}
});
_firstTime= false;
}
}
示例14: supportTabs
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public void supportTabs() {
if (!_supportTabs) {
_supportTabs= true;
WebEventManager.getAppEvManager().addListener(Name.CATALOG_SEARCH_IN_PROCESS,new WebEventListener() {
public void eventNotify(WebEvent ev) {
_tabPane = new TabPane();
_tabPane.setSize("100%", "100%");
_tabPane.setTabPaneName("ExpandTabView");
_tabPane.addTab(_expandRoot, "Plot", "Fits Viewer", false, true);
new NewTableEventHandler(FFToolEnv.getHub(), _tabPane);
WebEventManager.getAppEvManager().removeListener(Name.CATALOG_SEARCH_IN_PROCESS,this);
if (_expanded) _expandPopout.show();
DeferredCommand.addCommand(new Command() {
public void execute() { _tabPane.forceLayout(); }
});
}
});
}
}
示例15: onDataTableRendered
import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
protected void onDataTableRendered() {
if (getPageSize() > 200) {
// large page size: do fast rendering
if (!fillWidthPending && isAttached()
&& getResizePolicy() == ResizePolicy.FILL_WIDTH) {
fillWidthPending = true;
DeferredCommand.addCommand(new Command() {
public void execute() {
fillWidthPending = false;
fillWidth();
}
});
}
resizeTablesVertically();
fireEvent(new PageLoadEvent(getCurrentPage()));
} else {
super.onDataTableRendered();
}
}