@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%/backoffice-ui/vcl/containers/accordion.html") public interface Accordion extends ComponentContainer, Component.BelongToFrame, Component.HasCaption, Component.HasIcon, Component.Focusable, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
TabSheet, but with a vertical orientation and the selected component
presented between tabs.| Modifier and Type | Interface and Description |
|---|---|
static class |
Accordion.SelectedTabChangeEvent
SelectedTabChangeEvents are fired when a selected tab is changed.
|
static interface |
Accordion.Tab
Tab interface.
|
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperHasContextHelp.ContextHelpIconClickEvent| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE| Modifier and Type | Method and Description |
|---|---|
Accordion.Tab |
addLazyTab(java.lang.String name,
org.dom4j.Element descriptor,
ComponentLoader loader)
INTERNAL.
|
io.jmix.core.common.event.Subscription |
addSelectedTabChangeListener(java.util.function.Consumer<Accordion.SelectedTabChangeEvent> listener)
Adds a listener that will be notified when a selected tab is changed.
|
Accordion.Tab |
addTab(java.lang.String name,
Component component)
Adds a new tab to the component.
|
Accordion.Tab |
getSelectedTab()
Gets selected tab.
|
Accordion.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.
|
java.util.Collection<Accordion.Tab> |
getTabs()
Gets all tabs.
|
boolean |
isTabCaptionsAsHtml() |
void |
removeAllTabs()
Removes all tabs.
|
void |
removeTab(java.lang.String name)
Removes tab.
|
void |
setSelectedTab(Accordion.Tab tab)
Sets selected tab.
|
void |
setSelectedTab(java.lang.String name)
Sets selected tab.
|
void |
setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
Sets whether HTML is allowed in the tab captions.
|
add, add, remove, remove, removeAllfocusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStreamgetFrame, setFramegetIcon, setIcon, setIconFromSetfocus, getTabIndex, isFocusable, setFocusable, setTabIndexaddStyleName, 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, withUnwrappedCompositiongetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlisHtmlSanitizerEnabled, setHtmlSanitizerEnabledstatic final java.lang.String NAME
Accordion.Tab addTab(java.lang.String name, Component component)
name - id of the new tabcomponent - a component that will be the content of the new tabAccordion.Tab addLazyTab(java.lang.String name, org.dom4j.Element descriptor, ComponentLoader loader)
void removeTab(java.lang.String name)
name - id of the tab to removevoid removeAllTabs()
@Nullable Accordion.Tab getSelectedTab()
void setSelectedTab(Accordion.Tab tab)
tab - tab instancevoid setSelectedTab(java.lang.String name)
name - tab id@Nullable Accordion.Tab getTab(java.lang.String name)
name - tab idComponent getTabComponent(java.lang.String name)
name - tab idjava.util.Collection<Accordion.Tab> getTabs()
boolean isTabCaptionsAsHtml()
@StudioProperty(defaultValue="false") void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
tabCaptionsAsHtml - true if the tab captions are rendered as HTML, false if rendered as plain textio.jmix.core.common.event.Subscription addSelectedTabChangeListener(java.util.function.Consumer<Accordion.SelectedTabChangeEvent> listener)