Class TreeItem

  • All Implemented Interfaces:
    com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<TreeItem>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasElement, Serializable

    public class TreeItem
    extends com.vaadin.flow.component.Component
    implements com.vaadin.flow.component.ClickNotifier<TreeItem>
    A very simple component composition to implement a trivial tree component.
    Author:
    mstahv
    See Also:
    Serialized Form
    • Constructor Detail

      • TreeItem

        public TreeItem​(com.vaadin.flow.component.Component nodeContent)
      • TreeItem

        public TreeItem​(String stringContent)
    • Method Detail

      • addChild

        public TreeItem addChild​(com.vaadin.flow.component.Component childComponent)
      • getNodeContent

        public com.vaadin.flow.component.Component getNodeContent()
      • addChild

        public void addChild​(TreeItem treeItem)
      • removeChild

        public void removeChild​(TreeItem c)
      • toggleNode

        public void toggleNode()
      • showChildren

        public void showChildren()
      • closeChildren

        public void closeChildren()
      • showChildrenRecursively

        public void showChildrenRecursively()
      • isOpen

        public boolean isOpen()
      • setSelected

        public void setSelected​(boolean selected)
      • addClickListener

        public com.vaadin.flow.shared.Registration addClickListener​(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<TreeItem>> listener)
        Specified by:
        addClickListener in interface com.vaadin.flow.component.ClickNotifier<TreeItem>