public class TabSheetImpl extends AbstractComponent<JmixTabSheet> implements TabSheet, UiPermissionAware, SupportsChildrenSelection
Modifier and Type | Class and Description |
---|---|
protected static class |
TabSheetImpl.ComponentDescriptor |
protected class |
TabSheetImpl.DefaultCloseHandler |
protected class |
TabSheetImpl.LazyTabChangeListener |
protected class |
TabSheetImpl.Tab |
TabSheet.SelectedTabChangeEvent, TabSheet.TabCloseHandler
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected boolean |
componentTabChangeListenerInitialized |
protected ComponentLoader.Context |
context |
protected IconResolver |
iconResolver |
protected Icons |
icons |
protected java.util.Set<com.vaadin.ui.Component> |
lazyTabs |
protected boolean |
postInitTaskAdded |
protected ScreenSettingsFacetResolver |
settingsFacetResolver |
protected java.util.Map<com.vaadin.ui.Component,TabSheetImpl.ComponentDescriptor> |
tabMapping |
protected java.util.Map<java.lang.String,TabSheetImpl.Tab> |
tabs |
protected UiComponents |
uiComponents |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
TabSheetImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component component)
Adds a component to this container.
|
TabSheet.Tab |
addLazyTab(java.lang.String name,
org.dom4j.Element descriptor,
ComponentLoader loader)
INTERNAL.
|
io.jmix.core.common.event.Subscription |
addSelectedTabChangeListener(java.util.function.Consumer<TabSheet.SelectedTabChangeEvent> listener)
Adds a listener that will be notified when a selected tab is changed.
|
TabSheet.Tab |
addTab(java.lang.String name,
Component childComponent)
Adds a new tab to the component.
|
void |
applyPermission(UiPermissionDescriptor permissionDescriptor)
Change state of subcomponent according to the
permissionValue . |
void |
attached()
Notifies all listeners that component has been attached.
|
protected void |
checkFrameInitialization() |
protected JmixTabSheet |
createComponent() |
protected TabSheetImpl.LazyTabChangeListener |
createLazyTabChangeListener(ComponentContainer tabContent,
org.dom4j.Element descriptor,
ComponentLoader loader) |
protected CssLayout |
createLazyTabLayout() |
void |
detached()
Notifies all listeners that component has been detached.
|
protected void |
fireTabChanged(TabSheet.SelectedTabChangeEvent event) |
void |
focus()
Sets focus to this component
|
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
protected java.util.Set<com.vaadin.ui.Component> |
getLazyTabs() |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
TabSheetImpl.Tab |
getSelectedTab()
Gets selected tab.
|
TabSheet.Tab |
getTab(java.lang.String name)
Gets tab with the provided id.
|
Component |
getTabComponent(java.lang.String name)
Gets a component that is a content of the tab.
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
java.util.Collection<TabSheet.Tab> |
getTabs()
Gets all tabs.
|
boolean |
isChildSelected(Component component) |
boolean |
isTabCaptionsAsHtml() |
boolean |
isTabsVisible() |
void |
remove(Component component)
Removes a component from this container.
|
void |
removeAll()
Removes all components from this container.
|
void |
removeAllTabs()
Removes all tabs.
|
void |
removeTab(java.lang.String name)
Removes a tab.
|
void |
setChildSelected(Component childComponent) |
void |
setDebugId(java.lang.String id)
INTERNAL.
|
void |
setFrame(Frame frame) |
void |
setSelectedTab(java.lang.String name)
Sets selected tab.
|
void |
setSelectedTab(TabSheet.Tab tab)
Sets selected tab.
|
void |
setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
Sets whether HTML is allowed in the tab captions.
|
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
void |
setTabsVisible(boolean tabsVisible)
Sets whether the tab selection part should be shown in the UI.
|
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, withUnwrappedComposition
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, remove
focusFirstComponent, getComponentNN
getFrame
getIcon, setIcon, setIconFromSet
isFocusable, setFocusable
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, withUnwrappedComposition
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
@Autowired protected ScreenSettingsFacetResolver settingsFacetResolver
@Autowired protected UiComponents uiComponents
@Autowired protected IconResolver iconResolver
@Autowired protected Icons icons
protected boolean postInitTaskAdded
protected boolean componentTabChangeListenerInitialized
protected ComponentLoader.Context context
protected java.util.Map<java.lang.String,TabSheetImpl.Tab> tabs
protected java.util.Map<com.vaadin.ui.Component,TabSheetImpl.ComponentDescriptor> tabMapping
protected java.util.Set<com.vaadin.ui.Component> lazyTabs
protected JmixTabSheet createComponent()
protected java.util.Set<com.vaadin.ui.Component> getLazyTabs()
public void add(Component component)
ComponentContainer
add
in interface ComponentContainer
component
- a component to addpublic void remove(Component component)
ComponentContainer
remove
in interface ComponentContainer
component
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
@Nullable public Component getOwnComponent(java.lang.String id)
HasComponents
getOwnComponent
in interface HasComponents
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
public java.util.Collection<Component> getOwnComponents()
HasComponents
getOwnComponents
in interface HasComponents
public java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponents
getOwnComponentsStream
in interface HasComponents
public java.util.Collection<Component> getComponents()
HasComponents
getComponents
in interface HasComponents
public void applyPermission(UiPermissionDescriptor permissionDescriptor)
UiPermissionAware
permissionValue
.applyPermission
in interface UiPermissionAware
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 actionpublic void focus()
Component.Focusable
focus
in interface Component.Focusable
public int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
component.
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.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexpublic void setChildSelected(Component childComponent)
setChildSelected
in interface SupportsChildrenSelection
public boolean isChildSelected(Component component)
isChildSelected
in interface SupportsChildrenSelection
public TabSheet.Tab addTab(java.lang.String name, Component childComponent)
TabSheet
public void setDebugId(@Nullable java.lang.String id)
HasDebugId
setDebugId
in interface HasDebugId
setDebugId
in class AbstractComponent<JmixTabSheet>
public TabSheet.Tab addLazyTab(java.lang.String name, org.dom4j.Element descriptor, ComponentLoader loader)
TabSheet
addLazyTab
in interface TabSheet
name
- id of the new tabdescriptor
- the element descriptorloader
- the component loaderprotected CssLayout createLazyTabLayout()
public void removeTab(java.lang.String name)
TabSheet
public void removeAllTabs()
TabSheet
removeAllTabs
in interface TabSheet
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<JmixTabSheet>
@Nullable public TabSheetImpl.Tab getSelectedTab()
TabSheet
getSelectedTab
in interface TabSheet
public void setSelectedTab(TabSheet.Tab tab)
TabSheet
setSelectedTab
in interface TabSheet
tab
- tab instancepublic void setSelectedTab(java.lang.String name)
TabSheet
setSelectedTab
in interface TabSheet
name
- tab id@Nullable public TabSheet.Tab getTab(java.lang.String name)
TabSheet
public Component getTabComponent(java.lang.String name)
TabSheet
getTabComponent
in interface TabSheet
name
- tab idpublic java.util.Collection<TabSheet.Tab> getTabs()
TabSheet
public boolean isTabCaptionsAsHtml()
isTabCaptionsAsHtml
in interface TabSheet
public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
TabSheet
setTabCaptionsAsHtml
in interface TabSheet
tabCaptionsAsHtml
- true if the tab captions are rendered as HTML, false if rendered as plain textpublic boolean isTabsVisible()
isTabsVisible
in interface TabSheet
public void setTabsVisible(boolean tabsVisible)
TabSheet
setTabsVisible
in interface TabSheet
tabsVisible
- true if the tabs should be shown in the UI, false otherwiseprotected void checkFrameInitialization()
public io.jmix.core.common.event.Subscription addSelectedTabChangeListener(java.util.function.Consumer<TabSheet.SelectedTabChangeEvent> listener)
TabSheet
addSelectedTabChangeListener
in interface TabSheet
listener
- a listener to addpublic void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<JmixTabSheet>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<JmixTabSheet>
protected void fireTabChanged(TabSheet.SelectedTabChangeEvent event)
protected TabSheetImpl.LazyTabChangeListener createLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader)