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
Modifier and TypeInterfaceDescriptionstatic class
SelectedTabChangeEvents are fired when a selected tab is changed.static interface
Tab 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
-
Field Summary
Fields 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.boolean
void
Removes all tabs.void
Removes tab.void
Sets selected tab.void
setSelectedTab
(String name) Sets selected tab.void
setTabCaptionsAsHtml
(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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrame
Methods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndex
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSet
Methods inherited from interface io.jmix.ui.component.ComponentContainer
add, add, remove, remove, removeAll
Methods inherited from interface io.jmix.ui.component.HasComponents
focusFirstComponent, getComponent, getComponentNN, getComponents, getOwnComponent, getOwnComponents, getOwnComponentsStream
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
-
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.
-