/** * Gets the number of child nodes contained within this node. * * @return the number of child nodes */ public final int getChildCount() { return getChildNodes().getLength(); }
/** * 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); }
/** * A <code>OMNodeList</code> that contains all children of this node. If * there are no children, this is a <code>OMNodeList</code> containing no * nodes. * @return A <code>OMNodeList</code> that contains all children of this node. If */ public final <T extends OMNode> OMNodeList<T> getChildNodes() { return new OMNodeList<T>(ot.getChildNodes()); }
@Override public NodeList getChildNodes() { return new NodeListWrapper(node.getChildNodes()); }
/** * A <code>OMNodeList</code> that contains all children of this node. If * there are no children, this is a <code>OMNodeList</code> containing no * nodes. * @return A <code>OMNodeList</code> that contains all children of this node. If */ public final <T extends OMNode> OMNodeList<T> getChildNodes() { return new OMNodeList<T>(ot.getChildNodes()); }
/** * Gets the number of child nodes contained within this node. * * @return the number of child nodes */ public final int getChildCount() { return getChildNodes().getLength(); }
@Override public NodeList getChildNodes() { return new NodeListWrapper(node.getChildNodes()); }
/** * Gets the number of child nodes contained within this node. * * @return the number of child nodes */ public final int getChildCount() { return getChildNodes().getLength(); }
/** * 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); }
/** * 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); }
@PatchMethod static JavaScriptObject getChildNodes(JavaScriptObject t) { Node n = t.cast(); return n.getChildNodes(); }
@PatchMethod static JavaScriptObject getChildNodes(JavaScriptObject t) { Node n = t.cast(); return n.getChildNodes(); }
/** * Removes all child nodes from the given element. */ protected void removeAllChildNodes(Node elem) { NodeList<Node> childNodes = elem.getChildNodes(); for (int i = childNodes.getLength() - 1; i >= 0; i--) { elem.removeChild(childNodes.getItem(i)); } }
protected int getGroupRowCount(Element group) { return group.getChildNodes().getItem(1).getChildNodes().getLength(); }
@PatchMethod static int getDOMCellCount(HTMLTable table, com.google.gwt.user.client.Element element, int row) { return element.getChildNodes().getItem(row).getChildNodes().getLength(); }
@PatchMethod static int getDOMCellCount(HTMLTable table, Element element, int row) { return element.getChildNodes().getItem(row).getChildNodes().getLength(); }
@PatchMethod static int getDOMCellCount(HTMLTable table, com.google.gwt.user.client.Element element, int row) { return element.getChildNodes().getItem(row).getChildNodes().getLength(); }
@PatchMethod static int getDOMCellCount(HTMLTable table, Element element, int row) { return element.getChildNodes().getItem(row).getChildNodes().getLength(); }
/** * Returns the grid's <TD> HtmlElement at the specified coordinates. * * @param row the row index in which to find the cell * @param col the column index of the cell * @return the <TD> at the specified coordinates */ public Element getCell(int row, int col) { // ROW DIV TABLE TR TD Element rowEl = getRow(row); return (Element) ((rowEl != null && rowEl.hasChildNodes()) ? rowEl.getFirstChild().getFirstChild().getFirstChild().getChildNodes().getItem(col) : null); }
private void scrollSelectedItemIntoView() { NodeList<Node> items = getSuggestionMenu().getElement().getChild(1).getChild(0).getChildNodes(); for (int i = 0; i < items.getLength(); i++) { Element element = (Element) items.getItem(i); if (((Element) element.getChild(0)).getClassName().equals("item item-selected")) { element.scrollIntoView(); break; } } } }