Search in sources :

Example 16 with HTMLElement

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");
    }
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement)

Example 17 with HTMLElement

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

Example 18 with HTMLElement

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

Example 19 with HTMLElement

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();
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) FlowPanel(org.gwtbootstrap3.client.ui.gwt.FlowPanel) Bs3Modal(org.uberfire.client.views.pfly.modal.Bs3Modal)

Example 20 with HTMLElement

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);
}
Also used : HTMLElement(org.jboss.errai.common.client.dom.HTMLElement) Test(org.junit.Test)

Aggregations

HTMLElement (org.jboss.errai.common.client.dom.HTMLElement)46 Test (org.junit.Test)29 DecisionNavigatorItem (org.kie.workbench.common.dmn.client.docks.navigator.DecisionNavigatorItem)10 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)2 TreeSet (java.util.TreeSet)2 Node (org.jboss.errai.common.client.dom.Node)2 LayoutComponent (org.uberfire.ext.layout.editor.api.editor.LayoutComponent)2 IsWidget (com.google.gwt.user.client.ui.IsWidget)1 Element (elemental2.dom.Element)1 HTMLDivElement (elemental2.dom.HTMLDivElement)1 HTMLInputElement (elemental2.dom.HTMLInputElement)1 HTMLUListElement (elemental2.dom.HTMLUListElement)1 Text (elemental2.dom.Text)1 JsOverlay (jsinterop.annotations.JsOverlay)1 FlowPanel (org.gwtbootstrap3.client.ui.gwt.FlowPanel)1 Button (org.jboss.errai.common.client.dom.Button)1 CSSStyleDeclaration (org.jboss.errai.common.client.dom.CSSStyleDeclaration)1 Event (org.jboss.errai.common.client.dom.Event)1 EventListener (org.jboss.errai.common.client.dom.EventListener)1 ParameterItem (org.kie.workbench.common.dmn.client.widgets.decisionservice.parameters.parametergroup.ParameterGroup.ParameterItem)1