com.vaadin.ui.
Class TabSheet.TabSheetTabImpl
java.lang.Object
com.vaadin.ui.TabSheet.TabSheetTabImpl
All Implemented Interfaces:
Enclosing class:
- extends Object
- implements TabSheet.Tab
public class TabSheet.TabSheetTabImpl
TabSheet's implementation of TabSheet.Tab
- tab metadata.
See Also:
Constructor Summary | |
---|---|
TabSheet.TabSheetTabImpl(String caption,
Resource icon)
|
Method Summary | |
---|---|
void |
close()
|
String |
getCaption()
Returns the tab caption. |
Component |
getComponent()
Get the component related to the Tab |
ErrorMessage |
getComponentError()
Gets the curent error message shown for the tab. |
String |
getDescription()
Gets the description for the tab. |
Resource |
getIcon()
Gets the icon for the tab. |
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(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 |
setDescription(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 |
setStyleName(String styleName)
Sets a style name for the tab. |
void |
setVisible(boolean visible)
Sets the visible status for the tab. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
TabSheet.TabSheetTabImpl
public TabSheet.TabSheetTabImpl(String caption,
Resource icon)
Method Detail |
---|
getCaption
public String getCaption()
- Specified by:
getCaption
in interfaceTabSheet.Tab
Returns the tab caption. Can never be null.
setCaption
public void setCaption(String caption)
- Specified by:
setCaption
in interfaceTabSheet.Tab
- Parameters:
caption
- the caption to set
Description copied from interface: TabSheet.Tab
Sets the caption for the tab.
getIcon
public Resource getIcon()
- Specified by:
getIcon
in interfaceTabSheet.Tab
Description copied from interface: TabSheet.Tab
Gets the icon for the tab.
setIcon
public void setIcon(Resource icon)
- Specified by:
setIcon
in interfaceTabSheet.Tab
- Parameters:
icon
- the icon to set
Description copied from interface: TabSheet.Tab
Sets the icon for the tab.
isEnabled
public boolean isEnabled()
- Specified by:
isEnabled
in interfaceTabSheet.Tab
- Returns:
- true for enabled, false for disabled
Description copied from interface: TabSheet.Tab
Returns the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.
setEnabled
public void setEnabled(boolean enabled)
- Specified by:
setEnabled
in interfaceTabSheet.Tab
- Parameters:
enabled
- true for enabled, false for disabled
Description copied from interface: TabSheet.Tab
Sets the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.
isVisible
public boolean isVisible()
- Specified by:
isVisible
in interfaceTabSheet.Tab
- Returns:
- true for visible, false for hidden
Description copied from interface: TabSheet.Tab
Returns the visible status for the tab. An invisible tab is not shown in the tab bar and cannot be selected.
setVisible
public void setVisible(boolean visible)
- Specified by:
setVisible
in interfaceTabSheet.Tab
- Parameters:
visible
- true for visible, false for hidden
Description copied from interface: TabSheet.Tab
Sets the visible status for the tab. An invisible tab is not shown in the tab bar and cannot be selected, selection is changed automatically when there is an attempt to select an invisible tab.
isClosable
public boolean isClosable()
- Specified by:
isClosable
in interfaceTabSheet.Tab
- Returns:
- true if the tab is allowed to be closed by the end user, false for not allowing closing
Description copied from interface: TabSheet.Tab
Returns the closability status for the tab.
setClosable
public void setClosable(boolean closable)
- Specified by:
setClosable
in interfaceTabSheet.Tab
Description copied from interface: TabSheet.Tab
Sets the closability status for the tab. A closable tab can be closed by the user through the user interface. This also controls if a close button is shown to the user or not.
Note! Currently only supported by TabSheet, not Accordion.
close
public void close()
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceTabSheet.Tab
- Returns:
- the description for the tab
Description copied from interface: TabSheet.Tab
Gets the description for the tab. The description can be used to briefly describe the state of the tab to the user, and is typically shown as a tooltip when hovering over the tab.
setDescription
public void setDescription(String description)
- Specified by:
setDescription
in interfaceTabSheet.Tab
- Parameters:
description
- the new description string for the tab.
Description copied from interface: TabSheet.Tab
Sets the description for the tab. The description can be used to briefly describe the state of the tab to the user, and is typically shown as a tooltip when hovering over the tab.
getComponentError
public ErrorMessage getComponentError()
- Specified by:
getComponentError
in interfaceTabSheet.Tab
Description copied from interface: TabSheet.Tab
Gets the curent error message shown for the tab.
setComponentError
public void setComponentError(ErrorMessage componentError)
- Specified by:
setComponentError
in interfaceTabSheet.Tab
- Parameters:
componentError
- error message or null for none- See Also:
AbstractComponent.setComponentError(ErrorMessage)
Description copied from interface: TabSheet.Tab
Sets an error indicator to be shown in the tab. This can be used e.g. to communicate to the user that there is a problem in the contents of the tab.
getComponent
public Component getComponent()
- Specified by:
getComponent
in interfaceTabSheet.Tab
Description copied from interface: TabSheet.Tab
Get the component related to the Tab
setStyleName
public void setStyleName(String styleName)
- Specified by:
setStyleName
in interfaceTabSheet.Tab
- Parameters:
styleName
- the new style to be set for tab- See Also:
TabSheet.Tab.getStyleName()
Description copied from interface: TabSheet.Tab
Sets a style name for the tab. The style name will be rendered as a HTML class name, which can be used in a CSS definition.
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.
getStyleName
public String getStyleName()
- Specified by:
getStyleName
in interfaceTabSheet.Tab
- Returns:
- the style name or of the tab
- See Also:
TabSheet.Tab.setStyleName(String)
Description copied from interface: TabSheet.Tab
Gets the user-defined CSS style name of the tab. Built-in style names defined in Vaadin or GWT are not returned.