Class JmixTree<T>

java.lang.Object
com.vaadin.server.AbstractClientConnector
com.vaadin.ui.AbstractComponent
com.vaadin.ui.Composite
com.vaadin.ui.Tree<T>
io.jmix.ui.widget.JmixTree<T>
All Implemented Interfaces:
com.vaadin.data.HasDataProvider<T>, com.vaadin.data.HasHierarchicalDataProvider<T>, com.vaadin.data.HasItems<T>, com.vaadin.event.Action.ShortcutNotifier, com.vaadin.event.ContextClickEvent.ContextClickNotifier, com.vaadin.event.MethodEventSource, com.vaadin.server.ClientConnector, com.vaadin.server.Sizeable, com.vaadin.shared.Connector, com.vaadin.ui.Component, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.HasComponents, Serializable, Iterable<com.vaadin.ui.Component>

public class JmixTree<T> extends com.vaadin.ui.Tree<T> implements com.vaadin.event.Action.ShortcutNotifier
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.ui.Tree

    com.vaadin.ui.Tree.ItemClick<T extends Object>, com.vaadin.ui.Tree.ItemClickListener<T extends Object>, com.vaadin.ui.Tree.TreeContextClickEvent<T extends Object>, com.vaadin.ui.Tree.TreeMultiSelectionModel<T extends Object>, com.vaadin.ui.Tree.TreeRenderer

    Nested classes/interfaces inherited from class com.vaadin.server.AbstractClientConnector

    com.vaadin.server.AbstractClientConnector.IncorrectConcurrentAccessHandler

    Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector

    com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener

    Nested classes/interfaces inherited from interface com.vaadin.ui.Component

    com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.HasContextHelp, com.vaadin.ui.Component.Listener

    Nested classes/interfaces inherited from interface com.vaadin.ui.Component.HasContextHelp

    com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickEvent, com.vaadin.ui.Component.HasContextHelp.ContextHelpIconClickListener

    Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents

    com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener

    Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable

    com.vaadin.server.Sizeable.Unit
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected String
     

    Fields inherited from class com.vaadin.ui.AbstractComponent

    componentErrorProvider, DESIGN_ATTR_PLAIN_TEXT, requiredError

    Fields inherited from interface com.vaadin.server.Sizeable

    SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
     
    protected com.vaadin.ui.TreeGrid<T>
     
    void
     
    void
     
    void
     
    void
    expandUpTo(int level)
     
    getChildren(T item)
     
     
     
     
    protected T
     
    protected com.vaadin.ui.Grid.SelectionMode
     
    boolean
    hasChildren(T item)
     
    void
     
    void
    setDataProvider(com.vaadin.data.provider.DataProvider<T,?> dataProvider)
     
    void
    setGridSelectionModel(com.vaadin.ui.components.grid.GridSelectionModel<T> model)
     
    void
     
    void
     

    Methods inherited from class com.vaadin.ui.Tree

    addCollapseListener, addContextClickListener, addExpandListener, addItemClickListener, addSelectionListener, addStyleName, asMultiSelect, asSingleSelect, collapse, collapse, collapseRecursively, deselect, deserializeDeclarativeRepresentation, expand, expand, expandRecursively, fireCollapseEvent, fireExpandEvent, focus, getCaption, getComponentError, getContentMode, getDataProvider, getErrorMessage, getIcon, getItemCaptionGenerator, getItemCollapseAllowedProvider, getItemDescriptionGenerator, getItemIconGenerator, getPrimaryStyleName, getSelectedItems, getSelectionModel, getStyleGenerator, getStyleName, getTabIndex, isAutoRecalculateWidth, isCaptionAsHtml, isExpanded, readDesign, removeContextClickListener, removeStyleName, scrollTo, scrollTo, scrollToEnd, scrollToStart, select, serializeDeclarativeRepresentation, setAutoRecalculateWidth, setCaption, setCaptionAsHtml, setComponentError, setContentMode, setDescription, setDescription, setIcon, setItemCaptionGenerator, setItemCollapseAllowedProvider, setItemDescriptionGenerator, setItemDescriptionGenerator, setItemIconGenerator, setPrimaryStyleName, setRowHeight, setSelectionMode, setStyleGenerator, setStyleName, setStyleName, setTabIndex, writeDesign

    Methods inherited from class com.vaadin.ui.Composite

    beforeClientResponse, getDebugId, getDescription, getHeight, getHeightUnits, getState, getState, getWidth, getWidthUnits, isEnabled, iterator, setCompositionRoot, setDebugId, setEnabled, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined

    Methods inherited from class com.vaadin.ui.AbstractComponent

    addContextHelpIconClickListener, addListener, addShortcutListener, attach, detach, ensureContextHelpInitialized, findAncestor, fireComponentErrorEvent, fireComponentEvent, fireContextHelpClick, getActionManager, getComponentErrorProvider, getContextHelpText, getCustomAttributes, getData, getJTestId, getLocale, getParent, getRequiredError, isConnectorEnabled, isContextHelpTextHtmlEnabled, isOrHasAncestor, isReadOnly, isRequiredIndicatorVisible, isResponsive, isVisible, removeListener, removeShortcutListener, setComponentErrorProvider, setContextHelpText, setContextHelpTextHtmlEnabled, setData, setHeightFull, setLocale, setParent, setReadOnly, setRequiredError, setRequiredIndicatorVisible, setResponsive, setVisible, setWidthFull

    Methods inherited from class com.vaadin.server.AbstractClientConnector

    addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getIncorrectConcurrentAccessHandler, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setConnectorResource, setErrorHandler, setIncorrectConcurrentAccessHandler, setResource, updateDiffstate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier

    addShortcutListener, removeShortcutListener

    Methods inherited from interface com.vaadin.server.ClientConnector

    addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler

    Methods inherited from interface com.vaadin.ui.Component

    addListener, addStyleNames, attach, getDescription, getJTestId, getLocale, getParent, getUI, isEnabled, isVisible, removeListener, removeStyleNames, setEnabled, setParent, setVisible

    Methods inherited from interface com.vaadin.shared.Connector

    getConnectorId

    Methods inherited from interface com.vaadin.data.HasHierarchicalDataProvider

    getTreeData, setItems, setItems, setItems, setItems, setItems, setTreeData

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface com.vaadin.server.Sizeable

    getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightFull, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull, setWidthUndefined
  • Field Details

    • debugId

      protected String debugId
  • Constructor Details

    • JmixTree

      public JmixTree()
  • Method Details

    • createTreeGrid

      protected com.vaadin.ui.TreeGrid<T> createTreeGrid()
      Overrides:
      createTreeGrid in class com.vaadin.ui.Tree<T>
    • setJTestId

      public void setJTestId(String jmixId)
      Specified by:
      setJTestId in interface com.vaadin.ui.Component
      Overrides:
      setJTestId in class com.vaadin.ui.AbstractComponent
    • setId

      public void setId(String id)
      Specified by:
      setId in interface com.vaadin.ui.Component
      Overrides:
      setId in class com.vaadin.ui.Tree<T>
    • getId

      public String getId()
      Specified by:
      getId in interface com.vaadin.ui.Component
      Overrides:
      getId in class com.vaadin.ui.Tree<T>
    • getCompositionRoot

      public JmixTreeGrid<T> getCompositionRoot()
      Overrides:
      getCompositionRoot in class com.vaadin.ui.Composite
    • setGridSelectionModel

      public void setGridSelectionModel(com.vaadin.ui.components.grid.GridSelectionModel<T> model)
    • getSelectionMode

      @Nullable protected com.vaadin.ui.Grid.SelectionMode getSelectionMode()
      Overrides:
      getSelectionMode in class com.vaadin.ui.Tree<T>
    • setDataProvider

      public void setDataProvider(com.vaadin.data.provider.DataProvider<T,?> dataProvider)
      Specified by:
      setDataProvider in interface com.vaadin.data.HasDataProvider<T>
      Overrides:
      setDataProvider in class com.vaadin.ui.Tree<T>
    • getChildren

      public Collection<T> getChildren(@Nullable T item)
    • hasChildren

      public boolean hasChildren(T item)
    • getItems

      public Stream<T> getItems()
    • getParentItem

      protected T getParentItem(T item)
    • expandAll

      public void expandAll()
    • expandItemWithParents

      public void expandItemWithParents(@Nullable T item)
    • collapseAll

      public void collapseAll()
    • collapseItemWithChildren

      public void collapseItemWithChildren(T item)
    • expandUpTo

      public void expandUpTo(int level)
    • deselectAll

      public void deselectAll()
    • repaint

      public void repaint()