/** * Programmatically selects the specified tab and fires events. Use index -1 * to specify that no tab should be selected. * * @param index the index of the tab to be selected * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index) { return selectTab(index, true); }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }
/** * Programmatically selects the specified tab and fires events. Use index -1 * to specify that no tab should be selected. * * @param index the index of the tab to be selected * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index) { return selectTab(index, true); }
/** * Programmatically selects the specified tab and fires events. Use index -1 * to specify that no tab should be selected. * * @param index the index of the tab to be selected * @return <code>true</code> if successful, <code>false</code> if the change * is denied by the {@link BeforeSelectionHandler}. */ public boolean selectTab(int index) { return selectTab(index, true); }
public void selectTab(int idx) { activeTab = idx; tabBar.selectTab(idx); deckPanel.showWidget(idx); }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }
/** * Selects the tab corresponding to the widget for the tab. To be clear the * widget for the tab is not the widget INSIDE of the tab; it is the widget * used to represent the tab itself. * * @param tabWidget The widget for the tab to be selected * @return true if the tab corresponding to the widget for the tab could * located and selected, false otherwise */ private boolean selectTabByTabWidget(Widget tabWidget) { int numTabs = panel.getWidgetCount() - 1; for (int i = 1; i < numTabs; ++i) { if (panel.getWidget(i) == tabWidget) { return selectTab(i - 1); } } return false; }