本文整理了Java中com.google.gwt.dom.client.Node.getChildCount()
方法的一些代码示例,展示了Node.getChildCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Node.getChildCount()
方法的具体详情如下:
包路径:com.google.gwt.dom.client.Node
类名称:Node
方法名:getChildCount
[英]Gets the number of child nodes contained within this node.
[中]获取此节点中包含的子节点数。
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the child node at the given index.
*
* @param index the index of the node to be retrieved
* @return the child node at the given index
*/
public final Node getChild(int index) {
assert (index >= 0) && (index < getChildCount()) : "Child index out of bounds";
return getChildNodes().getItem(index);
}
代码示例来源:origin: JetBrains/mapper
@Override
public int size() {
return n.getChildCount();
}
};
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the child node at the given index.
*
* @param index the index of the node to be retrieved
* @return the child node at the given index
*/
public final Node getChild(int index) {
assert (index >= 0) && (index < getChildCount()) : "Child index out of bounds";
return getChildNodes().getItem(index);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the child node at the given index.
*
* @param index the index of the node to be retrieved
* @return the child node at the given index
*/
public final Node getChild(int index) {
assert (index >= 0) && (index < getChildCount()) : "Child index out of bounds";
return getChildNodes().getItem(index);
}
代码示例来源:origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets
private void removePlaceholders() {
if (imageContainer.getChildCount() > 0) {
while (imageContainer.getLastChild().getChildCount() == 0) {
clearThumbnail((Element) imageContainer.getLastChild());
}
}
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-library
private void checkAnchorPanel() {
if (anchorPanel == null) {
anchorPanel = new CustomFlowPanel(anchor);
int anchorIdx = -1;
Node parent = anchor.getParentNode();
if (parent != null && parent == getElement()) {
for (int i = 0; i < parent.getChildCount(); i++) {
if (parent.getChild(i) == anchor) {
anchorIdx = i;
break;
}
}
}
if (anchorIdx >= 0) insert(anchorPanel, anchorIdx);
else add(anchorPanel);
}
if (controlGroupRoot != null && controlGroupRoot.getParent() != anchorPanel) {
anchorPanel.add(controlGroupRoot);
}
}
代码示例来源:origin: com.sksamuel.jqm4gwt/jqm4gwt-standalone
private void checkAnchorPanel() {
if (anchorPanel == null) {
anchorPanel = new CustomFlowPanel(anchor);
int anchorIdx = -1;
Node parent = anchor.getParentNode();
if (parent != null && parent == getElement()) {
for (int i = 0; i < parent.getChildCount(); i++) {
if (parent.getChild(i) == anchor) {
anchorIdx = i;
break;
}
}
}
if (anchorIdx >= 0) insert(anchorPanel, anchorIdx);
else add(anchorPanel);
}
if (controlGroupRoot != null && controlGroupRoot.getParent() != anchorPanel) {
anchorPanel.add(controlGroupRoot);
}
}
代码示例来源:origin: jqm4gwt/jqm4gwt
private void checkAnchorPanel() {
if (anchorPanel == null) {
anchorPanel = new CustomFlowPanel(anchor);
int anchorIdx = -1;
Node parent = anchor.getParentNode();
if (parent != null && parent == getElement()) {
for (int i = 0; i < parent.getChildCount(); i++) {
if (parent.getChild(i) == anchor) {
anchorIdx = i;
break;
}
}
}
if (anchorIdx >= 0) insert(anchorPanel, anchorIdx);
else add(anchorPanel);
}
if (controlGroupRoot != null && controlGroupRoot.getParent() != anchorPanel) {
anchorPanel.add(controlGroupRoot);
}
}
代码示例来源:origin: org.geomajas.plugin/geomajas-layer-google-gwt
private void moveTosCopyRight() {
// move the ToS and copyright to the top
// create a div group in the graphics context
if (tosGroup == null) {
String graphicsId = map.getVectorContext().getId();
Element graphics = DOM.getElementById(graphicsId);
tosGroup = DOM.createDiv();
tosGroup.setId(map.getID() + "-googleAddon");
tosGroup.getStyle().setBottom(VERTICAL_MARGIN, Unit.PX);
graphics.appendChild(tosGroup);
UIObject.setVisible(tosGroup, visible);
}
String mapsId = map.getRasterContext().getId(this);
Element gmap = DOM.getElementById(mapsId);
if (gmap.getChildCount() > 0) {
Node baseMap = gmap.getChild(0);
if (baseMap.getChildCount() > 2) {
Node copyright = baseMap.getChild(1);
Node tos = baseMap.getChild(2);
tosGroup.appendChild(copyright);
tosGroup.appendChild(tos);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!