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


Java WidgetCollection类代码示例

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


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

示例1: startPreview

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * Starts the preview animation with the given {@code delay} between frames.
 * Add the frames using {@link #addImage(String)} method before starting the
 * preview.
 */
public void startPreview(int delay) {
    frameTimer = new Timer() {

        private int currentFrame;

        @Override
        public void run() {
            WidgetCollection frames = getChildren();
            for (int i = 0; i < frames.size(); i++) {
                frames.get(i).setVisible(i == currentFrame);
            }
            currentFrame++;
            if (currentFrame >= frames.size()) {
                currentFrame = 0;
            }
        }
    };
    frameTimer.scheduleRepeating(delay);
}
 
开发者ID:tehapo,项目名称:webcam,代码行数:25,代码来源:GifPreviewWidget.java

示例2: getButton

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
private SelectionChoiceButton getButton() {
    WidgetCollection children = getChildren();
    // each grid element panel should contain only one child ex. button
    if (children.size() != 1) {
        throw new RuntimeException("SelectionGridElement panel contains " + children.size() + " elements when 1 was expected!");
    }
    SelectionChoiceButton button = (SelectionChoiceButton) children.get(0);
    return button;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:10,代码来源:SelectionButtonGridElementImpl.java

示例3: getLatestListBox

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * @return The latest remaining (bottom most) ListBox
 */
@Override
public UserListBox getLatestListBox() {
	UserListBox latestListBox = null;
	WidgetCollection children = this.getChildren();
	for (int index = children.size() - 1; index >= 0; index--) {
		Widget widget = children.get(index);
		if (widget instanceof UserListBox) {
			latestListBox = (UserListBox) widget;
			index = -1; // break out of for-loop
		}
	}
	return latestListBox;
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:17,代码来源:VariableSelectorImpl.java

示例4: getListBoxes

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
@Override
public Vector<UserListBox> getListBoxes() {
	Vector<UserListBox> listBoxes = new Vector<UserListBox>();
	WidgetCollection children = this.getChildren();
	for (int index = 0; index < children.size(); index++) {
		Widget widget = children.get(index);
		if (widget instanceof UserListBox) {
			listBoxes.add((UserListBox) widget);
		}
	}
	return listBoxes;
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:13,代码来源:VariableSelectorImpl.java

示例5: doLogicalClear

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
void doLogicalClear() {
	if (orphanCommand == null) {
		orphanCommand = new AttachDetachException.Command() {
			public void execute(Widget w) {
				orphan(w);
			}
		};
	}
	try {
		AttachDetachException.tryCommand(this, orphanCommand);
	} finally {
		children = new WidgetCollection(this);
	}
}
 
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:15,代码来源:ComplexContainer.java

示例6: clearAll

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
public HTMLStream clearAll()
{
	WidgetCollection childs = getChildren();
	while( childs.size() > 0 )
	{
		childs.remove( 0 );
	}
	div.setInnerHTML( "" );
	currentParagraph = null;
	curSet.clear();
	curParCurSet.clear();

	return this;
}
 
开发者ID:ltearno,项目名称:hexa.tools,代码行数:15,代码来源:HTMLStream.java

示例7: insert

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * Insert a widget before the specified widget. If the widget is already a
 * child of this panel, this method behaves as though {@link #remove(Widget)}
 * had already been called.
 *
 * @param widget the widget to be added
 * @param before the widget before which to insert the new child, or <code>null</code> to append
 */
public void insert(Widget widget, Widget before) {
  assertIsChild(before);

  // Detach new child.
  widget.removeFromParent();

  // Logical attach.
  WidgetCollection children = getChildren();
  if (before == null) {
    children.add(widget);
  } else {
    int index = children.indexOf(before);
    children.insert(widget, index);
  }

  // Physical attach.
  Layer layer = layout.attachChild(widget.getElement(), (before != null)
      ? before.getElement() : null, widget);
  setWidgetVisible(widget, layer, false);
  widget.setLayoutData(layer);

  // Adopt.
  adopt(widget);

  // Update the layout.
  animate(0);
}
 
开发者ID:kaaproject,项目名称:kaa,代码行数:36,代码来源:CustomDeckLayoutPanel.java

示例8: selectAll

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * Selects the specified collection of elements.
 *
 * @param nodes
 *            the elements
 * @return the selection
 */
public static final Selection selectAll(final WidgetCollection widgets) {
    List<Element> elements = new ArrayList<Element>();
    for (Widget widget : widgets) {
        elements.add(widget.getElement());
    }
    return selectAll(elements);
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:15,代码来源:D3.java

示例9: doLogicalClear

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
void doLogicalClear() {
    if (orphanCommand == null) {
        orphanCommand = new AttachDetachException.Command() {
            public void execute(Widget w) {
                orphan(w);
            }
        };
    }
    try {
        AttachDetachException.tryCommand(this, orphanCommand);
    } finally {
        children = new WidgetCollection(this);
    }
}
 
开发者ID:paulvi,项目名称:touch4j,代码行数:15,代码来源:ComplexContainer.java

示例10: getChildren

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
@Override
public WidgetCollection getChildren() {
  return super.getChildren();
}
 
开发者ID:jorkey,项目名称:Wiab.pro,代码行数:5,代码来源:ImplPanel.java

示例11: clear

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
@Override
public void clear() {
    super.clear();
    children = new WidgetCollection(this);
    dividerList.clear();
}
 
开发者ID:kaaproject,项目名称:avro-ui,代码行数:7,代码来源:Breadcrumbs.java

示例12: removeAllNotes

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
private void removeAllNotes() {
  final WidgetCollection kids = getChildren();
  while (kids.size() > 0) {
    remove(kids.size() - 1);
  }
}
 
开发者ID:dougkoellmer,项目名称:swarm,代码行数:7,代码来源:SurfaceView.java

示例13: getChildren

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * Gets the list of children contained in this panel.
 * 
 * @return a collection of child widgets
 */
public WidgetCollection getChildren() {
	return children;
}
 
开发者ID:ahome-it,项目名称:ahome-touch,代码行数:9,代码来源:ComplexContainer.java

示例14: getChildren

import com.google.gwt.user.client.ui.WidgetCollection; //导入依赖的package包/类
/**
 * Gets the list of children contained in this panel.
 * 
 * @return a collection of child widgets
 */
public WidgetCollection getChildren() {
    return children;
}
 
开发者ID:paulvi,项目名称:touch4j,代码行数:9,代码来源:ComplexContainer.java


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