Search in sources :

Example 46 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project gwt-test-utils by gwt-test-utils.

the class ComplexPanelTest method count.

@Test
public void count() {
    // Given
    ComplexPanel panel = new FlowPanel();
    panel.add(new Button());
    panel.add(new Button());
    // When & Then
    assertThat(panel.getWidgetCount()).isEqualTo(2);
}
Also used : Button(com.google.gwt.user.client.ui.Button) ComplexPanel(com.google.gwt.user.client.ui.ComplexPanel) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) Test(org.junit.Test)

Example 47 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project gwt-test-utils by gwt-test-utils.

the class WidgetWithUiChild method addMyUiLabel.

@UiChild
void addMyUiLabel(Label l) {
    FlowPanel flowPanel = (FlowPanel) this.getWidget();
    flowPanel.add(l);
    labels.add(l);
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) UiChild(com.google.gwt.uibinder.client.UiChild)

Example 48 with FlowPanel

use of com.google.gwt.user.client.ui.FlowPanel in project gwt-test-utils by gwt-test-utils.

the class WidgetWithUiChild method uiCustomChild.

@UiChild(tagname = "customChild", limit = 1)
void uiCustomChild(Widget w) {
    FlowPanel flowPanel = (FlowPanel) this.getWidget();
    flowPanel.add(w);
    customWidgets.add(w);
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) UiChild(com.google.gwt.uibinder.client.UiChild)

Example 49 with FlowPanel

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

the class EditorPaneMenuWidget method getDelimiter.

private FlowPanel getDelimiter() {
    final FlowPanel delimiter = new FlowPanel();
    delimiter.addStyleName(resources.coreCss().editorPaneMenuDelimiter());
    return delimiter;
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Example 50 with FlowPanel

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

the class PreviewViewImpl method checkChildrenState.

private void checkChildrenState(TreeItem treeItem, Boolean value) {
    int childCount = treeItem.getChildCount();
    if (childCount == 0) {
        return;
    }
    for (int i = 0; i < childCount; i++) {
        TreeItem childItem = treeItem.getChild(i);
        if (!(childItem.getWidget() instanceof FlowPanel)) {
            return;
        }
        FlowPanel childItemContainer = (FlowPanel) childItem.getWidget();
        if (!(childItemContainer.getWidget(0) instanceof CheckBox)) {
            return;
        }
        CheckBox childCheckBox = (CheckBox) childItemContainer.getWidget(0);
        childCheckBox.setValue(value);
        checkChildrenState(childItem, value);
    }
}
Also used : TreeItem(com.google.gwt.user.client.ui.TreeItem) CheckBox(com.google.gwt.user.client.ui.CheckBox) 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