@JsOverlay public final void restoreGroup() { this.__currentElement = (Element) this.__groupStack.pop(); //Clearing canvas will make the poped group invalid, currentElement is set to the root group node. if (this.__currentElement == null) { this.__currentElement = (Element) this.__root.childNodes.item(1); } }
private static boolean isChildOfAddedNode(MutationRecord record, String attachId) { return isChildOfObservedNode(attachId, record.addedNodes.asList(), ATTACH_UID_KEY); }
private void forEachChildElement(final Element parent, final Function<Element, Boolean> consumer) { final NodeList<Element> children = getChildren(parent); for (int i = 0; i < children.length; i++) { final Element child = children.getAt(i); if (consumer.apply(child)) { forEachChildElement(child, consumer); } } }
@JsOverlay public final void restoreGroup() { this.__currentElement = (Element) this.__groupStack.pop(); //Clearing canvas will make the poped group invalid, currentElement is set to the root group node. if (this.__currentElement == null) { this.__currentElement = (Element) this.__root.childNodes.item(1); } }
private static boolean isChildOfRemovedNode(MutationRecord record, final String detachId) { return isChildOfObservedNode(detachId, record.removedNodes.asList(), DETACH_UID_KEY); }
void showLabels() { final NodeList<Element> labels = getLabels(); for (int i = 0; i < labels.length; i++) { show(labels.getAt(i)); } }
public static void closeAllMenus() { NodeList<Element> elementsByName = document.body.querySelectorAll(".dropdown"); for (int i = 0; i < elementsByName.length; i++) { HTMLElement item = Js.uncheckedCast(elementsByName.item(i)); close(item); } }
private List<Element> getElements() { return document.querySelectorAll("div[data-notify-position=" + selector + "]").asList(); }
void cleanCurrentHighlight() { final NodeList<Element> highlightedElements = querySelectorAll("." + HIGHLIGHT); for (int i = 0; i < highlightedElements.length; i++) { highlightedElements.getAt(i).classList.remove(HIGHLIGHT); } }
public static void closeAllMenus() { NodeList<Element> elementsByName = document.body.querySelectorAll(".dropdown"); for (int i = 0; i < elementsByName.length; i++) { HTMLElement item = Js.uncheckedCast(elementsByName.item(i)); close(item); } }
private static boolean isChildOfAddedNode(MutationRecord record, String attachId) { return isChildOfObservedNode(attachId, record.addedNodes.asList(), ATTACH_UID_KEY); }
void hideLabels() { final NodeList<Element> labels = getLabels(); for (int i = 0; i < labels.length; i++) { hide(labels.getAt(i)); } }
public void addMenus(final HTMLElement element) { if (actionsMenu == null) { actionsMenu = (HTMLDivElement) document.createElement("div"); actionsMenu.classList.add("form-group"); if (actions.hasChildNodes()) { actions.insertBefore(actionsMenu, actions.childNodes.item(0)); } else { actions.appendChild(actionsMenu); } } actionsMenu.appendChild(element); }
private static boolean isChildOfRemovedNode(MutationRecord record, final String detachId) { return isChildOfObservedNode(detachId, record.removedNodes.asList(), DETACH_UID_KEY); }
void disableResults() { final NodeList<Element> results = getResultsContainer().querySelectorAll("." + RESULT_ENTRY_CSS_CLASS); for (int i = 0; i < results.length; i++) { results.getAt(i).classList.remove(RESULT_ENTRY_CSS_CLASS); } }
public void addMenus(final HTMLElement element) { if (actionsMenu == null) { actionsMenu = (HTMLDivElement) document.createElement("div"); actionsMenu.classList.add("form-group"); if (actions.hasChildNodes()) { actions.insertBefore(actionsMenu, actions.childNodes.item(0)); } else { actions.appendChild(actionsMenu); } } actionsMenu.appendChild(element); }
private List<Element> getElements() { return document.querySelectorAll("div[data-notify-position=" + selector + "]").asList(); }
void disableWarningHighlight() { final NodeList<Element> warningElements = getElement().parentNode.querySelectorAll("." + WARNING_CSS_CLASS); for (int i = 0; i < warningElements.length; i++) { warningElements.getAt(i).classList.remove(WARNING_CSS_CLASS); } }
private void initFocusElements() { NodeList<Element> elementNodeList = asElement().querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex=\"0\"]"); List<Element> elements = elementNodeList.asList(); if (elements.size() > 0) { focusElements = elements; firstFocusElement = focusElements.get(0); lastFocusElement = elements.get(elements.size() - 1); } else { lastFocusElement = modal.modalContent; } }