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


Java DeferredCommand类代码示例

本文整理汇总了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();
    }
  });
}
 
开发者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: 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

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

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

示例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();

}
 
开发者ID:lsst,项目名称:firefly,代码行数:26,代码来源:DataViewerPreview.java

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

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

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

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

示例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(); }
                });
            }
        });
    }

}
 
开发者ID:lsst,项目名称:firefly,代码行数:21,代码来源:PopoutWidget.java

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


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