/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab */ public void add(Widget w, String tabText) { insert(w, tabText, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabWidget the widget to be shown in the tab */ public void add(Widget w, Widget tabWidget) { insert(w, tabWidget, getWidgetCount()); }
@Override public void clear() { while (getWidgetCount() > 0) { remove(getWidget(0)); } }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab * @param asHTML <code>true</code> to treat the specified text as HTML */ public void add(Widget w, @IsSafeHtml String tabText, boolean asHTML) { insert(w, tabText, asHTML, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab */ public void add(Widget w, String tabText) { insert(w, tabText, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab * @param asHTML <code>true</code> to treat the specified text as HTML */ public void add(Widget w, String tabText, boolean asHTML) { insert(w, tabText, asHTML, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab */ public void add(Widget w, String tabText) { insert(w, tabText, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabWidget the widget to be shown in the tab */ public void add(Widget w, Widget tabWidget) { insert(w, tabWidget, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabText the text to be shown on its tab * @param asHTML <code>true</code> to treat the specified text as HTML */ public void add(Widget w, String tabText, boolean asHTML) { insert(w, tabText, asHTML, getWidgetCount()); }
/** * Adds a widget to the tab panel. If the Widget is already attached to the * TabPanel, it will be moved to the right-most index. * * @param w the widget to be added * @param tabWidget the widget to be shown in the tab */ public void add(Widget w, Widget tabWidget) { insert(w, tabWidget, getWidgetCount()); }
@Override public void clear() { while (getWidgetCount() > 0) { remove(getWidget(0)); } }
@Override public void clear() { while (getWidgetCount() > 0) { remove(getWidget(0)); } }
/** * Verifies that the actual {@link TabPanel} child widget count is equal to the given one. * * @param expected the expected widget count. * @return this assertion object. * @throws AssertionError if the actual widget count is not equal to the given one. * @see TabPanel#getWidgetCount() */ public S widgetCountEquals(int expected) { int widgetCount = actual.getWidgetCount(); if (areEqual(widgetCount, expected)) return myself; throw propertyComparisonFailed("WidgetCount", widgetCount, expected); }
/** * Verifies that the actual {@link TabPanel} child widget count is equal to the given one. * * @param expected the expected widget count. * @return this assertion object. * @throws AssertionError if the actual widget count is not equal to the given one. * @see TabPanel#getWidgetCount() */ public S widgetCountEquals(int expected) { int widgetCount = actual.getWidgetCount(); if (areEqual(widgetCount, expected)) return myself; throw propertyComparisonFailed("WidgetCount", widgetCount, expected); }
@Override public void add(View view) { int index = tabPanel.getWidgetCount(); InstanceView instanceView = new InstanceView(Integer.toString(index)); tabPanel.add(view.getWidget(), instanceView.makeTab(tabLabel(index))); if (index == 0) { tabPanel.selectTab(0); } }