|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface TabSheet.Tab
Tab meta-data for a component in a TabSheet
.
The meta-data includes the tab caption, icon, visibility and enabledness,
closability, description (tooltip) and an optional component error shown
in the tab.
Tabs are identified by the component contained on them in most cases, and
the meta-data can be obtained with TabSheet.getTab(Component)
.
Method Summary | |
---|---|
java.lang.String |
getCaption()
Gets the caption for the tab. |
Component |
getComponent()
Get the component related to the Tab |
ErrorMessage |
getComponentError()
Gets the current error message shown for the tab. |
Component.Focusable |
getDefaultFocusComponent()
Get the component that should be automatically focused when the tab is selected. |
java.lang.String |
getDescription()
Gets the description for the tab. |
Resource |
getIcon()
Gets the icon for the tab. |
java.lang.String |
getIconAlternateText()
Gets the icon alt text for the tab. |
java.lang.String |
getId()
Gets currently set debug identifier |
java.lang.String |
getStyleName()
Gets the user-defined CSS style name of the tab. |
boolean |
isClosable()
Returns the closability status for the tab. |
boolean |
isEnabled()
Returns the enabled status for the tab. |
boolean |
isVisible()
Returns the visible status for the tab. |
void |
setCaption(java.lang.String caption)
Sets the caption for the tab. |
void |
setClosable(boolean closable)
Sets the closability status for the tab. |
void |
setComponentError(ErrorMessage componentError)
Sets an error indicator to be shown in the tab. |
void |
setDefaultFocusComponent(Component.Focusable component)
Set the component that should automatically focused when the tab is selected. |
void |
setDescription(java.lang.String description)
Sets the description for the tab. |
void |
setEnabled(boolean enabled)
Sets the enabled status for the tab. |
void |
setIcon(Resource icon)
Sets the icon for the tab. |
void |
setIcon(Resource icon,
java.lang.String iconAltText)
Sets the icon and alt text for the tab. |
void |
setIconAlternateText(java.lang.String iconAltText)
Sets the icon alt text for the tab. |
void |
setId(java.lang.String id)
Adds an unique id for component that is used in the client-side for testing purposes. |
void |
setStyleName(java.lang.String styleName)
Sets a style name for the tab. |
void |
setVisible(boolean visible)
Sets the visible status for the tab. |
Method Detail |
---|
boolean isVisible()
void setVisible(boolean visible)
visible
- true for visible, false for hiddenboolean isClosable()
void setClosable(boolean closable)
Note! Currently only supported by TabSheet, not Accordion.
closable
- true if the end user is allowed to close the tab, false
for not allowing to close. Should default to false.void setDefaultFocusComponent(Component.Focusable component)
component
- the component to focusComponent.Focusable getDefaultFocusComponent()
boolean isEnabled()
void setEnabled(boolean enabled)
enabled
- true for enabled, false for disabledvoid setCaption(java.lang.String caption)
caption
- the caption to setjava.lang.String getCaption()
Resource getIcon()
void setIcon(Resource icon)
icon
- the icon to setvoid setIcon(Resource icon, java.lang.String iconAltText)
icon
- the icon to setjava.lang.String getIconAlternateText()
void setIconAlternateText(java.lang.String iconAltText)
iconAltText
- the icon to setjava.lang.String getDescription()
void setDescription(java.lang.String description)
description
- the new description string for the tab.void setComponentError(ErrorMessage componentError)
componentError
- error message or null for noneAbstractComponent.setComponentError(ErrorMessage)
ErrorMessage getComponentError()
AbstractComponent.setComponentError(ErrorMessage)
Component getComponent()
void setStyleName(java.lang.String styleName)
Tab tab = tabsheet.addTab(tabContent, "Tab text"); tab.setStyleName("mystyle");
The used style name will be prefixed with "
v-tabsheet-tabitemcell-
". For example, if you give a tab the
style "mystyle
", the tab will get a "
v-tabsheet-tabitemcell-mystyle
" style. You could then style
the component with:
.v-tabsheet-tabitemcell-mystyle {font-style: italic;}
This method will trigger a RepaintRequestEvent
on the
TabSheet to which the Tab belongs.
styleName
- the new style to be set for tabgetStyleName()
java.lang.String getStyleName()
setStyleName(String)
void setId(java.lang.String id)
id
- An alphanumeric idjava.lang.String getId()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |