Search in sources :

Example 1 with Node

use of org.jboss.errai.common.client.dom.Node 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);
    }
}
Also used : NodeList(org.jboss.errai.common.client.dom.NodeList) Node(org.jboss.errai.common.client.dom.Node)

Example 2 with Node

use of org.jboss.errai.common.client.dom.Node in project kie-wb-common by kiegroup.

the class AssetItemWidget method init.

public void init(final String name, final String path, final String type, final IsWidget icon, final String lastModifiedDate, final String createdDate, final Command details, final Command select) {
    if (icon != null) {
        HTMLElement assetIconHtml = TemplateUtil.<HTMLElement>nativeCast(icon.asWidget().getElement());
        final Node clonedAssetIconHtml = assetIconHtml.cloneNode(true);
        this.assetIcon.appendChild(clonedAssetIconHtml);
    }
    this.assetName.setTextContent(name);
    this.assetName.setOnclick(e -> {
        e.stopImmediatePropagation();
        select.execute();
    });
    this.assetPath.setTextContent(path);
    this.assetType.setTextContent(type);
    this.assetLastModifiedDate.setTextContent(lastModifiedDate);
    this.assetCreatedDate.setTextContent(createdDate);
    assetContainer.setOnclick(e -> details.execute());
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) Node(org.jboss.errai.common.client.dom.Node)

Example 3 with Node

use of org.jboss.errai.common.client.dom.Node 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);
    }
}
Also used : NodeList(org.jboss.errai.common.client.dom.NodeList) Node(org.jboss.errai.common.client.dom.Node)

Example 4 with Node

use of org.jboss.errai.common.client.dom.Node in project kie-wb-common by kiegroup.

the class NewAssetHandlerWidget method init.

public void init(final String title, final IsWidget iconWidget, final Command onClick) {
    text.setTextContent(title);
    if (iconWidget != null) {
        HTMLElement assetIconHtml = TemplateUtil.<HTMLElement>nativeCast(iconWidget.asWidget().getElement());
        final Node clonedAssetIconHtml = assetIconHtml.cloneNode(true);
        this.icon.appendChild(clonedAssetIconHtml);
    }
    if (onClick != null) {
        button.setOnclick(e -> onClick.execute());
    }
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) Node(org.jboss.errai.common.client.dom.Node)

Aggregations

Node (org.jboss.errai.common.client.dom.Node)4 HTMLElement (org.jboss.errai.common.client.dom.HTMLElement)2 NodeList (org.jboss.errai.common.client.dom.NodeList)2