Package com.vaadin.featurepack.ui
Class FTabSheet.TabSheetTabImpl
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.tabs.Tab
com.vaadin.featurepack.ui.FTabSheet.TabSheetTabImpl
- All Implemented Interfaces:
FTabSheet.Tab,com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.HasAriaLabel,com.vaadin.flow.component.HasComponents,com.vaadin.flow.component.HasComponentsOfType<com.vaadin.flow.component.Component>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.shared.HasThemeVariant<com.vaadin.flow.component.tabs.TabVariant>,com.vaadin.flow.component.shared.HasTooltip,Serializable
- Enclosing class:
FTabSheet
public class FTabSheet.TabSheetTabImpl
extends com.vaadin.flow.component.tabs.Tab
implements FTabSheet.Tab
TabSheet's implementation of
FTabSheet.Tab - tab metadata.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTabSheetTabImpl(String key, String caption, Resource icon) TabSheetTabImpl(String key, String caption, com.vaadin.flow.component.icon.Icon icon) TabSheetTabImpl(String key, String caption, com.vaadin.flow.component.icon.IconFactory iconFactory) -
Method Summary
Modifier and TypeMethodDescriptionReturns the tab caption.com.vaadin.flow.component.ComponentGet the component related to the TabGets the current error message shown for the tab.com.vaadin.flow.component.Focusable<?> Get the component that should be automatically focused when the tab is selected.Gets the description for the tab.getFId()Gets currently set debug identifier.getIcon()Gets the icon for the tab.Gets the icon alt text for the tab.Gets the user-defined CSS style name of the tab.booleanReturns the closability status for the tab.booleanReturns the enabled status for the tab.booleanReturns the visible status for the tab.voidsetCaption(String caption) Sets the caption for the tab.voidsetClosable(boolean closable) Sets the closability status for the tab.voidsetComponentError(ErrorMessage componentError) Sets an error indicator to be shown in the tab.voidsetDefaultFocusComponent(com.vaadin.flow.component.Focusable<?> defaultFocus) Set the component that should automatically focused when the tab is selected.voidsetDescription(String description) Sets the description for the tab.voidsetDescription(String description, ContentMode mode) Sets the description for the tab.voidsetEnabled(boolean enabled) Sets the enabled status for the tab.voidSets the icon for the tab.voidSets the icon and alt text for the tab.voidsetIcon(com.vaadin.flow.component.icon.Icon icon) Sets the icon for the tab.voidsetIcon(com.vaadin.flow.component.icon.IconFactory icon) Sets the icon for the tab.voidSets the icon and alt text for the tab.voidSets the icon and alt text for the tab.voidsetIconAlternateText(String iconAltText) Sets the icon alt text for the tab.voidAdds an unique id for component that is used in the client-side for testing purposes.voidsetStyleName(String styleName) Sets a style name for the tab.voidsetVisible(boolean visible) Sets the visible status for the tab.Methods inherited from class com.vaadin.flow.component.tabs.Tab
getFlexGrow, getLabel, isSelected, setFlexGrow, setLabel, setSelected, toStringMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, getUIOrThrow, hasListener, isAttached, isTemplateMapped, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setTestId, whenAttachedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasComponents
addMethods inherited from interface com.vaadin.flow.component.HasComponentsOfType
add, add, addComponentAsFirst, addComponentAtIndex, bindChildren, getChildren, getComponentAt, getComponentCount, indexOf, remove, remove, removeAll, replaceMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasTheme
addThemeName, addThemeNames, bindThemeName, bindThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant
addThemeVariants, bindThemeVariant, bindThemeVariants, removeThemeVariants, setThemeVariant, setThemeVariants, setThemeVariantsMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipMarkdown, setTooltipText
-
Constructor Details
-
TabSheetTabImpl
-
TabSheetTabImpl
-
TabSheetTabImpl
-
-
Method Details
-
getCaption
Returns the tab caption. Can never be null.- Specified by:
getCaptionin interfaceFTabSheet.Tab
-
setCaption
Description copied from interface:FTabSheet.TabSets the caption for the tab.- Specified by:
setCaptionin interfaceFTabSheet.Tab- Parameters:
caption- the caption to set
-
getIcon
Description copied from interface:FTabSheet.TabGets the icon for the tab.- Specified by:
getIconin interfaceFTabSheet.Tab
-
setIcon
Description copied from interface:FTabSheet.TabSets the icon for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
icon- the icon to set
-
setIcon
public void setIcon(com.vaadin.flow.component.icon.Icon icon) Description copied from interface:FTabSheet.TabSets the icon for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
icon- the Flow icon to set
-
setIcon
public void setIcon(com.vaadin.flow.component.icon.IconFactory icon) Description copied from interface:FTabSheet.TabSets the icon for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
icon- the icon factory to create the icon
-
getIconAlternateText
Description copied from interface:FTabSheet.TabGets the icon alt text for the tab.- Specified by:
getIconAlternateTextin interfaceFTabSheet.Tab
-
setIconAlternateText
Description copied from interface:FTabSheet.TabSets the icon alt text for the tab.- Specified by:
setIconAlternateTextin interfaceFTabSheet.Tab- Parameters:
iconAltText- the icon to set
-
setDefaultFocusComponent
public void setDefaultFocusComponent(com.vaadin.flow.component.Focusable<?> defaultFocus) Description copied from interface:FTabSheet.TabSet the component that should automatically focused when the tab is selected.- Specified by:
setDefaultFocusComponentin interfaceFTabSheet.Tab- Parameters:
defaultFocus- the component to focus
-
getDefaultFocusComponent
public com.vaadin.flow.component.Focusable<?> getDefaultFocusComponent()Description copied from interface:FTabSheet.TabGet the component that should be automatically focused when the tab is selected.- Specified by:
getDefaultFocusComponentin interfaceFTabSheet.Tab- Returns:
- the focusable component
-
isEnabled
public boolean isEnabled()Description copied from interface:FTabSheet.TabReturns the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
isEnabledin interfaceFTabSheet.Tab- Specified by:
isEnabledin interfacecom.vaadin.flow.component.HasEnabled- Returns:
- true for enabled, false for disabled
-
setEnabled
public void setEnabled(boolean enabled) Description copied from interface:FTabSheet.TabSets the enabled status for the tab. A disabled tab is shown as such in the tab bar and cannot be selected.- Specified by:
setEnabledin interfaceFTabSheet.Tab- Specified by:
setEnabledin interfacecom.vaadin.flow.component.HasEnabled- Parameters:
enabled- true for enabled, false for disabled
-
isVisible
public boolean isVisible()Description copied from interface:FTabSheet.TabReturns the visible status for the tab. An invisible tab is not shown in the tab bar and cannot be selected.- Specified by:
isVisiblein interfaceFTabSheet.Tab- Overrides:
isVisiblein classcom.vaadin.flow.component.Component- Returns:
- true for visible, false for hidden
-
setVisible
public void setVisible(boolean visible) Description copied from interface:FTabSheet.TabSets 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.- Specified by:
setVisiblein interfaceFTabSheet.Tab- Overrides:
setVisiblein classcom.vaadin.flow.component.Component- Parameters:
visible- true for visible, false for hidden
-
isClosable
public boolean isClosable()Description copied from interface:FTabSheet.TabReturns the closability status for the tab.- Specified by:
isClosablein interfaceFTabSheet.Tab- Returns:
- true if the tab is allowed to be closed by the end user, false for not allowing closing
-
setClosable
public void setClosable(boolean closable) Description copied from interface:FTabSheet.TabSets 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.- Specified by:
setClosablein interfaceFTabSheet.Tab- Parameters:
closable- true if the end user is allowed to close the tab, false for not allowing to close. Should default to false.
-
getDescription
Description copied from interface:FTabSheet.TabGets 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.- Specified by:
getDescriptionin interfaceFTabSheet.Tab- Returns:
- the description for the tab
-
setDescription
Description copied from interface:FTabSheet.TabSets 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.- Specified by:
setDescriptionin interfaceFTabSheet.Tab- Parameters:
description- the new description string for the tab.
-
getComponentError
Description copied from interface:FTabSheet.TabGets the current error message shown for the tab.- Specified by:
getComponentErrorin interfaceFTabSheet.Tab- See Also:
-
setComponentError
Description copied from interface:FTabSheet.TabSets 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.- Specified by:
setComponentErrorin interfaceFTabSheet.Tab- Parameters:
componentError- error message or null for none- See Also:
-
getComponent
public com.vaadin.flow.component.Component getComponent()Description copied from interface:FTabSheet.TabGet the component related to the Tab- Specified by:
getComponentin interfaceFTabSheet.Tab
-
setStyleName
Description copied from interface:FTabSheet.TabSets 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;}- Specified by:
setStyleNamein interfaceFTabSheet.Tab- Parameters:
styleName- the new style to be set for tab- See Also:
-
getStyleName
Description copied from interface:FTabSheet.TabGets the user-defined CSS style name of the tab. Built-in style names defined in Vaadin are not returned.- Specified by:
getStyleNamein interfaceFTabSheet.Tab- Returns:
- the style name or of the tab
- See Also:
-
setId
Description copied from interface:FTabSheet.TabAdds an unique id for component that is used in the client-side for testing purposes. Keeping identifiers unique is the responsibility of the programmer.- Specified by:
setIdin interfaceFTabSheet.Tab- Overrides:
setIdin classcom.vaadin.flow.component.Component- Parameters:
id- An alphanumeric id
-
getFId
Description copied from interface:FTabSheet.TabGets currently set debug identifier. In V7 this was getId(), but since Tab implementation overrides Flow's Tab component, it's renamed to getFId() to avoid conflicts.- Specified by:
getFIdin interfaceFTabSheet.Tab- Returns:
- current id, null if not set
-
setIcon
Description copied from interface:FTabSheet.TabSets the icon and alt text for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
icon- the icon to seticonAltText- the alt text
-
setIcon
Description copied from interface:FTabSheet.TabSets the icon and alt text for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
icon- the Flow icon to seticonAltText- the alt text
-
setIcon
Description copied from interface:FTabSheet.TabSets the icon and alt text for the tab.- Specified by:
setIconin interfaceFTabSheet.Tab- Parameters:
iconFactory- the icon factory to create the iconiconAltText- the alt text
-