Class TreeView

All Implemented Interfaces:
Control, Enableable, HasAttribute, HasClassName, HasComputedStyle, HasControlText, HasDestroy, HasStyle, HasTooltip, HasVisibility

public final class TreeView extends AbstractDwcControl
  • Constructor Details

    • TreeView

      public TreeView()
  • Method Details

    • create

      protected void create(AbstractDwcjPanel p)
      Description copied from class: AbstractControl
      Create the object on a panel p. The preferred way of creating an object is using the Panel::add(Control) method, instead of this
      Overrides:
      create in class AbstractControl
      Parameters:
      p - the panel to add this control on
    • addExpandableNode

      public void addExpandableNode(int childID, int parentID, String text)
    • addNode

      public void addNode(int childID, int parentID, String text)
    • clearImageSize

      public void clearImageSize()
    • getChild

      public int getChild(int parentID, int index)
    • getChildIndex

      public int getChildIndex(int parentID)
    • getParentNode

      public int getParentNode(int childID)
    • getRoot

      public int getRoot()
    • insertExpandableNode

      public void insertExpandableNode(int childID, int parentID, String text, int index)
    • insertNode

      public void insertNode(int childID, int parentID, String text, int index)
    • isLeafNode

      public boolean isLeafNode(int id)
    • removeDescendants

      public void removeDescendants(int id)
    • removeNode

      public void removeNode(int id)
    • setRoot

      public void setRoot(int id, String text)
    • collapseNode

      public void collapseNode(int id)
    • collapseTreeFromNode

      public void collapseTreeFromNode(int id)
    • expandNode

      public void expandNode(int id)
    • expandTreeFromNode

      public void expandTreeFromNode(int id)
    • getCollapsedNode

      public int getCollapsedNode()
    • getExpandedNode

      public int getExpandedNode()
    • getExpandedNodes

      public List<Integer> getExpandedNodes()
    • isNodeExpandable

      public boolean isNodeExpandable(int id)
    • isNodeExpanded

      public boolean isNodeExpanded(int id)
    • getNodeText

      public String getNodeText(int id)
    • setNodeText

      public void setNodeText(int id, String text)
    • editNode

      public void editNode(int id)
    • endEdit

      public void endEdit()
    • isNodeEditable

      public boolean isNodeEditable(int id)
    • isTreeEditable

      public boolean isTreeEditable()
    • setNodeEditable

      public void setNodeEditable(int id, boolean editable)
    • setTreeEditable

      public void setTreeEditable(boolean editable)
    • clearNodeIcon

      public void clearNodeIcon(int id)
    • clearNodeSelectedIcon

      public void clearNodeSelectedIcon(int id)
    • setCollapsedIcon

      public void setCollapsedIcon(Icon icon)
    • setExpandedIcon

      public void setExpandedIcon(Icon icon)
    • setLeafIcon

      public void setLeafIcon(Icon icon)
    • setNodeIcon

      public void setNodeIcon(int id, Icon icon)
    • setNodeSelectedIcon

      public void setNodeSelectedIcon(int id, Icon icon)
    • setSelectedIcon

      public void setSelectedIcon(Icon icon)
    • deselectAll

      public void deselectAll()
    • deselectChildren

      public void deselectChildren(int parentID)
    • deselectNode

      public void deselectNode(int id)
    • getSelectedNode

      public int getSelectedNode()
    • getSelectedNodes

      public List<Integer> getSelectedNodes()
    • getSelectionMode

      public int getSelectionMode()
    • isNodeSelected

      public boolean isNodeSelected(int id)
    • isRootVisible

      public boolean isRootVisible()
    • selectChildren

      public void selectChildren(int parentID)
    • selectNode

      public void selectNode(int id)
    • setNodeVisible

      public void setNodeVisible(int id)
    • setRootVisible

      public void setRootVisible(boolean visible)
    • setSelectionMode

      public void setSelectionMode(int mode)
    • getNodeToolTipText

      public String getNodeToolTipText(int id)
    • setNodeToolTipText

      public void setNodeToolTipText(int id, String text)
    • isDragEnabled

      public boolean isDragEnabled()
    • getDragType

      public String getDragType(int id)
    • getDropTypes

      public List<String> getDropTypes(int id)
    • setDragEnabled

      public void setDragEnabled(boolean enabled)
    • setDragType

      public void setDragType(int id, String type)
    • setDropTypes

      public void setDropTypes(int id, List<String> types)
    • onGainedFocus

      public TreeView onGainedFocus(Consumer<TreeGainedFocusEvent> callback)
    • onLostFocus

      public TreeView onLostFocus(Consumer<TreeLostFocusEvent> callback)
    • onSelect

      public TreeView onSelect(Consumer<TreeSelectedEvent> callback)
    • onDeselect

      public TreeView onDeselect(Consumer<TreeDeselectEvent> callback)
    • onExpand

      public TreeView onExpand(Consumer<TreeExpandedEvent> callback)
    • onCollapse

      public TreeView onCollapse(Consumer<TreeCollapseEvent> callback)
    • onEditStopped

      public TreeView onEditStopped(Consumer<TreeEditStoppedEvent> callback)
    • onDoubleClick

      public TreeView onDoubleClick(Consumer<TreeDoubleClickedEvent> callback)
    • setText

      public TreeView setText(String text)
      Description copied from interface: HasControlText
      set the text of the control Each control implementing this interface has a text property, which might be visible in different ways (caption, title, contents of edit) or sometimes not visible at all
      Specified by:
      setText in interface HasControlText
      Overrides:
      setText in class AbstractDwcControl
      Returns:
      the control itself
    • setVisible

      public TreeView setVisible(Boolean visible)
      Description copied from interface: HasVisibility
      Set whether the control is visible or invisible
      Specified by:
      setVisible in interface HasVisibility
      Overrides:
      setVisible in class AbstractDwcControl
      Returns:
      the control itself
    • setEnabled

      public TreeView setEnabled(Boolean enabled)
      Description copied from interface: Enableable
      Set whether the control is to be enabled
      Specified by:
      setEnabled in interface Enableable
      Overrides:
      setEnabled in class AbstractDwcControl
      Returns:
      the control itself
    • setTooltipText

      public TreeView setTooltipText(String text)
      Description copied from interface: HasTooltip
      Set the tooltip text of the control
      Specified by:
      setTooltipText in interface HasTooltip
      Overrides:
      setTooltipText in class AbstractDwcControl
      Returns:
      the control itself
    • setAttribute

      public TreeView setAttribute(String attribute, String value)
      Description copied from class: AbstractDwcControl
      set the value for an attribute in the control
      Specified by:
      setAttribute in interface HasAttribute
      Overrides:
      setAttribute in class AbstractDwcControl
      Parameters:
      attribute - the name of the attribute
      value - the value to be set
      Returns:
      the control itself
    • setId

      public TreeView setId(String elementId)
      Description copied from interface: Control
      Assigns the ID of a control
      Specified by:
      setId in interface Control
      Overrides:
      setId in class AbstractControl
      Parameters:
      elementId - Desired ID designation
      Returns:
      The control itself
    • setStyle

      public TreeView setStyle(String property, String value)
      Description copied from interface: HasStyle
      Assigns specified value to the specified CSS property
      Specified by:
      setStyle in interface HasStyle
      Overrides:
      setStyle in class AbstractDwcControl
      Parameters:
      property - The CSS property to be changed
      value - The value of the selected CSS property
      Returns:
      The control itself
    • addClassName

      public TreeView addClassName(String selector)
      Description copied from interface: HasClassName
      Adds a CSS class to the list of CSS classes for the control.
      Specified by:
      addClassName in interface HasClassName
      Overrides:
      addClassName in class AbstractDwcControl
      Returns:
      The control itself
    • removeClassName

      public TreeView removeClassName(String selector)
      Description copied from interface: HasClassName
      Removes a CSS class from the list of CSS classes for the control.
      Specified by:
      removeClassName in interface HasClassName
      Overrides:
      removeClassName in class AbstractDwcControl
      Returns:
      The control itself
    • setExpanse

      public TreeView setExpanse(TreeView.Expanse expanse)