Search in sources :

Example 71 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project GwtMobile by dennisjzh.

the class HeaderPanel method add.

@Override
public void add(Widget w) {
    FlowPanel contents = ((FlowPanel) ((FlowPanel) getWidget()).getWidget(1));
    contents.add(w);
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Example 72 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project GwtMobile by dennisjzh.

the class HeaderPanel method setLeftButton.

public void setLeftButton(String buttonName) {
    SimplePanel leftButton = ((SimplePanel) ((FlowPanel) getWidget()).getWidget(0));
    ClickHandler clickHandler = new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            onLeftButtonClick(event);
        }
    };
    if (buttonName.toUpperCase().equals("BACK")) {
        leftButton.setWidget(new BackButton(buttonName, clickHandler));
    } else {
        leftButton.setWidget(new Button(buttonName, clickHandler));
    }
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 73 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project GwtMobile by dennisjzh.

the class HeaderPanel method setRightButton.

public void setRightButton(String buttonName) {
    SimplePanel rightButton = ((SimplePanel) ((FlowPanel) getWidget()).getWidget(2));
    ClickHandler clickHandler = new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            onRightButtonClick(event);
        }
    };
    if (buttonName.toUpperCase().equals("NEXT")) {
        rightButton.setWidget(new NextButton(buttonName, clickHandler));
    } else {
        rightButton.setWidget(new Button(buttonName, clickHandler));
    }
}
Also used : ClickHandler(com.google.gwt.event.dom.client.ClickHandler) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 74 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project GwtMobile by dennisjzh.

the class HeaderPanel method setCaption.

public void setCaption(String caption) {
    FlowPanel contents = ((FlowPanel) ((FlowPanel) getWidget()).getWidget(1));
    contents.clear();
    contents.add(new HTML(caption));
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) HTML(com.google.gwt.user.client.ui.HTML)

Example 75 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project openremote by openremote.

the class ValueEditors method createBooleanEditor.

public static IsWidget createBooleanEditor(BooleanValue currentValue, Consumer<BooleanValue> onValueModified, Optional<Long> timestamp, boolean readOnly, String styleName) {
    Consumer<Boolean> updateConsumer = readOnly ? null : bool -> onValueModified.accept(Values.create(bool));
    FlowPanel panel = new FlowPanel();
    panel.setStyleName("flex layout horizontal center or-ValueEditor or-BooleanValueEditor");
    IsWidget widget = ValueEditors.createBooleanEditorWidget(styleName, readOnly, currentValue != null && currentValue.getBoolean(), updateConsumer);
    FlowPanel widgetWrapper = new FlowPanel();
    widgetWrapper.setStyleName("flex layout horizontal center");
    widgetWrapper.add(widget);
    panel.add(widgetWrapper);
    timestamp.ifPresent(time -> addTimestampLabel(time, panel));
    return panel;
}
Also used : IsWidget(com.google.gwt.user.client.ui.IsWidget) FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Aggregations

FlowPanel (com.google.gwt.user.client.ui.FlowPanel)81 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)18 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)15 Button (com.google.gwt.user.client.ui.Button)14 Label (com.google.gwt.user.client.ui.Label)12 Grid (com.google.gwt.user.client.ui.Grid)10 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)8 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)7 SmallHeading (com.google.gerrit.client.ui.SmallHeading)6 Element (com.google.gwt.dom.client.Element)6 CheckBox (com.google.gwt.user.client.ui.CheckBox)6 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)6 InlineLabel (com.google.gwt.user.client.ui.InlineLabel)6 Widget (com.google.gwt.user.client.ui.Widget)6 Test (org.junit.Test)6 ComplexPanel (com.google.gwt.user.client.ui.ComplexPanel)5 HTML (com.google.gwt.user.client.ui.HTML)5 Image (com.google.gwt.user.client.ui.Image)5 IsWidget (com.google.gwt.user.client.ui.IsWidget)5 List (java.util.List)4