Class TreeImpl<E>

java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<JmixTree<E>>
io.jmix.ui.component.impl.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>
  • Field Details

    • internalStyles

      protected List<String> internalStyles
    • styleProviders

      protected List<Function<? super E,String>> styleProviders
    • styleGenerator

      protected com.vaadin.ui.StyleGenerator<E> styleGenerator
    • contextMenu

      protected TreeContextMenu<E> contextMenu
    • contextMenuItems

      protected final List<AbstractDataGrid.ActionMenuItemWrapper> contextMenuItems
    • buttonsPanel

      protected ButtonsPanel buttonsPanel
    • topPanel

      protected com.vaadin.ui.HorizontalLayout topPanel
    • componentComposition

      protected TreeImpl<E>.TreeComposition componentComposition
    • enterPressAction

      protected Action enterPressAction
    • iconProvider

      protected Function<? super E,String> iconProvider
    • metadata

      protected Metadata metadata
    • accessManager

      protected AccessManager accessManager
    • iconResolver

      protected IconResolver iconResolver
    • metadataTools

      protected MetadataTools metadataTools
    • actions

      protected Actions actions
    • uiTestIdsSupport

      protected UiTestIdsSupport uiTestIdsSupport
    • selectionMode

      protected Tree.SelectionMode selectionMode
    • doubleClickAction

      protected Action doubleClickAction
    • itemClickListener

      protected com.vaadin.shared.Registration itemClickListener
    • actionList

      protected final List<Action> actionList
    • shortcutsDelegate

      protected final ShortcutsDelegate<com.vaadin.event.ShortcutListener> shortcutsDelegate
    • actionsPermissions

      protected final ActionsPermissions actionsPermissions
    • showIconsForPopupMenuActions

      protected boolean showIconsForPopupMenuActions
    • hierarchyProperty

      protected String hierarchyProperty
    • dataBinding

      protected TreeDataProvider<E> dataBinding
    • itemCaptionProvider

      protected Function<? super E,String> itemCaptionProvider
    • descriptionProvider

      protected Function<? super E,String> descriptionProvider
    • detailsGenerator

      protected Function<E,Component> detailsGenerator
    • expandListener

      protected com.vaadin.shared.Registration expandListener
    • collapseListener

      protected com.vaadin.shared.Registration collapseListener
  • Constructor Details

    • TreeImpl

      public TreeImpl()
  • Method Details

    • createComponent

      protected JmixTree<E> createComponent()
    • createShortcutsDelegate

      protected ShortcutsDelegate<com.vaadin.event.ShortcutListener> createShortcutsDelegate()
    • afterPropertiesSet

      public void afterPropertiesSet()
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
    • initComponentComposition

      protected void initComponentComposition(TreeImpl<E>.TreeComposition composition)
    • initComponent

      protected void initComponent(JmixTree<E> component)
    • createComponentComposition

      protected TreeImpl<E>.TreeComposition createComponentComposition()
    • createEnterShortcutListener

      protected ShortcutListenerDelegate createEnterShortcutListener()
    • generateItemCaption

      protected String generateItemCaption(E item)
    • initContextMenu

      protected void initContextMenu()
    • setAccessManager

      @Autowired public void setAccessManager(AccessManager accessManager)
    • setIconResolver

      @Autowired public void setIconResolver(IconResolver iconResolver)
    • setMetadata

      @Autowired public void setMetadata(Metadata metadata)
    • setMetadataTools

      @Autowired public void setMetadataTools(MetadataTools metadataTools)
    • setThemeConstantsManager

      @Autowired public void setThemeConstantsManager(ThemeConstantsManager themeConstantsManager)
    • setActions

      @Autowired public void setActions(Actions actions)
    • setUiTestIdsSupport

      @Autowired public void setUiTestIdsSupport(UiTestIdsSupport uiTestIdsSupport)
    • getItems

      @Nullable public TreeItems<E> getItems()
      Specified by:
      getItems in interface ListComponent<E>
      Specified by:
      getItems in interface Tree<E>
      Returns:
      a DataUnit supported by the Tree
    • setItems

      public void setItems(@Nullable TreeItems<E> treeItems)
      Description copied from interface: Tree
      Sets a DataUnit supported by the Tree.
      Specified by:
      setItems in interface Tree<E>
      Parameters:
      treeItems - DataUnit supported by the Tree
    • setUiTestId

      protected void setUiTestId(TreeItems<E> items)
    • setDebugId

      public void setDebugId(@Nullable String id)
      Description copied from interface: HasDebugId
      INTERNAL. Managed by debug Id system.
      Specified by:
      setDebugId in interface HasDebugId
      Overrides:
      setDebugId in class AbstractComponent<JmixTree<E>>
    • setId

      public void setId(@Nullable String id)
      Description copied from interface: Component
      Set component ID
      Specified by:
      setId in interface Component
      Overrides:
      setId in class AbstractComponent<JmixTree<E>>
    • createEmptyDataProvider

      protected com.vaadin.data.provider.DataProvider<E,?> createEmptyDataProvider()
    • getHierarchyProperty

      public String getHierarchyProperty()
      Specified by:
      getHierarchyProperty in interface Tree<E>
      Returns:
      the name of the property which forms the hierarchy
    • getItemClickAction

      @Nullable public Action getItemClickAction()
      Specified by:
      getItemClickAction in interface Tree<E>
      Returns:
      an item double-click action
    • setItemClickAction

      public void setItemClickAction(@Nullable Action action)
      Description copied from interface: Tree
      Sets the action to be executed when double-clicking inside a tree node.
      Specified by:
      setItemClickAction in interface Tree<E>
      Parameters:
      action - a new action
    • onItemClick

      protected void onItemClick(com.vaadin.ui.Tree.ItemClick<E> event)
    • setItemCaptionProvider

      public void setItemCaptionProvider(@Nullable Function<? super E,String> itemCaptionProvider)
      Description copied from interface: HasItemCaptionProvider
      Sets function that provides caption for component item.
      Specified by:
      setItemCaptionProvider in interface HasItemCaptionProvider<E>
      Parameters:
      itemCaptionProvider - caption provider for item
    • getItemCaptionProvider

      @Nullable public Function<? super E,String> getItemCaptionProvider()
      Specified by:
      getItemCaptionProvider in interface HasItemCaptionProvider<E>
      Returns:
      caption provider for item
    • refreshActionsState

      protected void refreshActionsState()
    • createDataGridDataProvider

      protected TreeDataProvider<E> createDataGridDataProvider(TreeItems<E> treeItems)
    • addAction

      public void addAction(Action action)
      Description copied from interface: ActionsHolder
      Add an action to the component
      Specified by:
      addAction in interface ActionsHolder
    • addAction

      public void addAction(Action action, int index)
      Description copied from interface: ActionsHolder
      Add an action to the component with index.
      Specified by:
      addAction in interface ActionsHolder
    • createContextMenuItem

      protected AbstractDataGrid.ActionMenuItemWrapper createContextMenuItem(Action action)
    • attachAction

      protected void attachAction(Action action)
    • removeAction

      public void removeAction(Action action)
      Description copied from interface: ActionsHolder
      Remove the action from the component
      Specified by:
      removeAction in interface ActionsHolder
    • removeAction

      public void removeAction(String id)
      Description copied from interface: ActionsHolder
      Remove the action by its ID. If there is no action with that ID, nothing happens.
      Specified by:
      removeAction in interface ActionsHolder
    • removeAllActions

      public void removeAllActions()
      Description copied from interface: ActionsHolder
      Remove all actions from the component
      Specified by:
      removeAllActions in interface ActionsHolder
    • getActions

      public Collection<Action> getActions()
      Specified by:
      getActions in interface ActionsHolder
      Returns:
      unmodifiable collection of actions
    • getAction

      @Nullable public Action getAction(String id)
      Specified by:
      getAction in interface ActionsHolder
      Returns:
      an action by its ID, or null if not found
    • getActionsPermissions

      public ActionsPermissions getActionsPermissions()
      Specified by:
      getActionsPermissions in interface SecuredActionsHolder
      Returns:
      permissions container
    • treeSourceItemSetChanged

      public void treeSourceItemSetChanged(TreeItems.ItemSetChangeEvent<E> event)
      Specified by:
      treeSourceItemSetChanged in interface TreeSourceEventsDelegate<E>
    • treeSourcePropertyValueChanged

      public void treeSourcePropertyValueChanged(TreeItems.ValueChangeEvent<E> event)
      Specified by:
      treeSourcePropertyValueChanged in interface TreeSourceEventsDelegate<E>
    • treeSourceStateChanged

      public void treeSourceStateChanged(DataUnit.StateChangeEvent event)
      Specified by:
      treeSourceStateChanged in interface TreeSourceEventsDelegate<E>
    • treeSourceSelectedItemChanged

      public void treeSourceSelectedItemChanged(TreeItems.SelectedItemChangeEvent<E> event)
      Specified by:
      treeSourceSelectedItemChanged in interface TreeSourceEventsDelegate<E>
    • collapseTree

      public void collapseTree()
      Description copied from interface: Tree
      Collapses tree nodes.
      Specified by:
      collapseTree in interface Tree<E>
    • expandTree

      public void expandTree()
      Description copied from interface: Tree
      Expands all tree nodes.
      Specified by:
      expandTree in interface Tree<E>
    • collapse

      public void collapse(E item)
      Description copied from interface: Tree
      Collapses all tree nodes that are lower in level than a given item.
      Specified by:
      collapse in interface Tree<E>
      Parameters:
      item - an item
    • expand

      public void expand(E item)
      Description copied from interface: Tree
      Expands all tree nodes that are higher in level that a given item.
      Specified by:
      expand in interface Tree<E>
      Parameters:
      item - an item
    • expandUpTo

      public void expandUpTo(int level)
      Description copied from interface: Tree
      Expands tree including specified level
      Specified by:
      expandUpTo in interface Tree<E>
      Parameters:
      level - level of Tree nodes to expand, if passed level = 1 then root items will be expanded
    • isExpanded

      public boolean isExpanded(Object itemId)
      Description copied from interface: Tree
      Returns whether an item with given itemId is expanded or collapsed.
      Specified by:
      isExpanded in interface Tree<E>
      Parameters:
      itemId - item id to check
      Returns:
      true if the item with itemId is expanded, false if collapsed
    • getCaption

      @Nullable public String getCaption()
      Specified by:
      getCaption in interface Component.HasCaption
      Overrides:
      getCaption in class AbstractComponent<JmixTree<E>>
      Returns:
      the caption of the component
    • setCaption

      public void setCaption(@Nullable String caption)
      Description copied from interface: Component.HasCaption
      Sets the component's caption.
      Specified by:
      setCaption in interface Component.HasCaption
      Overrides:
      setCaption in class AbstractComponent<JmixTree<E>>
      Parameters:
      caption - the new component's caption
    • isCaptionAsHtml

      public boolean isCaptionAsHtml()
      Specified by:
      isCaptionAsHtml in interface HasHtmlCaption
      Overrides:
      isCaptionAsHtml in class AbstractComponent<JmixTree<E>>
      Returns:
      true if the caption is rendered as HTML, false if rendered as plain text
    • setCaptionAsHtml

      public void setCaptionAsHtml(boolean captionAsHtml)
      Description copied from interface: HasHtmlCaption
      Sets whether the caption is rendered as HTML.
      Specified by:
      setCaptionAsHtml in interface HasHtmlCaption
      Overrides:
      setCaptionAsHtml in class AbstractComponent<JmixTree<E>>
      Parameters:
      captionAsHtml - true if the caption is rendered as HTML, false if rendered as plain text
      See Also:
    • getDescription

      @Nullable public String getDescription()
      Specified by:
      getDescription in interface Component.HasDescription
      Overrides:
      getDescription in class AbstractComponent<JmixTree<E>>
      Returns:
      the components description, used in tooltips
    • setDescription

      public void setDescription(@Nullable String description)
      Description copied from interface: Component.HasDescription
      Sets the component's description.
      Specified by:
      setDescription in interface Component.HasDescription
      Overrides:
      setDescription in class AbstractComponent<JmixTree<E>>
      Parameters:
      description - the new description to set
    • getInnerComponents

      public Collection<Component> getInnerComponents()
      Specified by:
      getInnerComponents in interface HasInnerComponents
    • getButtonsPanel

      @Nullable public ButtonsPanel getButtonsPanel()
      Specified by:
      getButtonsPanel in interface HasButtonsPanel
      Returns:
      a buttons panel component.
    • getComposition

      public com.vaadin.ui.Component getComposition()
      Specified by:
      getComposition in interface Component.Wrapper
      Overrides:
      getComposition in class AbstractComponent<JmixTree<E>>
    • setButtonsPanel

      public void setButtonsPanel(@Nullable ButtonsPanel panel)
      Description copied from interface: HasButtonsPanel
      Sets a ButtonsPanel component.
      Specified by:
      setButtonsPanel in interface HasButtonsPanel
      Parameters:
      panel - a buttons panel component
    • createTopPanel

      protected com.vaadin.ui.HorizontalLayout createTopPanel()
    • updateCompositionStylesTopPanelVisible

      protected void updateCompositionStylesTopPanelVisible()
    • handleClickAction

      protected void handleClickAction()
    • setLookupSelectHandler

      public void setLookupSelectHandler(Consumer<Collection<E>> selectHandler)
      Specified by:
      setLookupSelectHandler in interface LookupComponent<E>
      Parameters:
      selectHandler - handler that should be executed when a user select an item in the lookup screen
    • getLookupSelectedItems

      public Collection<E> getLookupSelectedItems()
      Specified by:
      getLookupSelectedItems in interface LookupComponent<E>
      Returns:
      items selected in lookup component
    • setStyleName

      public void setStyleName(@Nullable String name)
      Description copied from interface: Component
      Sets 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:
      setStyleName in interface Component
      Overrides:
      setStyleName in class AbstractComponent<JmixTree<E>>
      Parameters:
      name - one or more style names separated by space.
    • getStyleName

      public String getStyleName()
      Description copied from interface: Component
      Styles implementation is client-type-specific.
      Specified by:
      getStyleName in interface Component
      Overrides:
      getStyleName in class AbstractComponent<JmixTree<E>>
      Returns:
      current style name.
    • setStyleProvider

      public void setStyleProvider(@Nullable Function<? super E,String> styleProvider)
      Description copied from interface: Tree
      Sets a single style provider for tree items.
      Specified by:
      setStyleProvider in interface Tree<E>
      Parameters:
      styleProvider - a style provider to set
    • addStyleProvider

      public void addStyleProvider(Function<? super E,String> styleProvider)
      Description copied from interface: Tree
      Adds a style provider for tree items.
      Specified by:
      addStyleProvider in interface Tree<E>
      Parameters:
      styleProvider - a style provider to add
    • removeStyleProvider

      public void removeStyleProvider(Function<? super E,String> styleProvider)
      Description copied from interface: Tree
      Removes a previously added style provider.
      Specified by:
      removeStyleProvider in interface Tree<E>
      Parameters:
      styleProvider - a style provider to remove
    • updateStyleGenerator

      protected void updateStyleGenerator()
    • getGeneratedStyle

      @Nullable protected String getGeneratedStyle(E item)
    • repaint

      public void repaint()
      Description copied from interface: Tree
      Repaints UI representation of the tree including style providers and icon providers without refreshing the tree data.
      Specified by:
      repaint in interface Tree<E>
    • setIconProvider

      public void setIconProvider(@Nullable Function<? super E,String> iconProvider)
      Description copied from interface: Tree
      Sets the icon provider for the tree.
      Specified by:
      setIconProvider in interface Tree<E>
      Parameters:
      iconProvider - an icon provider to set
    • getItemIcon

      @Nullable protected com.vaadin.server.Resource getItemIcon(@Nullable E item)
    • setEnterPressAction

      public void setEnterPressAction(@Nullable Action action)
      Description copied from interface: Tree
      Sets the action to be executed on Enter key press.
      Specified by:
      setEnterPressAction in interface Tree<E>
      Parameters:
      action - a new action
    • getEnterPressAction

      @Nullable public Action getEnterPressAction()
      Specified by:
      getEnterPressAction in interface Tree<E>
      Returns:
      an Enter key press action
    • isContextMenuEnabled

      public boolean isContextMenuEnabled()
      Specified by:
      isContextMenuEnabled in interface Tree<E>
      Returns:
      true if context menu is enabled, false otherwise
    • setContextMenuEnabled

      public void setContextMenuEnabled(boolean contextMenuEnabled)
      Description copied from interface: Tree
      Sets whether or not context menu is enabled. Default value is true.
      Specified by:
      setContextMenuEnabled in interface Tree<E>
      Parameters:
      contextMenuEnabled - specifies whether context menu is enabled
    • getTabIndex

      public int getTabIndex()
      Description copied from interface: Component.Focusable
      Gets the tabulator index of the HasTabIndex component.
      Specified by:
      getTabIndex in interface Component.Focusable
      Returns:
      tab index set for the HasTabIndex component
    • setTabIndex

      public void setTabIndex(int tabIndex)
      Description copied from interface: Component.Focusable
      Sets the tabulator index of the 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.
      Specified by:
      setTabIndex in interface Component.Focusable
      Parameters:
      tabIndex - tab index
    • getSelectionMode

      public Tree.SelectionMode getSelectionMode()
      Specified by:
      getSelectionMode in interface Tree<E>
      Returns:
      the currently used Tree.SelectionMode
    • setSelectionMode

      public void setSelectionMode(Tree.SelectionMode selectionMode)
      Description copied from interface: Tree
      Sets the Tree's selection mode.
      Specified by:
      setSelectionMode in interface Tree<E>
      Parameters:
      selectionMode - the selection mode to use
    • setRowHeight

      public void setRowHeight(double rowHeight)
      Description copied from interface: Tree
      Sets 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:
      setRowHeight in interface Tree<E>
      Parameters:
      rowHeight - The height of a row in pixels or -1 for automatic calculation
    • setDescriptionProvider

      public void setDescriptionProvider(@Nullable Function<? super E,String> provider)
      Description copied from interface: Tree
      Sets the description generator that is used for generating tooltip descriptions for items.
      Specified by:
      setDescriptionProvider in interface Tree<E>
      Parameters:
      provider - the description generator to use or null to remove a previously set provider if any
    • setDescriptionProvider

      public void setDescriptionProvider(@Nullable Function<? super E,String> provider, ContentMode contentMode)
      Description copied from interface: Tree
      Sets the description generator that is used for generating HTML tooltip descriptions for items.
      Specified by:
      setDescriptionProvider in interface Tree<E>
      Parameters:
      provider - the description generator to use or null to remove a previously set provider if any
      contentMode - the content mode for row tooltips
    • getRowDescription

      @Nullable protected String getRowDescription(E item)
    • getDescriptionProvider

      @Nullable public Function<E,String> getDescriptionProvider()
      Description copied from interface: Tree
      Gets the item description generator.
      Specified by:
      getDescriptionProvider in interface Tree<E>
      Returns:
      the item description generator
    • getContentMode

      public ContentMode getContentMode()
      Specified by:
      getContentMode in interface Tree<E>
      Returns:
      the content mode of the item captions
    • setContentMode

      public void setContentMode(ContentMode contentMode)
      Description copied from interface: Tree
      Sets the content mode of the item captions.
      Specified by:
      setContentMode in interface Tree<E>
      Parameters:
      contentMode - the content mode
    • getDetailsGenerator

      @Nullable public Function<E,Component> getDetailsGenerator()
      Specified by:
      getDetailsGenerator in interface Tree<E>
      Returns:
      the current details generator for item details or null if not set
    • setDetailsGenerator

      public void setDetailsGenerator(@Nullable Function<E,Component> generator)
      Description copied from interface: Tree
      Sets a new details generator for item details.

      The currently opened item details will be re-rendered.

      Specified by:
      setDetailsGenerator in interface Tree<E>
      Parameters:
      generator - the details generator to set
    • getItemDetails

      @Nullable protected com.vaadin.ui.Component getItemDetails(E entity)
    • isDetailsVisible

      public boolean isDetailsVisible(E entity)
      Description copied from interface: Tree
      Checks whether details are visible for the given item.
      Specified by:
      isDetailsVisible in interface Tree<E>
      Parameters:
      entity - the item for which to check details visibility
      Returns:
      true if the details are visible
    • setDetailsVisible

      public void setDetailsVisible(E entity, boolean visible)
      Description copied from interface: Tree
      Shows or hides the details for a specific item.
      Specified by:
      setDetailsVisible in interface Tree<E>
      Parameters:
      entity - the item for which to set details visibility
      visible - true to show the details, or false to hide them
    • addExpandListener

      public Subscription addExpandListener(Consumer<Tree.ExpandEvent<E>> listener)
      Description copied from interface: Tree
      Registers a new expand listener.
      Specified by:
      addExpandListener in interface Tree<E>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • onItemExpand

      protected void onItemExpand(com.vaadin.event.ExpandEvent<E> e)
    • addCollapseListener

      public Subscription addCollapseListener(Consumer<Tree.CollapseEvent<E>> listener)
      Description copied from interface: Tree
      Registers a new collapse listener.
      Specified by:
      addCollapseListener in interface Tree<E>
      Parameters:
      listener - the listener to be added
      Returns:
      a registration object for removing an event listener added to a source
    • onItemCollapse

      protected void onItemCollapse(com.vaadin.event.CollapseEvent<E> e)
    • onSelectionChange

      protected void onSelectionChange(com.vaadin.event.selection.SelectionEvent<E> event)
    • fireSelectionEvent

      protected void fireSelectionEvent(com.vaadin.event.selection.SelectionEvent<E> e)
    • isMultiSelect

      public boolean isMultiSelect()
      Specified by:
      isMultiSelect in interface ListComponent<E>
      Returns:
      true if multiple selection mode is enabled
    • getSingleSelected

      @Nullable public E getSingleSelected()
      Description copied from interface: ListComponent
      Returns an instance of entity corresponding to the selected row of the list component. If nothing is selected, the method returns null. If multiple selection mode is enabled, returns the first selected instance.
      Specified by:
      getSingleSelected in interface ListComponent<E>
      Returns:
      an instance of entity corresponding to the selected row of the list component
    • getSelected

      public Set<E> getSelected()
      Description copied from interface: ListComponent
      Returns a set of entity instances corresponding to the selected rows of the list component. If nothing is selected, the method returns a Collections.emptySet().
      Specified by:
      getSelected in interface ListComponent<E>
      Returns:
      a set of entity instances corresponding to the selected rows of the list component
    • setSelected

      public void setSelected(@Nullable E item)
      Description copied from interface: ListComponent
      Selects a row of the list component for a given entity instance.
      Specified by:
      setSelected in interface ListComponent<E>
      Parameters:
      item - entity instance to select the row, null to reset the selection
    • setSelected

      public void setSelected(Collection<E> items)
      Description copied from interface: ListComponent
      Selects the rows of the list component for a given collection of entity instances.
      Specified by:
      setSelected in interface ListComponent<E>
      Parameters:
      items - collection of entity instances to select rows
    • setSelectedInternal

      protected void setSelectedInternal(Collection<E> items)
    • addSelectionListener

      public Subscription addSelectionListener(Consumer<Tree.SelectionEvent<E>> listener)
      Description copied from interface: Tree
      Registers a new selection listener.
      Specified by:
      addSelectionListener in interface Tree<E>
      Parameters:
      listener - the listener to register
    • addLookupValueChangeListener

      public Subscription addLookupValueChangeListener(Consumer<LookupComponent.LookupSelectionChangeEvent<E>> listener)
      Description copied from interface: LookupComponent.LookupSelectionChangeNotifier
      Adds a listener that invoked when lookup selected items set is changed.
      Specified by:
      addLookupValueChangeListener in interface LookupComponent.LookupSelectionChangeNotifier<E>
      Parameters:
      listener - a listener to add
      Returns:
      Subscription
    • focus

      public void focus()
      Description copied from interface: Component.Focusable
      Sets focus to this component
      Specified by:
      focus in interface Component.Focusable
    • attached

      public void attached()
      Description copied from interface: AttachNotifier
      Notifies all listeners that component has been attached.
      Specified by:
      attached in interface AttachNotifier
      Overrides:
      attached in class AbstractComponent<JmixTree<E>>
    • detached

      public void detached()
      Description copied from interface: AttachNotifier
      Notifies all listeners that component has been detached.
      Specified by:
      detached in interface AttachNotifier
      Overrides:
      detached in class AbstractComponent<JmixTree<E>>