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