public class AccordionImpl extends AbstractComponent<JmixAccordion> implements Accordion, UiPermissionAware, SupportsChildrenSelection
Modifier and Type | Class and Description |
---|---|
protected static class |
AccordionImpl.ComponentDescriptor |
protected class |
AccordionImpl.LazyTabChangeListener |
protected class |
AccordionImpl.Tab |
Accordion.SelectedTabChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected ComponentLoader.Context |
context |
protected IconResolver |
iconResolver |
protected Icons |
icons |
protected java.util.Set<com.vaadin.ui.Component> |
lazyTabs |
protected boolean |
postInitTaskAdded |
protected com.vaadin.shared.Registration |
selectedTabChangeListenerRegistration |
protected ScreenSettingsFacetResolver |
settingsFacetResolver |
protected java.util.Map<com.vaadin.ui.Component,AccordionImpl.ComponentDescriptor> |
tabMapping |
protected java.util.Map<java.lang.String,AccordionImpl.Tab> |
tabs |
protected UiComponents |
uiComponents |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
AccordionImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Component component)
Adds a component to this container.
|
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 childComponent)
Adds a new tab to the component.
|
void |
applyPermission(UiPermissionDescriptor permissionDescriptor)
Change state of subcomponent according to the
permissionValue . |
void |
attached()
Notifies all listeners that component has been attached.
|
protected JmixAccordion |
createComponent() |
protected AccordionImpl.LazyTabChangeListener |
createLazyTabChangeListener(ComponentContainer tabContent,
org.dom4j.Element descriptor,
ComponentLoader loader) |
protected CssLayout |
createLazyTabLayout() |
void |
detached()
Notifies all listeners that component has been detached.
|
protected void |
fireTabChanged() |
void |
focus()
Sets focus to this component
|
Component |
getComponent(java.lang.String id)
Gets a component belonging to the whole components tree below this container.
|
java.util.Collection<Component> |
getComponents()
Gets all components belonging to the whole components tree below this container.
|
java.lang.String |
getDescription() |
protected java.util.Set<com.vaadin.ui.Component> |
getLazyTabs() |
Component |
getOwnComponent(java.lang.String id)
Gets component directly owned by this container.
|
java.util.Collection<Component> |
getOwnComponents()
Gets all components directly owned by this container.
|
java.util.stream.Stream<Component> |
getOwnComponentsStream()
Gets stream of all components directly owned by this container.
|
AccordionImpl.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.
|
int |
getTabIndex()
Gets the tabulator index of the
HasTabIndex component. |
java.util.Collection<Accordion.Tab> |
getTabs()
Gets all tabs.
|
protected void |
initComponentTabChangeListener() |
protected void |
internalRemoveSelectedTabChangeListener(java.util.function.Consumer<Accordion.SelectedTabChangeEvent> listener) |
boolean |
isChildSelected(Component component) |
boolean |
isTabCaptionsAsHtml() |
protected void |
onSelectedTabChangeListener(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event) |
void |
remove(Component component)
Removes a component from this container.
|
void |
removeAll()
Removes all components from this container.
|
void |
removeAllTabs()
Removes all tabs.
|
void |
removeTab(java.lang.String name)
Removes tab.
|
void |
setChildSelected(Component childComponent) |
void |
setDebugId(java.lang.String id)
INTERNAL.
|
void |
setDescription(java.lang.String description)
Sets the component's description.
|
void |
setFrame(Frame frame) |
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.
|
void |
setTabIndex(int tabIndex)
Sets the tabulator index of the
Focusable component. |
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
add, remove
focusFirstComponent, getComponentNN
getFrame
getIcon, setIcon, setIconFromSet
isFocusable, setFocusable
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
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
@Autowired protected ScreenSettingsFacetResolver settingsFacetResolver
@Autowired protected UiComponents uiComponents
@Autowired protected IconResolver iconResolver
@Autowired protected Icons icons
protected boolean postInitTaskAdded
protected ComponentLoader.Context context
protected java.util.Map<java.lang.String,AccordionImpl.Tab> tabs
protected java.util.Map<com.vaadin.ui.Component,AccordionImpl.ComponentDescriptor> tabMapping
protected java.util.Set<com.vaadin.ui.Component> lazyTabs
protected com.vaadin.shared.Registration selectedTabChangeListenerRegistration
protected JmixAccordion createComponent()
protected java.util.Set<com.vaadin.ui.Component> getLazyTabs()
public void add(Component component)
ComponentContainer
add
in interface ComponentContainer
component
- a component to addpublic void remove(Component component)
ComponentContainer
remove
in interface ComponentContainer
component
- a component to removepublic void removeAll()
ComponentContainer
removeAll
in interface ComponentContainer
@Nullable public Component getOwnComponent(java.lang.String id)
HasComponents
getOwnComponent
in interface HasComponents
@Nullable public Component getComponent(java.lang.String id)
HasComponents
getComponent
in interface HasComponents
public java.util.Collection<Component> getOwnComponents()
HasComponents
getOwnComponents
in interface HasComponents
public java.util.stream.Stream<Component> getOwnComponentsStream()
HasComponents
getOwnComponentsStream
in interface HasComponents
public java.util.Collection<Component> getComponents()
HasComponents
getComponents
in interface HasComponents
@Nullable public java.lang.String getDescription()
getDescription
in interface Component.HasDescription
getDescription
in class AbstractComponent<JmixAccordion>
public void setDescription(@Nullable java.lang.String description)
Component.HasDescription
setDescription
in interface Component.HasDescription
setDescription
in class AbstractComponent<JmixAccordion>
description
- the new description to setpublic void applyPermission(UiPermissionDescriptor permissionDescriptor)
UiPermissionAware
permissionValue
.applyPermission
in interface UiPermissionAware
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 actionpublic void focus()
Component.Focusable
focus
in interface Component.Focusable
public int getTabIndex()
Component.Focusable
HasTabIndex
component.getTabIndex
in interface Component.Focusable
HasTabIndex
componentpublic void setTabIndex(int tabIndex)
Component.Focusable
Focusable
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.setTabIndex
in interface Component.Focusable
tabIndex
- tab indexpublic void setChildSelected(Component childComponent)
setChildSelected
in interface SupportsChildrenSelection
public boolean isChildSelected(Component component)
isChildSelected
in interface SupportsChildrenSelection
public void removeTab(java.lang.String name)
Accordion
public void removeAllTabs()
Accordion
removeAllTabs
in interface Accordion
public Accordion.Tab addTab(java.lang.String name, Component childComponent)
Accordion
public void setDebugId(@Nullable java.lang.String id)
HasDebugId
setDebugId
in interface HasDebugId
setDebugId
in class AbstractComponent<JmixAccordion>
public Accordion.Tab addLazyTab(java.lang.String name, org.dom4j.Element descriptor, ComponentLoader loader)
Accordion
addLazyTab
in interface Accordion
protected CssLayout createLazyTabLayout()
public void setFrame(@Nullable Frame frame)
setFrame
in interface Component.BelongToFrame
setFrame
in class AbstractComponent<JmixAccordion>
@Nullable public AccordionImpl.Tab getSelectedTab()
Accordion
getSelectedTab
in interface Accordion
public void setSelectedTab(Accordion.Tab tab)
Accordion
setSelectedTab
in interface Accordion
tab
- tab instancepublic void setSelectedTab(java.lang.String name)
Accordion
setSelectedTab
in interface Accordion
name
- tab id@Nullable public Accordion.Tab getTab(java.lang.String name)
Accordion
public Component getTabComponent(java.lang.String name)
Accordion
getTabComponent
in interface Accordion
name
- tab idpublic java.util.Collection<Accordion.Tab> getTabs()
Accordion
public boolean isTabCaptionsAsHtml()
isTabCaptionsAsHtml
in interface Accordion
public void setTabCaptionsAsHtml(boolean tabCaptionsAsHtml)
Accordion
setTabCaptionsAsHtml
in interface Accordion
tabCaptionsAsHtml
- true if the tab captions are rendered as HTML, false if rendered as plain textprotected void initComponentTabChangeListener()
protected void fireTabChanged()
public io.jmix.core.common.event.Subscription addSelectedTabChangeListener(java.util.function.Consumer<Accordion.SelectedTabChangeEvent> listener)
Accordion
addSelectedTabChangeListener
in interface Accordion
protected void onSelectedTabChangeListener(com.vaadin.ui.TabSheet.SelectedTabChangeEvent event)
protected void internalRemoveSelectedTabChangeListener(java.util.function.Consumer<Accordion.SelectedTabChangeEvent> listener)
public void attached()
AttachNotifier
attached
in interface AttachNotifier
attached
in class AbstractComponent<JmixAccordion>
public void detached()
AttachNotifier
detached
in interface AttachNotifier
detached
in class AbstractComponent<JmixAccordion>
protected AccordionImpl.LazyTabChangeListener createLazyTabChangeListener(ComponentContainer tabContent, org.dom4j.Element descriptor, ComponentLoader loader)