use of org.jboss.errai.common.client.dom.NodeList in project kie-wb-common by kiegroup.
the class MonacoEditorView method attachListenerToPanelTitle.
// Workaround for refreshing Monaco editor and get scrollbars visible when the accordion is expanded
void attachListenerToPanelTitle() {
final NodeList titleNodes = getParentInDepth(rootContainer, DEPTH).getElementsByClassName(PANEL_TITLE);
for (int i = 0; i < titleNodes.getLength(); i++) {
titleNodes.item(i).addEventListener(EVENT_NAME, event -> presenter.onLanguageChanged(languageSelector.getValue()), false);
}
if (resizeObserver == null) {
resizeObserver = new ResizeObserver(event -> onResize());
if (observeCommand == null) {
observeCommand = () -> resizeObserver.observe((elemental2.dom.Element) monacoEditor.getParentElement().getParentNode());
}
observeCommand.execute();
}
}
use of org.jboss.errai.common.client.dom.NodeList in project kie-wb-common by kiegroup.
the class MonacoEditorView method clear.
private static void clear(Div div) {
NodeList childNodes = div.getChildNodes();
for (int i = 0; i < childNodes.getLength(); i++) {
Node node = childNodes.item(i);
div.removeChild(node);
}
}
use of org.jboss.errai.common.client.dom.NodeList in project kie-wb-common by kiegroup.
the class SelectDocumentPopupViewImpl method clear.
@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);
}
}
use of org.jboss.errai.common.client.dom.NodeList in project kie-wb-common by kiegroup.
the class AppLauncherView method removeAllNodes.
public void removeAllNodes(final Element element) {
final NodeList nodeList = element.getChildNodes();
int length = nodeList.getLength();
for (int i = 0; i < length; i++) {
element.removeChild(nodeList.item(0));
}
}
Aggregations