/** * Returns whether this node has any children. * @return Returns <code>true</code> if this node has any children, * <code>false</code> otherwise. */ public final boolean hasChildNodes() { return ot.hasChildNodes(); }
/** * Returns whether this node has any children. * @return Returns <code>true</code> if this node has any children, * <code>false</code> otherwise. */ public final boolean hasChildNodes() { return ot.hasChildNodes(); }
@Override public boolean hasChildNodes() { return node.hasChildNodes(); }
@Override public boolean hasChildNodes() { return node.hasChildNodes(); }
@PatchMethod static boolean hasChildNodes(JavaScriptObject jsObject) { Node n = jsObject.cast(); return n.hasChildNodes(); }
@PatchMethod static boolean hasChildNodes(JavaScriptObject jsObject) { Node n = jsObject.cast(); return n.hasChildNodes(); }
private boolean isRowRendered(int i, List<M> visible) { Element e = findNode(visible.get(i)).getElement(); return e != null && e.getFirstChild().hasChildNodes(); }
private boolean isRowRendered(int i, List<Node> visible) { Element e = view.getRootContainer(getNodeDescriptor(visible.get(i))); return e != null && e.getFirstChild().hasChildNodes(); }
private void getEmptyPseudo(JsNodeArray previousMatch, JsNodeArray matchingElms) { Node previous; for (int q = 0, qlen = previousMatch.size(); q < qlen; q++) { previous = previousMatch.getNode(q); if (!previous.hasChildNodes()) { matchingElms.addNode(previous); } } }
private TextAreaElement getTextAreaElement(Element element) { for (int index = 0; index < element.getChildCount(); index++) { Node child = element.getChild(index); if (child instanceof TextAreaElement) { return (TextAreaElement) child; } else if (child.hasChildNodes()) { TextAreaElement elem = getTextAreaElement(Element.as(child)); if (elem != null) { return elem; } } } return null; }
protected void cleanup(El target) { NodeList<Node> cn = target.dom.getChildNodes(); for (int i = cn.getLength() - 1; i >= 0; i--) { if (!cn.getItem(i).hasChildNodes()) { target.dom.removeChild(cn.getItem(i)); } } }
/** Improves splitter visibility. */ private void tuneSplitter(SplitLayoutPanel splitLayoutPanel) { NodeList<Node> nodes = splitLayoutPanel.getElement().getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.getItem(i); if (node.hasChildNodes()) { Element el = node.getFirstChild().cast(); String className = el.getClassName(); if (HORIZONTAL_DRAGGER_CLASS.equals(className)) { tuneVerticalSplitter(el); } else if (VERTICAL_DRAGGER_CLASS.equals(className)) { tuneHorizontalSplitter(el); } } } }
/** Improves splitter visibility. */ public void tuneSplitter(SplitLayoutPanel splitLayoutPanel) { NodeList<Node> nodes = splitLayoutPanel.getElement().getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.getItem(i); if (node.hasChildNodes()) { com.google.gwt.dom.client.Element el = node.getFirstChild().cast(); if ("gwt-SplitLayoutPanel-HDragger".equals(el.getClassName())) { tuneSplitter(el); } } } }
/** Makes splitter better. */ public void tuneSplitters() { NodeList<Node> nodes = splitPanel.getElement().getChildNodes(); boolean firstFound = false; for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.getItem(i); if (node.hasChildNodes()) { com.google.gwt.dom.client.Element el = node.getFirstChild().cast(); if ("gwt-SplitLayoutPanel-HDragger".equals(el.getClassName())) { if (!firstFound) { firstFound = true; tuneLeftSplitter(el); } else { tuneRightSplitter(el); } } else if ("gwt-SplitLayoutPanel-VDragger".equals(el.getClassName())) { tuneBottomSplitter(el); } } } }
@Override protected void onRemove(ListStore<ModelData> ds, ModelData m, int index, boolean isUpdate) { super.onRemove(ds, m, index, isUpdate); String groupField = getGroupField(); if (enableGrouping) { String id = getGroupId(grid.getId(), groupField, getGroup(m.get(groupField), m, index, cm.findColumnIndex(groupField), ds)); Element g = XDOM.getElementById(id); if (g != null && !g.getChildNodes().getItem(1).hasChildNodes()) { fly(g).removeFromParent(); removeGroupId(id); } } // apply empty text }