Package io.jmix.ui.component.impl
Class TreeImpl<E>
- All Implemented Interfaces:
ActionsHolder,AttachNotifier,Component,Component.BelongToFrame,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,Component.HasXmlDescriptor,Component.Wrapper,HasButtonsPanel,HasContextHelp,HasDebugId,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasInnerComponents,HasItemCaptionProvider<E>,HasSubParts,ListComponent<E>,LookupComponent<E>,LookupComponent.LookupSelectionChangeNotifier<E>,SecuredActionsHolder,Tree<E>,TreeSourceEventsDelegate<E>,org.springframework.beans.factory.InitializingBean
public class TreeImpl<E>
extends AbstractComponent<JmixTree<E>>
implements Tree<E>, LookupComponent.LookupSelectionChangeNotifier<E>, SecuredActionsHolder, HasInnerComponents, org.springframework.beans.factory.InitializingBean, TreeSourceEventsDelegate<E>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classprotected classNested 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.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.LookupComponent
LookupComponent.LookupSelectionChangeEvent<T>, LookupComponent.LookupSelectionChangeNotifier<T>Nested classes/interfaces inherited from interface io.jmix.ui.component.Tree
Tree.CollapseEvent<E>, Tree.ExpandEvent<E>, Tree.SelectionEvent<E>, Tree.SelectionMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AccessManagerprotected Actionsprotected final ActionsPermissionsprotected ButtonsPanelprotected com.vaadin.shared.Registrationprotected TreeImpl<E>.TreeCompositionprotected TreeContextMenu<E>protected final List<AbstractDataGrid.ActionMenuItemWrapper>protected TreeDataProvider<E>protected Actionprotected Actionprotected com.vaadin.shared.Registrationprotected Stringprotected IconResolverprotected com.vaadin.shared.Registrationprotected Metadataprotected MetadataToolsprotected Tree.SelectionModeprotected final ShortcutsDelegate<com.vaadin.event.ShortcutListener>protected booleanprotected com.vaadin.ui.StyleGenerator<E>protected com.vaadin.ui.HorizontalLayoutprotected UiTestIdsSupportFields 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 TypeMethodDescriptionvoidAdd an action to the componentvoidAdd an action to the component with index.addCollapseListener(Consumer<Tree.CollapseEvent<E>> listener) Registers a new collapse listener.addExpandListener(Consumer<Tree.ExpandEvent<E>> listener) Registers a new expand listener.Adds a listener that invoked when lookup selected items set is changed.addSelectionListener(Consumer<Tree.SelectionEvent<E>> listener) Registers a new selection listener.voidaddStyleProvider(Function<? super E, String> styleProvider) Adds a style provider for tree items.voidprotected voidattachAction(Action action) voidattached()Notifies all listeners that component has been attached.voidCollapses all tree nodes that are lower in level than a given item.voidCollapses tree nodes.protected TreeImpl<E>.TreeCompositionprotected AbstractDataGrid.ActionMenuItemWrappercreateContextMenuItem(Action action) protected TreeDataProvider<E>createDataGridDataProvider(TreeItems<E> treeItems) protected com.vaadin.data.provider.DataProvider<E,?> protected ShortcutListenerDelegateprotected ShortcutsDelegate<com.vaadin.event.ShortcutListener>protected com.vaadin.ui.HorizontalLayoutvoiddetached()Notifies all listeners that component has been detached.voidExpands all tree nodes that are higher in level that a given item.voidExpands all tree nodes.voidexpandUpTo(int level) Expands tree including specified levelprotected voidfireSelectionEvent(com.vaadin.event.selection.SelectionEvent<E> e) voidfocus()Sets focus to this componentprotected StringgenerateItemCaption(E item) com.vaadin.ui.ComponentGets the item description generator.protected StringgetGeneratedStyle(E item) protected com.vaadin.ui.ComponentgetItemDetails(E entity) protected com.vaadin.server.ResourcegetItemIcon(E item) getItems()protected StringgetRowDescription(E item) Returns a set of entity instances corresponding to the selected rows of the list component.Returns an instance of entity corresponding to the selected row of the list component.Styles implementation is client-type-specific.intGets the tabulator index of theHasTabIndexcomponent.protected voidprotected voidinitComponent(JmixTree<E> component) protected voidinitComponentComposition(TreeImpl<E>.TreeComposition composition) protected voidbooleanbooleanbooleanisDetailsVisible(E entity) Checks whether details are visible for the given item.booleanisExpanded(Object itemId) Returns whether an item with given itemId is expanded or collapsed.booleanprotected voidonItemClick(com.vaadin.ui.Tree.ItemClick<E> event) protected voidonItemCollapse(com.vaadin.event.CollapseEvent<E> e) protected voidonItemExpand(com.vaadin.event.ExpandEvent<E> e) protected voidonSelectionChange(com.vaadin.event.selection.SelectionEvent<E> event) protected voidvoidremoveAction(Action action) Remove the action from the componentvoidremoveAction(String id) Remove the action by its ID.voidRemove all actions from the componentvoidremoveStyleProvider(Function<? super E, String> styleProvider) Removes a previously added style provider.voidrepaint()Repaints UI representation of the tree including style providers and icon providers without refreshing the tree data.voidsetAccessManager(AccessManager accessManager) voidsetActions(Actions actions) voidsetButtonsPanel(ButtonsPanel panel) Sets aButtonsPanelcomponent.voidsetCaption(String caption) Sets the component's caption.voidsetCaptionAsHtml(boolean captionAsHtml) Sets whether the caption is rendered as HTML.voidsetContentMode(ContentMode contentMode) Sets the content mode of the item captions.voidsetContextMenuEnabled(boolean contextMenuEnabled) Sets whether or not context menu is enabled.voidsetDebugId(String id) INTERNAL.voidsetDescription(String description) Sets the component's description.voidsetDescriptionProvider(Function<? super E, String> provider) Sets the description generator that is used for generating tooltip descriptions for items.voidsetDescriptionProvider(Function<? super E, String> provider, ContentMode contentMode) Sets the description generator that is used for generating HTML tooltip descriptions for items.voidsetDetailsGenerator(Function<E, Component> generator) Sets a new details generator for item details.voidsetDetailsVisible(E entity, boolean visible) Shows or hides the details for a specific item.voidsetEnterPressAction(Action action) Sets the action to be executed on Enter key press.voidsetIconProvider(Function<? super E, String> iconProvider) Sets the icon provider for the tree.voidsetIconResolver(IconResolver iconResolver) voidSet component IDvoidsetItemCaptionProvider(Function<? super E, String> itemCaptionProvider) Sets function that provides caption for component item.voidsetItemClickAction(Action action) Sets the action to be executed when double-clicking inside a tree node.voidSets aDataUnitsupported by the Tree.voidsetLookupSelectHandler(Consumer<Collection<E>> selectHandler) voidsetMetadata(Metadata metadata) voidsetMetadataTools(MetadataTools metadataTools) voidsetRowHeight(double rowHeight) Sets the height of a row.voidsetSelected(E item) Selects a row of the list component for a given entity instance.voidsetSelected(Collection<E> items) Selects the rows of the list component for a given collection of entity instances.protected voidsetSelectedInternal(Collection<E> items) voidsetSelectionMode(Tree.SelectionMode selectionMode) Sets the Tree's selection mode.voidsetStyleName(String name) Sets one or more style names of the component, replacing any previous styles.voidsetStyleProvider(Function<? super E, String> styleProvider) Sets a single style provider for tree items.voidsetTabIndex(int tabIndex) Sets the tabulator index of theFocusablecomponent.voidsetThemeConstantsManager(ThemeConstantsManager themeConstantsManager) protected voidsetUiTestId(TreeItems<E> items) voidsetUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport) voidvoidvoidvoidprotected voidprotected voidMethods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, getAlignment, getComponent, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setParent, setResponsive, 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.ActionsHolder
getActionNN, getSubPartMethods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setParent, setResponsive, setSizeAuto, setSizeFull, 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
isFocusable, setFocusableMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Field Details
-
internalStyles
-
styleProviders
-
styleGenerator
-
contextMenu
-
contextMenuItems
-
buttonsPanel
-
topPanel
protected com.vaadin.ui.HorizontalLayout topPanel -
componentComposition
-
enterPressAction
-
iconProvider
-
metadata
-
accessManager
-
iconResolver
-
metadataTools
-
actions
-
uiTestIdsSupport
-
selectionMode
-
doubleClickAction
-
itemClickListener
protected com.vaadin.shared.Registration itemClickListener -
actionList
-
shortcutsDelegate
-
actionsPermissions
-
showIconsForPopupMenuActions
protected boolean showIconsForPopupMenuActions -
hierarchyProperty
-
dataBinding
-
itemCaptionProvider
-
descriptionProvider
-
detailsGenerator
-
expandListener
protected com.vaadin.shared.Registration expandListener -
collapseListener
protected com.vaadin.shared.Registration collapseListener
-
-
Constructor Details
-
TreeImpl
public TreeImpl()
-
-
Method Details
-
createComponent
-
createShortcutsDelegate
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
initComponentComposition
-
initComponent
-
createComponentComposition
-
createEnterShortcutListener
-
generateItemCaption
-
initContextMenu
protected void initContextMenu() -
setAccessManager
-
setIconResolver
-
setMetadata
-
setMetadataTools
-
setThemeConstantsManager
-
setActions
-
setUiTestIdsSupport
-
getItems
-
setItems
Description copied from interface:TreeSets aDataUnitsupported by the Tree. -
setUiTestId
-
setDebugId
Description copied from interface:HasDebugIdINTERNAL. Managed by debug Id system.- Specified by:
setDebugIdin interfaceHasDebugId- Overrides:
setDebugIdin classAbstractComponent<JmixTree<E>>
-
setId
Description copied from interface:ComponentSet component ID -
createEmptyDataProvider
-
getHierarchyProperty
- Specified by:
getHierarchyPropertyin interfaceTree<E>- Returns:
- the name of the property which forms the hierarchy
-
getItemClickAction
- Specified by:
getItemClickActionin interfaceTree<E>- Returns:
- an item double-click action
-
setItemClickAction
Description copied from interface:TreeSets the action to be executed when double-clicking inside a tree node.- Specified by:
setItemClickActionin interfaceTree<E>- Parameters:
action- a new action
-
onItemClick
-
setItemCaptionProvider
Description copied from interface:HasItemCaptionProviderSets function that provides caption for component item.- Specified by:
setItemCaptionProviderin interfaceHasItemCaptionProvider<E>- Parameters:
itemCaptionProvider- caption provider for item
-
getItemCaptionProvider
- Specified by:
getItemCaptionProviderin interfaceHasItemCaptionProvider<E>- Returns:
- caption provider for item
-
refreshActionsState
protected void refreshActionsState() -
createDataGridDataProvider
-
addAction
Description copied from interface:ActionsHolderAdd an action to the component- Specified by:
addActionin interfaceActionsHolder
-
addAction
Description copied from interface:ActionsHolderAdd an action to the component with index.- Specified by:
addActionin interfaceActionsHolder
-
createContextMenuItem
-
attachAction
-
removeAction
Description copied from interface:ActionsHolderRemove the action from the component- Specified by:
removeActionin interfaceActionsHolder
-
removeAction
Description copied from interface:ActionsHolderRemove the action by its ID. If there is no action with that ID, nothing happens.- Specified by:
removeActionin interfaceActionsHolder
-
removeAllActions
public void removeAllActions()Description copied from interface:ActionsHolderRemove all actions from the component- Specified by:
removeAllActionsin interfaceActionsHolder
-
getActions
- Specified by:
getActionsin interfaceActionsHolder- Returns:
- unmodifiable collection of actions
-
getAction
- Specified by:
getActionin interfaceActionsHolder- Returns:
- an action by its ID, or null if not found
-
getActionsPermissions
- Specified by:
getActionsPermissionsin interfaceSecuredActionsHolder- Returns:
- permissions container
-
treeSourceItemSetChanged
- Specified by:
treeSourceItemSetChangedin interfaceTreeSourceEventsDelegate<E>
-
treeSourcePropertyValueChanged
- Specified by:
treeSourcePropertyValueChangedin interfaceTreeSourceEventsDelegate<E>
-
treeSourceStateChanged
- Specified by:
treeSourceStateChangedin interfaceTreeSourceEventsDelegate<E>
-
treeSourceSelectedItemChanged
- Specified by:
treeSourceSelectedItemChangedin interfaceTreeSourceEventsDelegate<E>
-
collapseTree
public void collapseTree()Description copied from interface:TreeCollapses tree nodes.- Specified by:
collapseTreein interfaceTree<E>
-
expandTree
public void expandTree()Description copied from interface:TreeExpands all tree nodes.- Specified by:
expandTreein interfaceTree<E>
-
collapse
Description copied from interface:TreeCollapses all tree nodes that are lower in level than a given item. -
expand
Description copied from interface:TreeExpands all tree nodes that are higher in level that a given item. -
expandUpTo
public void expandUpTo(int level) Description copied from interface:TreeExpands tree including specified level- Specified by:
expandUpToin interfaceTree<E>- Parameters:
level- level of Tree nodes to expand, if passed level = 1 then root items will be expanded
-
isExpanded
Description copied from interface:TreeReturns whether an item with given itemId is expanded or collapsed.- Specified by:
isExpandedin interfaceTree<E>- Parameters:
itemId- item id to check- Returns:
- true if the item with itemId is expanded, false if collapsed
-
getCaption
- Specified by:
getCaptionin interfaceComponent.HasCaption- Overrides:
getCaptionin classAbstractComponent<JmixTree<E>>- Returns:
- the caption of the component
-
setCaption
Description copied from interface:Component.HasCaptionSets the component's caption.- Specified by:
setCaptionin interfaceComponent.HasCaption- Overrides:
setCaptionin classAbstractComponent<JmixTree<E>>- Parameters:
caption- the new component's caption
-
isCaptionAsHtml
public boolean isCaptionAsHtml()- Specified by:
isCaptionAsHtmlin interfaceHasHtmlCaption- Overrides:
isCaptionAsHtmlin classAbstractComponent<JmixTree<E>>- Returns:
trueif the caption is rendered as HTML,falseif rendered as plain text
-
setCaptionAsHtml
public void setCaptionAsHtml(boolean captionAsHtml) Description copied from interface:HasHtmlCaptionSets whether the caption is rendered as HTML.- Specified by:
setCaptionAsHtmlin interfaceHasHtmlCaption- Overrides:
setCaptionAsHtmlin classAbstractComponent<JmixTree<E>>- Parameters:
captionAsHtml-trueif the caption is rendered as HTML,falseif rendered as plain text- See Also:
-
getDescription
- Specified by:
getDescriptionin interfaceComponent.HasDescription- Overrides:
getDescriptionin classAbstractComponent<JmixTree<E>>- 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<JmixTree<E>>- Parameters:
description- the new description to set
-
getInnerComponents
- Specified by:
getInnerComponentsin interfaceHasInnerComponents
-
getButtonsPanel
- Specified by:
getButtonsPanelin interfaceHasButtonsPanel- Returns:
- a buttons panel component.
-
getComposition
public com.vaadin.ui.Component getComposition()- Specified by:
getCompositionin interfaceComponent.Wrapper- Overrides:
getCompositionin classAbstractComponent<JmixTree<E>>
-
setButtonsPanel
Description copied from interface:HasButtonsPanelSets aButtonsPanelcomponent.- Specified by:
setButtonsPanelin interfaceHasButtonsPanel- Parameters:
panel- a buttons panel component
-
createTopPanel
protected com.vaadin.ui.HorizontalLayout createTopPanel() -
updateCompositionStylesTopPanelVisible
protected void updateCompositionStylesTopPanelVisible() -
handleClickAction
protected void handleClickAction() -
setLookupSelectHandler
- Specified by:
setLookupSelectHandlerin interfaceLookupComponent<E>- Parameters:
selectHandler- handler that should be executed when a user select an item in the lookup screen
-
getLookupSelectedItems
- Specified by:
getLookupSelectedItemsin interfaceLookupComponent<E>- Returns:
- items selected in lookup component
-
setStyleName
Description copied from interface:ComponentSets one or more style names of the component, replacing any previous styles. Multiple styles can be specified as a space-separated list of style names. Styles implementation is client-type-specific.- Specified by:
setStyleNamein interfaceComponent- Overrides:
setStyleNamein classAbstractComponent<JmixTree<E>>- Parameters:
name- one or more style names separated by space.
-
getStyleName
Description copied from interface:ComponentStyles implementation is client-type-specific.- Specified by:
getStyleNamein interfaceComponent- Overrides:
getStyleNamein classAbstractComponent<JmixTree<E>>- Returns:
- current style name.
-
setStyleProvider
Description copied from interface:TreeSets a single style provider for tree items.- Specified by:
setStyleProviderin interfaceTree<E>- Parameters:
styleProvider- a style provider to set
-
addStyleProvider
Description copied from interface:TreeAdds a style provider for tree items.- Specified by:
addStyleProviderin interfaceTree<E>- Parameters:
styleProvider- a style provider to add
-
removeStyleProvider
Description copied from interface:TreeRemoves a previously added style provider.- Specified by:
removeStyleProviderin interfaceTree<E>- Parameters:
styleProvider- a style provider to remove
-
updateStyleGenerator
protected void updateStyleGenerator() -
getGeneratedStyle
-
repaint
public void repaint()Description copied from interface:TreeRepaints UI representation of the tree including style providers and icon providers without refreshing the tree data. -
setIconProvider
Description copied from interface:TreeSets the icon provider for the tree.- Specified by:
setIconProviderin interfaceTree<E>- Parameters:
iconProvider- an icon provider to set
-
getItemIcon
-
setEnterPressAction
Description copied from interface:TreeSets the action to be executed on Enter key press.- Specified by:
setEnterPressActionin interfaceTree<E>- Parameters:
action- a new action
-
getEnterPressAction
- Specified by:
getEnterPressActionin interfaceTree<E>- Returns:
- an Enter key press action
-
isContextMenuEnabled
public boolean isContextMenuEnabled()- Specified by:
isContextMenuEnabledin interfaceTree<E>- Returns:
trueif context menu is enabled,falseotherwise
-
setContextMenuEnabled
public void setContextMenuEnabled(boolean contextMenuEnabled) Description copied from interface:TreeSets whether or not context menu is enabled. Default value istrue.- Specified by:
setContextMenuEnabledin interfaceTree<E>- Parameters:
contextMenuEnabled- specifies whether context menu is enabled
-
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
-
getSelectionMode
- Specified by:
getSelectionModein interfaceTree<E>- Returns:
- the currently used
Tree.SelectionMode
-
setSelectionMode
Description copied from interface:TreeSets the Tree's selection mode.- Specified by:
setSelectionModein interfaceTree<E>- Parameters:
selectionMode- the selection mode to use
-
setRowHeight
public void setRowHeight(double rowHeight) Description copied from interface:TreeSets the height of a row. If -1 (default), the row height is calculated based on the theme for an empty row before the Tree is displayed.- Specified by:
setRowHeightin interfaceTree<E>- Parameters:
rowHeight- The height of a row in pixels or -1 for automatic calculation
-
setDescriptionProvider
Description copied from interface:TreeSets the description generator that is used for generating tooltip descriptions for items.- Specified by:
setDescriptionProviderin interfaceTree<E>- Parameters:
provider- the description generator to use ornullto remove a previously set provider if any
-
setDescriptionProvider
public void setDescriptionProvider(@Nullable Function<? super E, String> provider, ContentMode contentMode) Description copied from interface:TreeSets the description generator that is used for generating HTML tooltip descriptions for items.- Specified by:
setDescriptionProviderin interfaceTree<E>- Parameters:
provider- the description generator to use ornullto remove a previously set provider if anycontentMode- the content mode for row tooltips
-
getRowDescription
-
getDescriptionProvider
Description copied from interface:TreeGets the item description generator.- Specified by:
getDescriptionProviderin interfaceTree<E>- Returns:
- the item description generator
-
getContentMode
- Specified by:
getContentModein interfaceTree<E>- Returns:
- the content mode of the item captions
-
setContentMode
Description copied from interface:TreeSets the content mode of the item captions.- Specified by:
setContentModein interfaceTree<E>- Parameters:
contentMode- the content mode
-
getDetailsGenerator
- Specified by:
getDetailsGeneratorin interfaceTree<E>- Returns:
- the current details generator for item details or
nullif not set
-
setDetailsGenerator
Description copied from interface:TreeSets a new details generator for item details.The currently opened item details will be re-rendered.
- Specified by:
setDetailsGeneratorin interfaceTree<E>- Parameters:
generator- the details generator to set
-
getItemDetails
-
isDetailsVisible
Description copied from interface:TreeChecks whether details are visible for the given item.- Specified by:
isDetailsVisiblein interfaceTree<E>- Parameters:
entity- the item for which to check details visibility- Returns:
trueif the details are visible
-
setDetailsVisible
Description copied from interface:TreeShows or hides the details for a specific item.- Specified by:
setDetailsVisiblein interfaceTree<E>- Parameters:
entity- the item for which to set details visibilityvisible-trueto show the details, orfalseto hide them
-
addExpandListener
Description copied from interface:TreeRegisters a new expand listener.- Specified by:
addExpandListenerin interfaceTree<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
onItemExpand
-
addCollapseListener
Description copied from interface:TreeRegisters a new collapse listener.- Specified by:
addCollapseListenerin interfaceTree<E>- Parameters:
listener- the listener to be added- Returns:
- a registration object for removing an event listener added to a source
-
onItemCollapse
-
onSelectionChange
-
fireSelectionEvent
-
isMultiSelect
public boolean isMultiSelect()- Specified by:
isMultiSelectin interfaceListComponent<E>- Returns:
- true if multiple selection mode is enabled
-
getSingleSelected
Description copied from interface:ListComponentReturns an instance of entity corresponding to the selected row of the list component. If nothing is selected, the method returnsnull. If multiple selection mode is enabled, returns the first selected instance.- Specified by:
getSingleSelectedin interfaceListComponent<E>- Returns:
- an instance of entity corresponding to the selected row of the list component
-
getSelected
Description copied from interface:ListComponentReturns a set of entity instances corresponding to the selected rows of the list component. If nothing is selected, the method returns aCollections.emptySet().- Specified by:
getSelectedin interfaceListComponent<E>- Returns:
- a set of entity instances corresponding to the selected rows of the list component
-
setSelected
Description copied from interface:ListComponentSelects a row of the list component for a given entity instance.- Specified by:
setSelectedin interfaceListComponent<E>- Parameters:
item- entity instance to select the row,nullto reset the selection
-
setSelected
Description copied from interface:ListComponentSelects the rows of the list component for a given collection of entity instances.- Specified by:
setSelectedin interfaceListComponent<E>- Parameters:
items- collection of entity instances to select rows
-
setSelectedInternal
-
addSelectionListener
Description copied from interface:TreeRegisters a new selection listener.- Specified by:
addSelectionListenerin interfaceTree<E>- Parameters:
listener- the listener to register
-
addLookupValueChangeListener
public Subscription addLookupValueChangeListener(Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener) Description copied from interface:LookupComponent.LookupSelectionChangeNotifierAdds a listener that invoked when lookup selected items set is changed.- Specified by:
addLookupValueChangeListenerin interfaceLookupComponent.LookupSelectionChangeNotifier<E>- Parameters:
listener- a listener to add- Returns:
Subscription
-
focus
public void focus()Description copied from interface:Component.FocusableSets focus to this component- Specified by:
focusin interfaceComponent.Focusable
-
attached
public void attached()Description copied from interface:AttachNotifierNotifies all listeners that component has been attached.- Specified by:
attachedin interfaceAttachNotifier- Overrides:
attachedin classAbstractComponent<JmixTree<E>>
-
detached
public void detached()Description copied from interface:AttachNotifierNotifies all listeners that component has been detached.- Specified by:
detachedin interfaceAttachNotifier- Overrides:
detachedin classAbstractComponent<JmixTree<E>>
-