• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DeferredCommand类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



DeferredCommand类属于com.google.gwt.user.client包,在下文中一共展示了DeferredCommand类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: onInit

import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
@Override
public void onInit() {
    super.onInit();
    getTable().setResizePolicy(AbstractScrollTable.ResizePolicy.FILL_WIDTH);
    getTable().addStyleName("singleColumn");

    if (BrowserUtil.isBrowser(Browser.IE)) {
        WebEventManager.getAppEvManager().addListener(Name.WINDOW_RESIZE, new WebEventListener(){
                public void eventNotify(WebEvent ev) {
                    getTable().getDataTable().setColumnWidth(0, getTable().getDataTable().getOffsetWidth()-30);
                }
            });
        DeferredCommand.addCommand(new Command(){
            public void execute() {
                getTable().getDataTable().setColumnWidth(0, getTable().getDataTable().getOffsetWidth()-30);
            }
        });
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:20,代码来源:SingleColumnTablePanel.java


示例17: bind

import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public void bind(FormHub formHub) {
    this.formHub = formHub;
    if (formHub != null) {
        formHub.getEventManager().addListener(FormHub.FIELD_VALUE_CHANGE, new WebEventListener() {
            public void eventNotify(WebEvent ev) {
                Param p = (Param) ev.getData();
                if (p.getName().equalsIgnoreCase(fieldLink)) {
                    fieldValue = p.getValue();
                }

                setDefaultValues();
            }
        });

        DeferredCommand.addCommand(new Command() {
            public void execute() {
                fieldValue = getFormHub().getValue(fieldLink);
            }
        });
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:22,代码来源:CatalogPopupPanel.java


示例18: wcsSyncToLevel

import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public static void wcsSyncToLevel(final float primaryZoomLevel, boolean all, boolean northUp) {
    final AllPlots allPlots= AllPlots.getInstance();
    List<MiniPlotWidget> list= allPlots.getActiveGroupList(false);

    MiniPlotWidget selectedMPW= allPlots.getMiniPlotWidget();
    WebPlot selectedPlot= selectedMPW.getCurrentPlot();

    // determine the target zoom level and what the arcsec / pix it will be at that level
    float targetASpix= getArcSecPerPix(selectedPlot, primaryZoomLevel);

    for(MiniPlotWidget mpwItem : list) {
        if (all || selectedMPW==mpwItem) {
            wcsSyncToAS(selectedMPW, mpwItem, targetASpix, northUp);
        }
    }
    DeferredCommand.addCommand(new Command() {
        public void execute() {
            allPlots.fireAllPlotTasksCompleted();
        }
    });
}
 
开发者ID:lsst,项目名称:firefly,代码行数:22,代码来源:ZoomUtil.java


示例19: wcsSyncToMatch

import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
public static void wcsSyncToMatch(final MiniPlotWidget mpwPrim, final MiniPlotWidget mpw, final boolean northUp) {
    WebPlot matchPlot= mpwPrim.getCurrentPlot();
    final WebPlot plot= mpw.getCurrentPlot();
    final float targetASpix= getArcSecPerPix(matchPlot, matchPlot.getZoomFact());
    float targetZoomLevel= getZoomLevelForScale(plot, targetASpix);
    final float newZoomLevel= (Math.abs(targetZoomLevel-plot.getZoomFact())<.01) ? plot.getZoomFact() : targetZoomLevel;
    if (targetASpix!=0F) {
        DeferredCommand.addCommand(new Command() {
            public void execute() {
                if (mpw.isInit()) {
                    // we want each plot to have the same arcsec / pixel as the target level
                    // if the new level is only slightly different then use the target level
                    determineHowToMatch(newZoomLevel,mpwPrim,mpw,northUp);
                }
                else {
                    mpw.addRequestMod(WebPlotRequest.ZOOM_TYPE, ZoomType.ARCSEC_PER_SCREEN_PIX.toString());
                    mpw.addRequestMod(WebPlotRequest.ZOOM_ARCSEC_PER_SCREEN_PIX, targetASpix+"");
                }
            }
        });
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:23,代码来源:ZoomUtil.java


示例20: plotInternal

import com.google.gwt.user.client.DeferredCommand; //导入依赖的package包/类
private void plotInternal(final WebPlotRequest request,
                          final boolean addToHistory,
                          final boolean enableMods,
                          final boolean plotExpanded,
                          final boolean canCollapse,
                          final AsyncCallback<WebPlot> notify) {
    _mpw.setDefaultPlotRequest(new DefaultRequestInfo(request));
    _mpw.setStartingExpanded(plotExpanded);
    _mpw.setCanCollapse(canCollapse);
    if (plotExpanded) {
        Vis.init(_mpw,new Vis.InitComplete() {
            public void done() {
                DeferredCommand.addCommand(new Command() {
                    public void execute() {
                        doExpand(request, addToHistory, enableMods, notify);
                    }
                });
            }
        });
    }
    else {
        _mpw.initAndPlot(request,null,null,false,addToHistory,enableMods, notify);
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:25,代码来源:PlotWidgetOps.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Feed类代码示例发布时间:2022-05-21
下一篇:
Java WebResourceFactory类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap