当前位置: 首页>>代码示例>>Java>>正文


Java DeferredCommand.addCommand方法代码示例

本文整理汇总了Java中com.google.gwt.user.client.DeferredCommand.addCommand方法的典型用法代码示例。如果您正苦于以下问题:Java DeferredCommand.addCommand方法的具体用法?Java DeferredCommand.addCommand怎么用?Java DeferredCommand.addCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.user.client.DeferredCommand的用法示例。


在下文中一共展示了DeferredCommand.addCommand方法的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();
    }
  });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:19,代码来源:NewYoungAndroidProjectWizard.java

示例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();
    }
  });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:19,代码来源:RemixedYoungAndroidProjectWizard.java

示例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();
    }
  });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:19,代码来源:InputTemplateUrlWizard.java

示例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);
        }
    });
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:17,代码来源:ComponentRenameWizard.java

示例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());
}
   }
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:24,代码来源:Print.java

示例6: redrawAllAsync

import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
void redrawAllAsync(final WebPlotView pv,
                        Drawer drawer,
                        boolean forceRebuild) {
        if (_dataConnect == null) {
            drawer.setData((List<DrawObj>) null);
            return;
        }

        List<DrawObj> data = _dataConnect.getData(forceRebuild, pv.getPrimaryPlot());

//        if (data == null || data.size() == 0) {
//            drawer.setData((DrawObj)null);
//        }
//        else {
            final int scrollX = pv.getScrollX();
            final int scrollY = pv.getScrollY();
            drawer.setData(data);
            updateHighlightLayer(drawer, pv);

            DeferredCommand.addCommand(new Command() {
                public void execute() {
                    pv.setScrollXY(scrollX, scrollY);
                }
            });
//        }
    }
 
开发者ID:lsst,项目名称:firefly,代码行数:27,代码来源:DrawingManager.java

示例7: 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);
      }
    }
  });
}
 
开发者ID:sanderberents,项目名称:gwtlib,代码行数:23,代码来源:Table.java

示例8: 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();
                                }
                            });
                    }
                }
            }
        });
}
 
开发者ID:lsst,项目名称:firefly,代码行数:24,代码来源:Component.java

示例9: 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());
			*/
		}
		
	});
}
 
开发者ID:luox12,项目名称:onecmdb,代码行数:21,代码来源:CIPropertyPanel.java

示例10: onPostPageInExpandedMode

import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
public void onPostPageInExpandedMode(PopoutWidget oldPopout, PopoutWidget newPopout, Dimension dim) {
    if (newPopout instanceof MiniPlotWidget) {
        final MiniPlotWidget mpwNew = (MiniPlotWidget) newPopout;
        mpwNew.getGroup().setLastPoppedOut(mpwNew);
        AllPlots.getInstance().setSelectedMPW(mpwNew, true);
        DeferredCommand.addCommand(new Command() {
            public void execute() {
                if (AllPlots.getInstance().isWCSMatch()) {
                    mpwNew.getPlotView().smartCenter();
                }
                else {
                    mpwNew.getPlotView().centerOnPoint(_pagingCenter);
                }
            }
        });
    } else {
        AllPlots.getInstance().setSelectedMPW(null, true);
        newPopout.widgetResized(dim.getWidth(), dim.getHeight());
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:ExpandBehavior.java

示例11: 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();
            }
        }
    });
}
 
开发者ID:lsst,项目名称:firefly,代码行数:18,代码来源:GwtUtil.java

示例12: redrawHighlightChangeAsync

import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
private void redrawHighlightChangeAsync(final WebPlotView pv,
                                        Drawer drawer) {
    if ((_dataConnect != null && _dataConnect.size() == 0) ||
            (_dataConnect != null && !_dataConnect.getSupportsHighlight())) {
        return;
    }

    if (_dataConnect == null) return;

    final int scrollX = pv.getScrollX();
    final int scrollY = pv.getScrollY();

    updateHighlightLayer(drawer,pv);

    DeferredCommand.addCommand(new Command() {
        public void execute() {
            pv.setScrollXY(scrollX, scrollY);
        }
    });
}
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:DrawingManager.java

示例13: 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(); }
    });
}
 
开发者ID:lsst,项目名称:firefly,代码行数:18,代码来源:CatddPanel.java

示例14: onBrowserEvent

import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
public void onBrowserEvent(Event event) {
	switch (DOM.eventGetType(event)) {
	case Event.ONCLICK:
		if (items != null && items.length > 0) {
			Element target = DOM.eventGetTarget(event);
			for (int i = 0; i < items.length; i++) {
				if (items[i].getElement()!=null){
					//	if (DOM.compare(target, items[i].getElement())) {
					if (target.getId()!=null && target.getId().equals(items[i].getElement().getId())) {
						Command command = items[i].getCommand();
						if (command != null) {
							DeferredCommand.addCommand(command);
						}
					}
				}
			}
			DOM.eventPreventDefault(event);
			return;
		}
	}
	super.onBrowserEvent(event);
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:23,代码来源:MapWidget.java

示例15: startTesting

import com.google.gwt.user.client.DeferredCommand; //导入方法依赖的package包/类
public void startTesting(final boolean validateText,final boolean validateMap,final boolean deploy,
		final ExportBookCallback callback) {
	startProgress();
	DeferredCommand.addCommand(new Command() {
		public void execute() {
			try {
				validate(validateText,validateMap,false,deploy);
			} catch (TimeoutException e) {
				//we cannot be here in client side
			}
			stopProgress();
			if (errorCount==0) {
				callback.onSuccess(null);
			} else {
				callback.onError();
			}
		}
	});
}
 
开发者ID:Antokolos,项目名称:iambookmaster,代码行数:20,代码来源:ParagraphValidator.java


注:本文中的com.google.gwt.user.client.DeferredCommand.addCommand方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。