本文整理汇总了Java中com.google.gwt.user.client.DeferredCommand.add方法的典型用法代码示例。如果您正苦于以下问题:Java DeferredCommand.add方法的具体用法?Java DeferredCommand.add怎么用?Java DeferredCommand.add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.DeferredCommand
的用法示例。
在下文中一共展示了DeferredCommand.add方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get
import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
@Override
public PuzzleServiceProxy get() {
return new RetryLocalStorageServiceProxy(service, new CallStrategy(){
@Override
public Request makeRequest(RequestBuilder builder) {
ShortyzWave.makePostRequest(builder.getUrl(), builder.getRequestData(), builder.getCallback());
return new FakeRequest();
}
}){
@Override
public Request savePuzzle(Long listingId, Puzzle puzzle, final AsyncCallback callback) {
DeferredCommand.add(new Command(){
@Override
public void execute() {
callback.onSuccess(null);
}
});
return new FakeRequest();
}
};
}
示例2: animateToManager
import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
public void animateToManager(final int startX, final int startY, final int mills) {
WebEventManager.getAppEvManager().fireEvent(new WebEvent(this,Name.BG_MANAGER_PRE_ANIMATE));
DeferredCommand.add(new Command() {
public void execute() {
if (BrowserUtil.canSupportAnimation()) {
animationIconCSS(mills,startX,startY);
}
else {
BackAnimation ani= new BackAnimation(startX,startY);
ani.run(mills);
}
}
});
}
示例3: onShow
import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
public void onShow() {
if (_expandPopout instanceof PopupContainerForStandAlone ||
_expandPopout instanceof PopupContainerForRegion) {
DeferredCommand.add(new Command() {
public void execute() {
_popoutUI.setResizeZoomEnabled(false);
MyDockLayoutPanel.this.forceLayout();
_popoutUI.setResizeZoomEnabled(true);
}
});
}
}