Search in sources :

Example 46 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project cuba by cuba-platform.

the class ComponentRenderer method createWidget.

@Override
public SimplePanel createWidget() {
    final SimplePanel panel = GWT.create(SimplePanel.class);
    panel.getElement().addClassName("cr-component-cell");
    panel.sinkEvents(com.google.gwt.user.client.Event.ONCLICK);
    return panel;
}
Also used : SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 47 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project ovirt-engine by oVirt.

the class AbstractValidatedWidgetWithLabel method setUsePatternFly.

@Override
public void setUsePatternFly(final boolean usePatternfly) {
    super.setUsePatternFly(usePatternfly);
    // toggle styles -- remove both PatternFly and non-PatternFly styles
    removeContentWidgetStyleName(style.maxWidth());
    removeContentWidgetStyleName(Styles.FORM_CONTROL);
    removeContentWidgetContainerStyleName(style.contentWidgetContainer_legacy());
    // $NON-NLS-1$
    removeContentWidgetContainerStyleName("avw_contentWidgetContainer_pfly_fix");
    removeWrapperStyleName(Styles.FORM_GROUP);
    removeWrapperStyleName(style.wrapper_legacy());
    // $NON-NLS-1$
    removeWrapperStyleName("avw_wrapper_pfly_fix");
    // add the proper styles
    if (usePatternfly) {
        addContentWidgetStyleName(Styles.FORM_CONTROL);
        addContentWidgetContainerStyleName(style.maxWidth());
        if (!removeFormGroup) {
            addWrapperStyleName(Styles.FORM_GROUP);
        }
        wrapperPanel.remove(contentWidgetContainer);
        if (sizeContainer == null) {
            sizeContainer = new SimplePanel();
            sizeContainer.setWidget(contentWidgetContainer);
            wrapperPanel.insert(sizeContainer, 1);
        }
    } else {
        addContentWidgetStyleName(style.maxWidth());
        addContentWidgetContainerStyleName(style.contentWidgetContainer_legacy());
        // $NON-NLS-1$
        addContentWidgetContainerStyleName("avw_contentWidgetContainer_pfly_fix");
        addWrapperStyleName(style.wrapper_legacy());
        // $NON-NLS-1$
        addWrapperStyleName("avw_wrapper_pfly_fix");
    }
}
Also used : SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 48 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project ovirt-engine by oVirt.

the class AbstractValidatedWidgetWithLabel method setUnitString.

public void setUnitString(String unitString) {
    SimplePanel unitAddOn = new SimplePanel();
    unitAddOn.getElement().setInnerHTML(unitString);
    unitAddOn.addStyleName(Styles.INPUT_GROUP_ADDON);
    contentWidgetContainer.addStyleName(Styles.INPUT_GROUP);
    contentWidgetContainer.add(unitAddOn);
}
Also used : SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 49 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project kie-wb-common by kiegroup.

the class MonacoEditorDOMElementTest method testSetupContainerComponent.

@Test
public void testSetupContainerComponent() {
    final SimplePanel container = mock(SimplePanel.class);
    final Element element = mock(Element.class);
    final Style style = mock(Style.class);
    doReturn(container).when(domElement).getContainer();
    when(container.getElement()).thenReturn(element);
    when(element.getStyle()).thenReturn(style);
    domElement.setupContainerComponent();
    verify(style).setPadding(5, PX);
    verify(container).setWidget(widget);
}
Also used : Element(com.google.gwt.user.client.Element) SimplePanel(com.google.gwt.user.client.ui.SimplePanel) Style(com.google.gwt.dom.client.Style) Test(org.junit.Test)

Example 50 with SimplePanel

use of com.google.gwt.user.client.ui.SimplePanel in project kie-wb-common by kiegroup.

the class MonacoEditorDOMElement method setupContainerComponent.

void setupContainerComponent() {
    final SimplePanel container = getContainer();
    final Style style = container.getElement().getStyle();
    style.setPadding(5, PX);
    container.setWidget(widget);
}
Also used : SimplePanel(com.google.gwt.user.client.ui.SimplePanel) Style(com.google.gwt.dom.client.Style)

Aggregations

SimplePanel (com.google.gwt.user.client.ui.SimplePanel)60 Label (com.google.gwt.user.client.ui.Label)19 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)14 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)9 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)7 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)7 HTML (com.google.gwt.user.client.ui.HTML)7 Test (org.junit.Test)5 Element (com.google.gwt.dom.client.Element)4 Style (com.google.gwt.dom.client.Style)4 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)4 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)4 Button (com.google.gwt.user.client.ui.Button)4 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)4 ListHandler (com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler)3 Image (com.google.gwt.user.client.ui.Image)3 Widget (com.google.gwt.user.client.ui.Widget)3 HorizontalScrollWrapper (org.pentaho.mantle.client.ui.custom.HorizontalScrollWrapper)3 ListBoxTitle (org.pentaho.mantle.client.ui.custom.ListBoxTitle)3 Context (com.google.gwt.cell.client.Cell.Context)2