Package io.jmix.ui.component.impl
Class AccordionImpl
- All Implemented Interfaces:
Accordion
,AttachNotifier
,Component
,Component.BelongToFrame
,Component.Focusable
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,ComponentContainer
,HasComponents
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,SupportsChildrenSelection
,UiPermissionAware
public class AccordionImpl
extends AbstractComponent<JmixAccordion>
implements Accordion, UiPermissionAware, SupportsChildrenSelection
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
protected class
protected class
Nested classes/interfaces inherited from interface io.jmix.ui.component.Accordion
Accordion.SelectedTabChangeEvent
Nested 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected ComponentLoader.Context
protected IconResolver
protected Icons
protected Set<com.vaadin.ui.Component>
protected boolean
protected com.vaadin.shared.Registration
protected ScreenSettingsFacetResolver
protected Map<com.vaadin.ui.Component,
AccordionImpl.ComponentDescriptor> protected Map<String,
AccordionImpl.Tab> protected UiComponents
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds 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.void
applyPermission
(UiPermissionDescriptor permissionDescriptor) Change state of subcomponent according to thepermissionValue
.void
attached()
Notifies all listeners that component has been attached.protected JmixAccordion
protected AccordionImpl.LazyTabChangeListener
createLazyTabChangeListener
(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader) protected CssLayout
void
detached()
Notifies all listeners that component has been detached.protected void
void
focus()
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.int
Gets the tabulator index of theHasTabIndex
component.getTabs()
Gets all tabs.protected void
protected void
boolean
isChildSelected
(Component component) boolean
protected void
onSelectedTabChangeListener
(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) void
Removes a component from this container.void
Removes all components from this container.void
Removes all tabs.void
Removes tab.void
setChildSelected
(Component childComponent) void
setDebugId
(String id) INTERNAL.void
setDescription
(String description) Sets the component's description.void
void
Sets selected tab.void
setSelectedTab
(String name) 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 theFocusable
component.Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, 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, setDescriptionAsHtml, setEnabled, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
isFocusable, setFocusable
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, remove
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponentNN
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
settingsFacetResolver
-
uiComponents
-
iconResolver
-
icons
-
postInitTaskAdded
protected boolean postInitTaskAdded -
context
-
tabs
-
tabMapping
-
lazyTabs
-
selectedTabChangeListenerRegistration
protected com.vaadin.shared.Registration selectedTabChangeListenerRegistration
-
-
Constructor Details
-
AccordionImpl
public AccordionImpl()
-
-
Method Details
-
createComponent
-
getLazyTabs
-
add
Description copied from interface:ComponentContainer
Adds a component to this container.- Specified by:
add
in interfaceComponentContainer
- Parameters:
component
- a component to add
-
remove
Description copied from interface:ComponentContainer
Removes a component from this container.- Specified by:
remove
in interfaceComponentContainer
- Parameters:
component
- a component to remove
-
removeAll
public void removeAll()Description copied from interface:ComponentContainer
Removes all components from this container.- Specified by:
removeAll
in interfaceComponentContainer
-
getOwnComponent
Description copied from interface:HasComponents
Gets component directly owned by this container.- Specified by:
getOwnComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getComponent
Description copied from interface:HasComponents
Gets a component belonging to the whole components tree below this container.- Specified by:
getComponent
in interfaceHasComponents
- Returns:
- component or null if not found
-
getOwnComponents
Description copied from interface:HasComponents
Gets all components directly owned by this container.- Specified by:
getOwnComponents
in interfaceHasComponents
- Returns:
- all components directly owned by this container
-
getOwnComponentsStream
Description copied from interface:HasComponents
Gets stream of all components directly owned by this container.- Specified by:
getOwnComponentsStream
in interfaceHasComponents
- Returns:
- stream of all components directly owned by this container
-
getComponents
Description copied from interface:HasComponents
Gets all components belonging to the whole components tree below this container.- Specified by:
getComponents
in interfaceHasComponents
- Returns:
- all components belonging to the whole components tree below this container
-
getDescription
- Specified by:
getDescription
in interfaceComponent.HasDescription
- Overrides:
getDescription
in classAbstractComponent<JmixAccordion>
- Returns:
- the components description, used in tooltips
-
setDescription
Description copied from interface:Component.HasDescription
Sets the component's description.- Specified by:
setDescription
in interfaceComponent.HasDescription
- Overrides:
setDescription
in classAbstractComponent<JmixAccordion>
- Parameters:
description
- the new description to set
-
applyPermission
Description copied from interface:UiPermissionAware
Change state of subcomponent according to thepermissionValue
.- Specified by:
applyPermission
in 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.Focusable
Sets focus to this component- Specified by:
focus
in interfaceComponent.Focusable
-
getTabIndex
public int getTabIndex()Description copied from interface:Component.Focusable
Gets the tabulator index of theHasTabIndex
component.- Specified by:
getTabIndex
in interfaceComponent.Focusable
- Returns:
- tab index set for the
HasTabIndex
component
-
setTabIndex
public void setTabIndex(int tabIndex) Description copied from interface:Component.Focusable
Sets the tabulator index of theFocusable
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.- Specified by:
setTabIndex
in interfaceComponent.Focusable
- Parameters:
tabIndex
- tab index
-
setChildSelected
- Specified by:
setChildSelected
in interfaceSupportsChildrenSelection
-
isChildSelected
- Specified by:
isChildSelected
in interfaceSupportsChildrenSelection
-
removeTab
Description copied from interface:Accordion
Removes tab. -
removeAllTabs
public void removeAllTabs()Description copied from interface:Accordion
Removes all tabs.- Specified by:
removeAllTabs
in interfaceAccordion
-
addTab
Description copied from interface:Accordion
Adds a new tab to the component. -
setDebugId
Description copied from interface:HasDebugId
INTERNAL. Managed by debug Id system.- Specified by:
setDebugId
in interfaceHasDebugId
- Overrides:
setDebugId
in classAbstractComponent<JmixAccordion>
-
addLazyTab
Description copied from interface:Accordion
INTERNAL. Adds a new lazy tab to the component.- Specified by:
addLazyTab
in interfaceAccordion
-
createLazyTabLayout
-
setFrame
- Specified by:
setFrame
in interfaceComponent.BelongToFrame
- Overrides:
setFrame
in classAbstractComponent<JmixAccordion>
-
getSelectedTab
Description copied from interface:Accordion
Gets selected tab. May be null if the accordion does not contain tabs at all.- Specified by:
getSelectedTab
in interfaceAccordion
-
setSelectedTab
Description copied from interface:Accordion
Sets selected tab.- Specified by:
setSelectedTab
in interfaceAccordion
- Parameters:
tab
- tab instance
-
setSelectedTab
Description copied from interface:Accordion
Sets selected tab.- Specified by:
setSelectedTab
in interfaceAccordion
- Parameters:
name
- tab id
-
getTab
Description copied from interface:Accordion
Gets tab with the provided id. -
getTabComponent
Description copied from interface:Accordion
Gets a component that is a content of the tab.- Specified by:
getTabComponent
in interfaceAccordion
- Parameters:
name
- tab id- Returns:
- tab content
-
getTabs
Description copied from interface:Accordion
Gets all tabs. -
isTabCaptionsAsHtml
public boolean isTabCaptionsAsHtml()- Specified by:
isTabCaptionsAsHtml
in interfaceAccordion
- 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:Accordion
Sets whether HTML is allowed in the tab captions.- Specified by:
setTabCaptionsAsHtml
in interfaceAccordion
- Parameters:
tabCaptionsAsHtml
- true if the tab captions are rendered as HTML, false if rendered as plain text
-
initComponentTabChangeListener
protected void initComponentTabChangeListener() -
fireTabChanged
protected void fireTabChanged() -
addSelectedTabChangeListener
public Subscription addSelectedTabChangeListener(Consumer<Accordion.SelectedTabChangeEvent> listener) Description copied from interface:Accordion
Adds a listener that will be notified when a selected tab is changed.- Specified by:
addSelectedTabChangeListener
in interfaceAccordion
-
onSelectedTabChangeListener
protected void onSelectedTabChangeListener(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) -
internalRemoveSelectedTabChangeListener
protected void internalRemoveSelectedTabChangeListener(Consumer<Accordion.SelectedTabChangeEvent> listener) -
attached
public void attached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been attached.- Specified by:
attached
in interfaceAttachNotifier
- Overrides:
attached
in classAbstractComponent<JmixAccordion>
-
detached
public void detached()Description copied from interface:AttachNotifier
Notifies all listeners that component has been detached.- Specified by:
detached
in interfaceAttachNotifier
- Overrides:
detached
in classAbstractComponent<JmixAccordion>
-
createLazyTabChangeListener
protected AccordionImpl.LazyTabChangeListener createLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader)
-