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);
}
}
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());
}
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);
}
}
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());
}
}
Aggregations