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

Java StackPanel类代码示例

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

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



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

示例1: getIndexToInsertStack

import com.google.gwt.user.client.ui.StackPanel; //导入依赖的package包/类
private int getIndexToInsertStack(StackPanel stackPanel) {
	int indexToInsert = getStackIndex();
	if(stackPanel.getWidgetCount() <= 0) {
		indexToInsert = 0 ;
	} else if(stackPanel.getWidgetCount() < indexToInsert) {
		indexToInsert = stackPanel.getWidgetCount();
	} else {
		for (int i = 0; i < stackPanel.getWidgetCount(); i++) {
			if(stackPanel.getWidget(i) instanceof QStack) {
				QStack stack = (QStack) stackPanel.getWidget(i);
				if(stack.getStackIndex() > indexToInsert) {
					indexToInsert = i;
					break;
				}
			}
		}
	}
	
	return indexToInsert;
}
 
开发者ID:qafedev,项目名称:qafe-platform,代码行数:21,代码来源:QStack.java


示例2: testPanels

import com.google.gwt.user.client.ui.StackPanel; //导入依赖的package包/类
@Test
public void testPanels() throws Exception {
  invokeAllAccessibleMethods(new AbsolutePanel() {});
  invokeAllAccessibleMethods(new CellPanel() {});
  invokeAllAccessibleMethods(new ComplexPanel() {});
  invokeAllAccessibleMethods(new DeckLayoutPanel() {});
  invokeAllAccessibleMethods(new DeckPanel() {});
  invokeAllAccessibleMethods(new DecoratorPanel() {});
  invokeAllAccessibleMethods(new DockLayoutPanel(Unit.PX) {});
  invokeAllAccessibleMethods(new DockPanel() {});
  invokeAllAccessibleMethods(new FlowPanel() {});
  invokeAllAccessibleMethods(new FocusPanel() {});
  invokeAllAccessibleMethods(new HorizontalPanel() {});
  invokeAllAccessibleMethods(new HTMLPanel("") {});
  invokeAllAccessibleMethods(new LayoutPanel() {});
  invokeAllAccessibleMethods(new PopupPanel() {});
  invokeAllAccessibleMethods(new RenderablePanel("") {});
  invokeAllAccessibleMethods(new ResizeLayoutPanel() {});
  invokeAllAccessibleMethods(new SimpleLayoutPanel() {});
  invokeAllAccessibleMethods(new SimplePanel() {});
  invokeAllAccessibleMethods(new SplitLayoutPanel() {});
  invokeAllAccessibleMethods(new StackPanel() {});
  invokeAllAccessibleMethods(new VerticalPanel() {});
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:25,代码来源:GwtMockitoWidgetBaseClassesTest.java


示例3: YoungAndroidPalettePanel

import com.google.gwt.user.client.ui.StackPanel; //导入依赖的package包/类
/**
 * Creates a new component palette panel.
 *
 * @param editor parent editor of this panel
 */
public YoungAndroidPalettePanel(YaFormEditor editor) {
  this.editor = editor;
  COMPONENT_DATABASE = SimpleComponentDatabase.getInstance(editor.getProjectId());

  stackPalette = new StackPanel();

  paletteHelpers = new HashMap<ComponentCategory, PaletteHelper>();
  // If a category has a palette helper, add it to the paletteHelpers map here.
  paletteHelpers.put(ComponentCategory.LEGOMINDSTORMS, new LegoPaletteHelper());

  categoryPanels = new HashMap<ComponentCategory, VerticalPanel>();
  simplePaletteItems = new HashMap<String, SimplePaletteItem>();

  for (ComponentCategory category : ComponentCategory.values()) {
    if (showCategory(category)) {
      VerticalPanel categoryPanel = new VerticalPanel();
      categoryPanel.setWidth("100%");
      categoryPanels.put(category, categoryPanel);
      // The production version will not include a mapping for Extension because
      // only compile-time categories are included. This allows us to i18n the
      // Extension title for the palette.
      String title = ComponentCategory.EXTENSION.equals(category) ?
        MESSAGES.extensionComponentPallette() :
        ComponentsTranslation.getCategoryName(category.getName());
      stackPalette.add(categoryPanel, title);
    }
  }

  initExtensionPanel();

  stackPalette.setWidth("100%");
  initWidget(stackPalette);
}
 
开发者ID:mit-cml,项目名称:appinventor-extensions,代码行数:39,代码来源:YoungAndroidPalettePanel.java


示例4: StackPanelExample

import com.google.gwt.user.client.ui.StackPanel; //导入依赖的package包/类
public StackPanelExample() {
  super("Stack Panel");

  StackPanel stack = new StackPanel();
  stack.add(new Button("One"), "One");
  stack.add(new Button("Two"), "Two");
  stack.add(new Button("Three"), "Three");
  stack.add(new Button("Four"), "Four");
  add(stack);
}
 
开发者ID:DavidWhitlock,项目名称:PortlandStateJava,代码行数:11,代码来源:StackPanelExample.java


示例5: getClassesToStub

import com.google.gwt.user.client.ui.StackPanel; //导入依赖的package包/类
/**
 * Returns a collection of classes whose non-abstract methods should always be replaced with
 * no-ops. By default, this list includes {@link Composite}, {@link DOM} {@link UIObject},
 * {@link Widget}, {@link Image}, and most subclasses of {@link Panel}. It will also include any
 * classes specified via the {@link WithClassesToStub} annotation on the test class. This makes
 * it much safer to test code that uses or extends these types.
 * <p>
 * This list can be customized via {@link WithClassesToStub} or by defining a new test runner
 * extending {@link GwtMockitoTestRunner} and overriding this method. This allows users to
 * explicitly stub out particular classes that are causing problems in tests. If you override this
 * method, you will probably want to retain the classes that are stubbed here by doing something
 * like this:
 *
 * <pre>
 * &#064;Override
 * protected Collection&lt;Class&lt;?&gt;&gt; getClassesToStub() {
 *   Collection&lt;Class&lt;?&gt;&gt; classes = super.getClassesToStub();
 *   classes.add(MyBaseWidget.class);
 *   return classes;
 * }
 * </pre>
 *
 * @return a collection of classes whose methods should be stubbed with no-ops while running tests
 */
protected Collection<Class<?>> getClassesToStub() {
  Collection<Class<?>> classes = new LinkedList<Class<?>>();
  classes.add(Composite.class);
  classes.add(DOM.class);
  classes.add(UIObject.class);
  classes.add(Widget.class);

  classes.add(DataGrid.class);
  classes.add(HTMLTable.class);
  classes.add(Image.class);

  classes.add(AbsolutePanel.class);
  classes.add(CellList.class);
  classes.add(CellPanel.class);
  classes.add(CellTable.class);
  classes.add(ComplexPanel.class);
  classes.add(DeckLayoutPanel.class);
  classes.add(DeckPanel.class);
  classes.add(DecoratorPanel.class);
  classes.add(DockLayoutPanel.class);
  classes.add(DockPanel.class);
  classes.add(FlowPanel.class);
  classes.add(FocusPanel.class);
  classes.add(HorizontalPanel.class);
  classes.add(HTMLPanel.class);
  classes.add(LayoutPanel.class);
  classes.add(Panel.class);
  classes.add(PopupPanel.class);
  classes.add(RenderablePanel.class);
  classes.add(ResizeLayoutPanel.class);
  classes.add(SimpleLayoutPanel.class);
  classes.add(SimplePanel.class);
  classes.add(SplitLayoutPanel.class);
  classes.add(StackPanel.class);
  classes.add(VerticalPanel.class);
  classes.add(ValueListBox.class);

  WithClassesToStub annotation = unitTestClass.getAnnotation(WithClassesToStub.class);
  if (annotation != null) {
    classes.addAll(Arrays.asList(annotation.value()));
  }

  return classes;
}
 
开发者ID:google,项目名称:gwtmockito,代码行数:69,代码来源:GwtMockitoTestRunner.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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