Java Code Examples for com.google.gwt.dom.client.Element#hasChildNodes()
The following examples show how to use
com.google.gwt.dom.client.Element#hasChildNodes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SelectionMatcher.java From swellrt with Apache License 2.0 | 6 votes |
/** * Ensures the selection contains this node, if the original selection lies inside its subtree. * * @param node * @param dstParent * @param onSubtree */ public void noteSelectionInNode(ContentNode node, Element dstParent, boolean onSubtree) { if (contentStart.getContainer() == node || contentStart.equals(Point.inElement(node.getParentElement(), node))) { htmlStart = dstParent.hasChildNodes() ? afterNode(dstParent.getLastChild()) : atStart(dstParent); } if (contentEnd.getContainer() == node || contentEnd.equals(Point.inElement(node.getParentElement(), node))) { htmlEnd = dstParent.hasChildNodes() ? afterNode(dstParent.getLastChild()) : atStart(dstParent); } }
Example 2
Source File: SelectionMatcher.java From incubator-retired-wave with Apache License 2.0 | 6 votes |
/** * Ensures the selection contains this node, if the original selection lies inside its subtree. * * @param node * @param dstParent * @param onSubtree */ public void noteSelectionInNode(ContentNode node, Element dstParent, boolean onSubtree) { if (contentStart.getContainer() == node || contentStart.equals(Point.inElement(node.getParentElement(), node))) { htmlStart = dstParent.hasChildNodes() ? afterNode(dstParent.getLastChild()) : atStart(dstParent); } if (contentEnd.getContainer() == node || contentEnd.equals(Point.inElement(node.getParentElement(), node))) { htmlEnd = dstParent.hasChildNodes() ? afterNode(dstParent.getLastChild()) : atStart(dstParent); } }
Example 3
Source File: Application.java From SensorWebClient with GNU General Public License v2.0 | 6 votes |
public static void continueStartup() { // init handlers before throwing events SosDataManager.getDataManager(); new SOSController(); if (ClientUtils.isSesEnabled()) { new SesController(); } View.getView(); Element element = Document.get().getElementById("loadingWrapper"); while (element.hasChildNodes()) { element.removeChild(element.getFirstChild()); } Application.finishStartup(); }
Example 4
Source File: GroupedListBox.java From swcv with MIT License | 5 votes |
@Override public void clear() { super.clear(); // we need special handling to remove any OPTGROUP elements Element elm = getElement(); while (elm.hasChildNodes()) { elm.removeChild(elm.getFirstChild()); } }