/** * Removes a {@link Tab} and the component associated with it, as previously * added with {@link #addTab(Component)}, * {@link #addTab(Component, String, Resource)} or * {@link #addComponent(Component)}. * <p> * If the tab was selected, the first eligible (visible and enabled) * remaining tab is selected. * </p> * * @see #addTab(Component) * @see #addTab(Component, String, Resource) * @see #addComponent(Component) * @see #removeComponent(Component) * @param tab * the Tab to remove */ public void removeTab(Tab tab) { removeComponent(tab.getComponent()); }
/** * Sets the HSV tab visibility. * * @param visible * The visibility of the HSV tab */ public void setHSVTabVisible(boolean visible) { if (visible && !isTabVisible(hsvTab)) { tabs.addTab(hsvTab, "HSV", null); checkIfTabsNeeded(); } else if (!visible && isTabVisible(hsvTab)) { tabs.removeComponent(hsvTab); checkIfTabsNeeded(); } }
/** * Sets the visibility of the Swatches tab. * * @param visible * The visibility of the Swatches tab */ public void setSwatchesTabVisible(boolean visible) { if (visible && !isTabVisible(swatchesTab)) { tabs.addTab(swatchesTab, "Swatches", null); checkIfTabsNeeded(); } else if (!visible && isTabVisible(swatchesTab)) { tabs.removeComponent(swatchesTab); checkIfTabsNeeded(); } }
/** * Sets the RGB tab visibility. * * @param visible * The visibility of the RGB tab */ public void setRGBTabVisible(boolean visible) { if (visible && !isTabVisible(rgbTab)) { tabs.addTab(rgbTab, "RGB", null); checkIfTabsNeeded(); } else if (!visible && isTabVisible(rgbTab)) { tabs.removeComponent(rgbTab); checkIfTabsNeeded(); } }
setSelected(null); removeComponent(oldComponent); newTab = addTab(newComponent, oldLocation);
/** * Method to invoke when a {@link TabSheet.Tab} is closed. * * @param tabsheet * @param tabContent */ public void onTabClose(final TabSheet tabsheet, final Component tabContent) { tabsheet.setSelectedTab(0); tabsheet.removeComponent(tabContent); m_wallboardEditorMap.remove(((WallboardEditor) tabContent).getWallboard()); }
private void removeLanguageTab(Component c) { PropertiesArea area = (PropertiesArea) c; Language language = area.getLanguage(); languageProperties.remove(language); languageTabs.removeComponent(c); if (Lang.equals(getDefaultLanguage(), language.getCode())) { setDefaultLanguage(null); } removeAvailableDefaultLanguage(language.getCode()); }
/** * Set HSV tab visibility. * * @param visible * The visibility of the HSV tab */ public void setHSVTabVisible(boolean visible) { if (visible && !tabIsVisible(hsvTab)) { tabs.addTab(hsvTab, "HSV", null); checkIfTabsNeeded(); } else if (!visible && tabIsVisible(hsvTab)) { tabs.removeComponent(hsvTab); checkIfTabsNeeded(); } }
/** * Set RGB tab visibility. * * @param visible * The visibility of the RGB tab */ public void setRGBTabVisible(boolean visible) { if (visible && !tabIsVisible(rgbTab)) { tabs.addTab(rgbTab, "RGB", null); checkIfTabsNeeded(); } else if (!visible && tabIsVisible(rgbTab)) { tabs.removeComponent(rgbTab); checkIfTabsNeeded(); } }
/** * Set Swatches tab visibility. * * @param visible * The visibility of the Swatches tab */ public void setSwatchesTabVisible(boolean visible) { if (visible && !tabIsVisible(swatchesTab)) { tabs.addTab(swatchesTab, "Swatches", null); checkIfTabsNeeded(); } else if (!visible && tabIsVisible(swatchesTab)) { tabs.removeComponent(swatchesTab); checkIfTabsNeeded(); } }