@Override public void setTabIndex(int tabIndex) { getState().tabIndex = tabIndex; }
@Override public int getTabIndex() { return getState(false).tabIndex; }
/** * Checks if the tab selection part should be shown in the UI. * * @return true if the tabs are shown in the UI, false otherwise * @since 7.5 */ public boolean isTabsVisible() { return getState(false).tabsVisible; }
/** * Sets whether the tab selection part should be shown in the UI. * * @since 7.5 * @param tabsVisible * true if the tabs should be shown in the UI, false otherwise */ public void setTabsVisible(boolean tabsVisible) { getState().tabsVisible = tabsVisible; }
@Override protected AccordionState getState(boolean markAsDirty) { return (AccordionState) super.getState(markAsDirty); }
/** * Checks whether HTML is allowed in the tab captions. * <p> * The default is false, i.e. render tab captions as plain text * * @return true if the tab captions are rendered as HTML, false if rendered * as plain text * @since 7.4 */ public boolean isTabCaptionsAsHtml() { return getState(false).tabCaptionsAsHtml; } }
@Override protected AccordionState getState() { return (AccordionState) super.getState(); }
/** * Sets whether HTML is allowed in the tab captions. * <p> * If set to true, the captions are rendered in the browser as HTML and the * developer is responsible for ensuring no harmful HTML is used. If set to * false, the content is rendered in the browser as plain text. * <p> * The default is false, i.e. render tab captions as plain text * * @param tabCaptionsAsHtml * true if the tab captions are rendered as HTML, false if * rendered as plain text * @since 7.4 */ public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml) { getState().tabCaptionsAsHtml = tabCaptionsAsHtml; }
/** * Sets the position of the tab. * * @param tab * The tab * @param position * The new position of the tab */ public void setTabPosition(Tab tab, int position) { int oldPosition = getTabPosition(tab); components.remove(oldPosition); components.add(position, tab.getComponent()); getState().tabs.remove(oldPosition); getState().tabs.add(position, ((TabSheetTabImpl) tab).getTabState()); }
/** * Sets the selected tab in the TabSheet. Ensures that the selected tab is * repainted if needed. * * @param component * The new selection or null for no selection */ private void setSelected(Component component) { Tab tab = tabs.get(selected); selected = component; // Repaint of the selected component is needed as only the selected // component is communicated to the client. Otherwise this will be a // "cached" update even though the client knows nothing about the // connector if (selected != null) { tab = getTab(component); if (tab != null && tab.getDefaultFocusComponent() != null) { tab.getDefaultFocusComponent().focus(); } getState().selected = keyMapper.key(selected); selected.markAsDirtyRecursive(); } else { getState().selected = null; } }
getState().tabs .remove(((TabSheetTabImpl) removedTab).getTabState());
keyMapper.key(tabComponent), caption, icon); getState().tabs.add(position, tab.getTabState()); tabs.put(tabComponent, tab);
@Override public DDTabSheetState getState() { return (DDTabSheetState) super.getState(); }
@Override public DDTabSheetState getState() { return (DDTabSheetState) super.getState(); }