Search in sources :

Example 6 with TabPanel

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

the class TabPanelTest method widgetIndex.

@Test
public void widgetIndex() {
    // Given
    TabPanel tp = new TabPanel();
    Widget widget0 = new HTML("Foo");
    tp.add(widget0, "foo");
    Widget widget1 = new HTML("Bar");
    tp.add(widget1, "bar");
    // When & Then
    assertThat(tp.getWidgetIndex(widget1)).isEqualTo(1);
}
Also used : TabPanel(com.google.gwt.user.client.ui.TabPanel) Widget(com.google.gwt.user.client.ui.Widget) HTML(com.google.gwt.user.client.ui.HTML) Test(org.junit.Test)

Example 7 with TabPanel

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

the class TabPanelTest method createTabPanel.

private TabPanel createTabPanel() {
    TabPanel tp = new TabPanel();
    tp.add(new HTML("Foo"), "foo");
    tp.add(new HTML("Bar"), "bar");
    tp.add(new HTML("Baz"), "baz");
    return tp;
}
Also used : TabPanel(com.google.gwt.user.client.ui.TabPanel) HTML(com.google.gwt.user.client.ui.HTML)

Aggregations

TabPanel (com.google.gwt.user.client.ui.TabPanel)7 Test (org.junit.Test)6 HTML (com.google.gwt.user.client.ui.HTML)3 Widget (com.google.gwt.user.client.ui.Widget)2