@Override public void clear() { final NodeList documents = documentsContainer.getChildNodes(); for (int i = 0; i < documents.getLength(); i++) { final Node document = documents.item(i); documentsContainer.removeChild(document); } }
@Override public void clear() { final NodeList children = registeredDocumentsViewContainer.getChildNodes(); for ( int i = 0; i < children.getLength(); i++ ) { registeredDocumentsViewContainer.removeChild( children.item( i ) ); } }
private void setInputCurrentFilter(final String label) { for (Element child : elementIterable(filtersInput.getChildNodes())) { if (child.getTagName().equals("INPUT")) { if (label.equals(child.getAttribute("data-filter"))) { removeCSSClass((HTMLElement) child, "hidden"); } else { addCSSClass((HTMLElement) child, "hidden"); } } } }
public void addAppLauncher(final String name, final String url, final String iconClass) { final AppLauncherItemView app = appLauncherItemViews.get(); app.setName(name); app.setIcon(isNullOrEmpty(iconClass) ? "fa-cube" : iconClass); app.setURL(url); if (leftColumn.getChildNodes().getLength() == rightColumn.getChildNodes().getLength()) { leftColumn.appendChild(app.getElement()); } else { rightColumn.appendChild(app.getElement()); } }
@EventHandler("refine-apply") public void onApplyClick(@ForEvent("click") Event e) { for (Element child : elementIterable(filtersInput.getChildNodes())) { if (child.getTagName().equals("INPUT")) { Input input = (Input) child; if (input.getClassList().contains("hidden") == false) { input.getOnkeypress().call(null); break; } } } }
@Override public void addContentSlide(IsWidget widget) { DOMUtil.removeAllChildren(mainDiv); mainDiv.appendChild(carouselDiv); Div div = (Div) Window.getDocument().createElement("div"); div.setClassName(slidesDiv.getChildNodes().getLength() == 0 ? "item active" : "item"); super.appendWidgetToElement(div, widget); slidesDiv.appendChild(div); }
@Override public void addContentSlide(IsWidget widget) { DOMUtil.removeAllChildren(mainDiv); mainDiv.appendChild(carouselDiv); Div div = (Div) Window.getDocument().createElement("div"); div.setClassName(slidesDiv.getChildNodes().getLength() == 0 ? "item active" : "item"); super.appendWidgetToElement(div, widget); slidesDiv.appendChild(div); }
@Override public void infiniteRecursionError(String cause) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName(slidesDiv.getChildNodes().getLength() == 0 ? "item active" : "item"); alertBox.setMessage(NavigationConstants.INSTANCE.navCarouselDragComponentInfiniteRecursion() + " " + cause); div.appendChild(alertBox.getElement()); slidesDiv.appendChild(div); } }
@Override public void infiniteRecursionError(String cause) { Div div = (Div) Window.getDocument().createElement("div"); div.setClassName(slidesDiv.getChildNodes().getLength() == 0 ? "item active" : "item"); alertBox.setMessage(NavigationConstants.INSTANCE.navCarouselDragComponentInfiniteRecursion() + " " + cause); div.appendChild(alertBox.getElement()); slidesDiv.appendChild(div); } }
@Override public void setProviderType(final ProviderTypePresenter.View view) { content.getClassList().remove("col-md-10"); content.getClassList().remove("col-sm-9"); content.getClassList().add("col-md-8"); content.getClassList().add("col-sm-6"); if (secondLevalNavigation.getParentElement() == null) { if (container.getChildNodes().getLength() == 2) { //was empty container.removeChild(container.getLastChild()); } container.appendChild(secondLevalNavigation); container.appendChild(content); } removeAllChildren(secondLevalNavigation); secondLevalNavigation.appendChild(view.getElement()); }
@Override public void setProviderType(final ProviderTypePresenter.View view) { content.getClassList().remove("col-md-10"); content.getClassList().remove("col-sm-9"); content.getClassList().add("col-md-8"); content.getClassList().add("col-sm-6"); if (secondLevalNavigation.getParentElement() == null) { if (container.getChildNodes().getLength() == 2) { //was empty container.removeChild(container.getLastChild()); } container.appendChild(secondLevalNavigation); container.appendChild(content); } removeAllChildren(secondLevalNavigation); secondLevalNavigation.appendChild(view.getElement()); }