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