use of org.jboss.errai.common.client.dom.HTMLElement in project kie-wb-common by kiegroup.
the class ImageElementRendererViewImpl method resize.
private void resize(final int widthPx, final int heightPx) {
icon.getStyle().setProperty("width", widthPx + Style.Unit.PX.name());
icon.getStyle().setProperty("height", heightPx + Style.Unit.PX.name());
if (DOMUtil.getFirstChildElement(icon).isPresent()) {
HTMLElement svgElement = (HTMLElement) DOMUtil.getFirstChildElement(icon).get();
svgElement.getStyle().setProperty("width", widthPx + Style.Unit.PX.name());
svgElement.getStyle().setProperty("height", heightPx + Style.Unit.PX.name());
svgElement.getStyle().setProperty("position", "absolute");
svgElement.getStyle().setProperty("top", "0px");
svgElement.getStyle().setProperty("left", "0px");
}
}
use of org.jboss.errai.common.client.dom.HTMLElement in project kie-wb-common by kiegroup.
the class FormModelsViewImpl method render.
protected void render() {
DOMUtil.removeAllChildren(content);
creationViews.forEach(container -> {
HTMLElement row = document.createElement("div");
DOMUtil.addCSSClass(row, Styles.ROW);
HTMLElement col = document.createElement("div");
DOMUtil.addCSSClass(col, ColumnSize.MD_12.getCssName());
col.appendChild(container.getElement());
row.appendChild(col);
content.appendChild(row);
});
creationViews.get(0).selectManager();
}
use of org.jboss.errai.common.client.dom.HTMLElement in project kie-wb-common by kiegroup.
the class DefinitionPaletteCategoryWidgetViewImpl method addGroup.
@Override
public void addGroup(DefinitionPaletteGroupWidget groupWidget) {
HTMLElement groupHeader = document.createElement("h5");
groupHeader.setTextContent(groupWidget.getItem().getTitle());
floatingPanel.appendChild(groupHeader);
floatingPanel.appendChild(groupWidget.getElement());
}
use of org.jboss.errai.common.client.dom.HTMLElement in project kie-wb-common by kiegroup.
the class ChangeProfileDevCommand method showModal.
private void showModal() {
final HTMLElement selectorView = profileSelector.getView().getElement();
final Bs3Modal modal = modalFactory.get();
modal.setFooterContent(new FlowPanel());
modal.setModalTitle("Choose profile");
modal.setContent(ElementWrapperWidget.getWidget(selectorView));
modal.show();
}
use of org.jboss.errai.common.client.dom.HTMLElement in project kie-wb-common by kiegroup.
the class AbstractPopoverImplTest method testGetElement.
@Test
public void testGetElement() {
final HTMLElement element = mock(HTMLElement.class);
when(popover.getElement()).thenReturn(element);
final HTMLElement actual = popover.getElement();
assertEquals(element, actual);
}
Aggregations