Package io.jmix.ui.component
Interface Accordion
- All Superinterfaces:
Component,Component.BelongToFrame,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,ComponentContainer,HasComponents,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer
- All Known Implementing Classes:
AccordionImpl
@StudioComponent(caption="Accordion",
category="Containers",
xmlElement="accordion",
icon="io/jmix/ui/icon/container/accordion.svg",
canvasBehaviour=CONTAINER,
containerType=ACCORDION,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/containers/accordion.html")
public interface Accordion
extends ComponentContainer, Component.BelongToFrame, Component.HasCaption, Component.HasIcon, Component.Focusable, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
An accordion is a component similar to a
TabSheet, but with a vertical orientation and the selected component
presented between tabs.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classSelectedTabChangeEvents are fired when a selected tab is changed.static interfaceTab interface.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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionaddLazyTab(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.Gets selected tab.Gets tab with the provided id.getTabComponent(String name) Gets a component that is a content of the tab.getTabs()Gets all tabs.booleanvoidRemoves all tabs.voidRemoves tab.voidSets selected tab.voidsetSelectedTab(String name) Sets selected tab.voidsetTabCaptionsAsHtml(boolean tabCaptionsAsHtml) Sets whether HTML is allowed in the tab captions.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, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods 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, add, remove, remove, removeAllMethods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamMethods 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
-
NAME
- See Also:
-
-
Method Details
-
addTab
Adds a new tab to the component.- Parameters:
name- id of the new tabcomponent- a component that will be the content of the new tab- Returns:
- the new tab
-
addLazyTab
INTERNAL. Adds a new lazy tab to the component. -
removeTab
Removes tab.- Parameters:
name- id of the tab to remove
-
removeAllTabs
void removeAllTabs()Removes all tabs. -
getSelectedTab
Gets selected tab. May be null if the accordion does not contain tabs at all. -
setSelectedTab
Sets selected tab.- Parameters:
tab- tab instance
-
setSelectedTab
Sets selected tab.- Parameters:
name- tab id
-
getTab
Gets tab with the provided id.- Parameters:
name- tab id- Returns:
- tab instance
-
getTabComponent
Gets a component that is a content of the tab.- Parameters:
name- tab id- Returns:
- tab content
-
getTabs
Collection<Accordion.Tab> getTabs()Gets all tabs. -
isTabCaptionsAsHtml
boolean isTabCaptionsAsHtml()- Returns:
- true if the tab captions are rendered as HTML, false if rendered as plain text
-
setTabCaptionsAsHtml
Sets whether HTML is allowed in the tab captions.- Parameters:
tabCaptionsAsHtml- true if the tab captions are rendered as HTML, false if rendered as plain text
-
addSelectedTabChangeListener
Adds a listener that will be notified when a selected tab is changed.
-