public void removeTab(int index) { if (index < 0) { return; } if (index < navTabs.getWidgetCount()) { navTabs.remove(index); } if (index < tabContent.getWidgetCount()) { tabContent.remove(index); } }
public void removeTab(int index) { if (index < 0) { return; } if (index < navTabs.getWidgetCount()) { navTabs.remove(index); } if (index < tabContent.getWidgetCount()) { tabContent.remove(index); } }
/** * Removes the given tab and its associated contents that were previously added with * {@link #addItem(String, Widget)}. Has no effect if the item is not currently in this tab panel. * @param tab the item to remove. */ public boolean remove(TabPanelEntry tab) { for (HandlerRegistration registration : tabHandlerRegistrations.removeAll(tab)) { registration.removeHandler(); } boolean removed = tabBar.remove(tab.getTabWidget()); tabContent.remove(tab.getContentPane()); activatableWidgets.remove(tab.getTabWidget()); allContentTabs.remove(tab); resizeTabContent(); return removed; }
/** * Removes the given tab and its associated contents that were previously added with * {@link #addItem(String, Widget)}. Has no effect if the item is not currently in this tab panel. * @param tab the item to remove. */ public boolean remove(TabPanelEntry tab) { for (HandlerRegistration registration : tabHandlerRegistrations.removeAll(tab)) { registration.removeHandler(); } boolean removed = tabBar.remove(tab.getTabWidget()); tabContent.remove(tab.getContentPane()); activatableWidgets.remove(tab.getTabWidget()); allContentTabs.remove(tab); resizeTabContent(); return removed; }