Package io.jmix.ui.component.impl
Class TabSheetImpl
- All Implemented Interfaces:
AttachNotifier,Component,Component.BelongToFrame,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,ComponentContainer,HasComponents,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,SupportsChildrenSelection,TabSheet,UiPermissionAware
public class TabSheetImpl
extends AbstractComponent<JmixTabSheet>
implements TabSheet, UiPermissionAware, SupportsChildrenSelection
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected classprotected classNested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.TabSheet
TabSheet.SelectedTabChangeEvent, TabSheet.TabCloseHandler -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ComponentLoader.Contextprotected IconResolverprotected Iconsprotected Set<com.vaadin.ui.Component>protected booleanprotected ScreenSettingsFacetResolverprotected Map<com.vaadin.ui.Component,TabSheetImpl.ComponentDescriptor> protected Map<String,TabSheetImpl.Tab> protected UiComponentsFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a component to this container.addLazyTab(String name, org.dom4j.Element descriptor, ComponentLoader loader) INTERNAL.Adds a listener that will be notified when a selected tab is changed.Adds a new tab to the component.voidapplyPermission(UiPermissionDescriptor permissionDescriptor) Change state of subcomponent according to thepermissionValue.voidattached()Notifies all listeners that component has been attached.protected voidprotected JmixTabSheetprotected TabSheetImpl.LazyTabChangeListenercreateLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader) protected CssLayoutvoiddetached()Notifies all listeners that component has been detached.protected voidvoidfocus()Sets focus to this componentgetComponent(String id) Gets a component belonging to the whole components tree below this container.Gets all components belonging to the whole components tree below this container.protected Set<com.vaadin.ui.Component>Gets component directly owned by this container.Gets all components directly owned by this container.Gets stream of all components directly owned by this container.Gets selected tab.Gets tab with the provided id.getTabComponent(String name) Gets a component that is a content of the tab.intGets the tabulator index of theHasTabIndexcomponent.getTabs()Gets all tabs.booleanisChildSelected(Component component) booleanbooleanvoidRemoves a component from this container.voidRemoves all components from this container.voidRemoves all tabs.voidRemoves a tab.voidsetChildSelected(Component childComponent) voidsetDebugId(String id) INTERNAL.voidvoidSets selected tab.voidsetSelectedTab(String name) Sets selected tab.voidsetTabCaptionsAsHtml(boolean tabCaptionsAsHtml) Sets whether HTML is allowed in the tab captions.voidsetTabIndex(int tabIndex) Sets the tabulator index of theFocusablecomponent.voidsetTabsVisible(boolean tabsVisible) Sets whether the tab selection part should be shown in the UI.Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescription, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrameMethods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusableMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.ComponentContainer
add, removeMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNNMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
settingsFacetResolver
-
uiComponents
-
iconResolver
-
icons
-
postInitTaskAdded
protected boolean postInitTaskAdded -
componentTabChangeListenerInitialized
protected boolean componentTabChangeListenerInitialized -
context
-
tabs
-
tabMapping
-
lazyTabs
-
-
Constructor Details
-
TabSheetImpl
public TabSheetImpl()
-
-
Method Details
-
createComponent
-
getLazyTabs
-
add
Description copied from interface:ComponentContainerAdds a component to this container.- Specified by:
addin interfaceComponentContainer- Parameters:
component- a component to add
-
remove
Description copied from interface:ComponentContainerRemoves a component from this container.- Specified by:
removein interfaceComponentContainer- Parameters:
component- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainerRemoves all components from this container.- Specified by:
removeAllin interfaceComponentContainer
-
getOwnComponent
Description copied from interface:HasComponentsGets component directly owned by this container.- Specified by:
getOwnComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponentsGets a component belonging to the whole components tree below this container.- Specified by:
getComponentin interfaceHasComponents- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponentsGets all components directly owned by this container.- Specified by:
getOwnComponentsin interfaceHasComponents- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponentsGets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStreamin interfaceHasComponents- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponentsGets all components belonging to the whole components tree below this container.- Specified by:
getComponentsin interfaceHasComponents- Returns:
- all components belonging to the whole components tree below this container
-
applyPermission
Description copied from interface:UiPermissionAwareChange state of subcomponent according to thepermissionValue.- Specified by:
applyPermissionin interfaceUiPermissionAware- Parameters:
permissionDescriptor- descriptor which contains id of subcomponent and UI permission value which will be applied to this subcomponent or ids of subcomponent and its action and UI permission value which will be applied to subcomponent's action
-
focus
public void focus()Description copied from interface:Component.FocusableSets focus to this component- Specified by:
focusin interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.FocusableGets the tabulator index of theHasTabIndexcomponent.- Specified by:
getTabIndexin interfaceComponent.Focusable- Returns:
- tab index set for the
HasTabIndexcomponent
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.FocusableSets the tabulator index of theFocusablecomponent. The tab index property is used to specify the order in which the fields are focused when the user presses the Tab key. Components with a defined tab index are focused sequentially first, and then the components with no tab index.- Specified by:
setTabIndexin interfaceComponent.Focusable- Parameters:
tabIndex- tab index
-
setChildSelected
- Specified by:
setChildSelectedin interfaceSupportsChildrenSelection
-
isChildSelected
- Specified by:
isChildSelectedin interfaceSupportsChildrenSelection
-
addTab
Description copied from interface:TabSheetAdds a new tab to the component. -
setDebugId
Description copied from interface:HasDebugIdINTERNAL. Managed by debug Id system.- Specified by:
setDebugIdin interfaceHasDebugId- Overrides:
setDebugIdin classAbstractComponent<JmixTabSheet>
-
addLazyTab
Description copied from interface:TabSheetINTERNAL. Adds a new lazy tab to the component.- Specified by:
addLazyTabin interfaceTabSheet- Parameters:
name- id of the new tabdescriptor- the element descriptorloader- the component loader- Returns:
- the new tab
-
createLazyTabLayout
-
removeTab
Description copied from interface:TabSheetRemoves a tab. -
removeAllTabs
public void removeAllTabs()Description copied from interface:TabSheetRemoves all tabs.- Specified by:
removeAllTabsin interfaceTabSheet
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<JmixTabSheet>
-
getSelectedTab
Description copied from interface:TabSheetGets selected tab. May be null if the tabsheet does not contain tabs at all.- Specified by:
getSelectedTabin interfaceTabSheet- Returns:
- a selected tab instance
-
setSelectedTab
Description copied from interface:TabSheetSets selected tab.- Specified by:
setSelectedTabin interfaceTabSheet- Parameters:
tab- tab instance
-
setSelectedTab
Description copied from interface:TabSheetSets selected tab.- Specified by:
setSelectedTabin interfaceTabSheet- Parameters:
name- tab id
-
getTab
Description copied from interface:TabSheetGets tab with the provided id. -
getTabComponent
Description copied from interface:TabSheetGets a component that is a content of the tab.- Specified by:
getTabComponentin interfaceTabSheet- Parameters:
name- tab id- Returns:
- tab content
-
getTabs
Description copied from interface:TabSheetGets all tabs. -
isTabCaptionsAsHtml
public boolean isTabCaptionsAsHtml()- Specified by:
isTabCaptionsAsHtmlin interfaceTabSheet- Returns:
- true if the tab captions are rendered as HTML, false if rendered as plain text
-
setTabCaptionsAsHtml
public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml) Description copied from interface:TabSheetSets whether HTML is allowed in the tab captions.- Specified by:
setTabCaptionsAsHtmlin interfaceTabSheet- Parameters:
tabCaptionsAsHtml- true if the tab captions are rendered as HTML, false if rendered as plain text
-
isTabsVisible
public boolean isTabsVisible()- Specified by:
isTabsVisiblein interfaceTabSheet- Returns:
- true if the tabs are shown in the UI, false otherwise
-
setTabsVisible
public void setTabsVisible(boolean tabsVisible) Description copied from interface:TabSheetSets whether the tab selection part should be shown in the UI.- Specified by:
setTabsVisiblein interfaceTabSheet- Parameters:
tabsVisible- true if the tabs should be shown in the UI, false otherwise
-
checkFrameInitialization
protected void checkFrameInitialization() -
addSelectedTabChangeListener
public Subscription addSelectedTabChangeListener(Consumer<TabSheet.SelectedTabChangeEvent> listener) Description copied from interface:TabSheetAdds a listener that will be notified when a selected tab is changed.- Specified by:
addSelectedTabChangeListenerin interfaceTabSheet- Parameters:
listener- a listener to add- Returns:
- a registration object for removing an event listener
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<JmixTabSheet>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<JmixTabSheet>
-
fireTabChanged
-
createLazyTabChangeListener
protected TabSheetImpl.LazyTabChangeListener createLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader)
-