/** * 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); }
@Override public int size() { return n.getChildCount(); } };
/** * 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); }
private void removePlaceholders() { if (imageContainer.getChildCount() > 0) { while (imageContainer.getLastChild().getChildCount() == 0) { clearThumbnail((Element) imageContainer.getLastChild()); } } }
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); } }
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); } }
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); } }
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); } } }