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
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected classprotected classNested classes/interfaces inherited from interface io.jmix.ui.component.Accordion
Accordion.SelectedTabChangeEventNested 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.ContextHelpIconClickEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ComponentLoader.Contextprotected IconResolverprotected Iconsprotected Set<com.vaadin.ui.Component>protected booleanprotected com.vaadin.shared.Registrationprotected ScreenSettingsFacetResolverprotected Map<com.vaadin.ui.Component,AccordionImpl.ComponentDescriptor> protected Map<String,AccordionImpl.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 JmixAccordionprotected AccordionImpl.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.protected voidprotected voidbooleanisChildSelected(Component component) booleanprotected voidonSelectedTabChangeListener(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) voidRemoves a component from this container.voidRemoves all components from this container.voidRemoves all tabs.voidRemoves tab.voidsetChildSelected(Component childComponent) voidsetDebugId(String id) INTERNAL.voidsetDescription(String description) Sets the component's description.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.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, 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.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 -
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: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
-
getDescription
- Specified by:
getDescriptionin interfaceComponent.HasDescription- Overrides:
getDescriptionin classAbstractComponent<JmixAccordion>- Returns:
- the components description, used in tooltips
-
setDescription
Description copied from interface:Component.HasDescriptionSets the component's description.- Specified by:
setDescriptionin interfaceComponent.HasDescription- Overrides:
setDescriptionin classAbstractComponent<JmixAccordion>- Parameters:
description- the new description to set
-
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
-
removeTab
Description copied from interface:AccordionRemoves tab. -
removeAllTabs
public void removeAllTabs()Description copied from interface:AccordionRemoves all tabs.- Specified by:
removeAllTabsin interfaceAccordion
-
addTab
Description copied from interface:AccordionAdds a new tab to the component. -
setDebugId
Description copied from interface:HasDebugIdINTERNAL. Managed by debug Id system.- Specified by:
setDebugIdin interfaceHasDebugId- Overrides:
setDebugIdin classAbstractComponent<JmixAccordion>
-
addLazyTab
Description copied from interface:AccordionINTERNAL. Adds a new lazy tab to the component.- Specified by:
addLazyTabin interfaceAccordion
-
createLazyTabLayout
-
setFrame
- Specified by:
setFramein interfaceComponent.BelongToFrame- Overrides:
setFramein classAbstractComponent<JmixAccordion>
-
getSelectedTab
Description copied from interface:AccordionGets selected tab. May be null if the accordion does not contain tabs at all.- Specified by:
getSelectedTabin interfaceAccordion
-
setSelectedTab
Description copied from interface:AccordionSets selected tab.- Specified by:
setSelectedTabin interfaceAccordion- Parameters:
tab- tab instance
-
setSelectedTab
Description copied from interface:AccordionSets selected tab.- Specified by:
setSelectedTabin interfaceAccordion- Parameters:
name- tab id
-
getTab
Description copied from interface:AccordionGets tab with the provided id. -
getTabComponent
Description copied from interface:AccordionGets a component that is a content of the tab.- Specified by:
getTabComponentin interfaceAccordion- Parameters:
name- tab id- Returns:
- tab content
-
getTabs
Description copied from interface:AccordionGets all tabs. -
isTabCaptionsAsHtml
public boolean isTabCaptionsAsHtml()- Specified by:
isTabCaptionsAsHtmlin 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:AccordionSets whether HTML is allowed in the tab captions.- Specified by:
setTabCaptionsAsHtmlin 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:AccordionAdds a listener that will be notified when a selected tab is changed.- Specified by:
addSelectedTabChangeListenerin 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:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<JmixAccordion>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<JmixAccordion>
-
createLazyTabChangeListener
protected AccordionImpl.LazyTabChangeListener createLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader)
-