Interface TreeTableNode

All Superinterfaces:
MutableTreeNode, TreeNode
All Known Implementing Classes:
DefaultTreeTableNode, EDRTreeTableNode

public interface TreeTableNode extends MutableTreeNode
A mutable tree node that supports column data in order to provide a usable API for a tree table. The tree node also supports sorting of the tree based on a specified column.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The default column in the tree table that contains the tree.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Get an index to insert a new child into the node that is consistent with the current ordering of the children (if any).
    int
     
    getValueAt(int columnIndex)
    Sets the value in the node at columnIndex to aValue.
    boolean
    Determine if the children are sorted
    void
    setTreeColumn(int column)
    Set the column in the tree table that contains the tree.
    void
    setValueAt(Object aValue, int columnIndex)
    Sets the value in the node at columnIndex to aValue.
    void
    sort(int column, boolean ascending)
    Sort the children according to the values of the input column identifier, in either ascending or descending order.
    void
    sort(int column, boolean ascending, boolean asksAllowsChildren)
    Sort the children according to the values of the input column identifier, in either ascending or descending order.
    void
    Sort the children using the natural ordering of the nodes according to the specified comparator.
    void
    sort(TreeTableNodeComparator comparator, int column, boolean ascending, boolean asksAllowsChildren)
    Sort the children using the natural ordering of the nodes according to the specified comparator.

    Methods inherited from interface javax.swing.tree.MutableTreeNode

    insert, remove, remove, removeFromParent, setParent, setUserObject

    Methods inherited from interface javax.swing.tree.TreeNode

    children, getAllowsChildren, getChildAt, getChildCount, getIndex, getParent, isLeaf
  • Field Details

    • DEFAULT_TREE_COLUMN

      static final int DEFAULT_TREE_COLUMN
      The default column in the tree table that contains the tree.
      See Also:
  • Method Details

    • getValueAt

      Object getValueAt(int columnIndex)
      Sets the value in the node at columnIndex to aValue.
    • setValueAt

      void setValueAt(Object aValue, int columnIndex)
      Sets the value in the node at columnIndex to aValue.
    • setTreeColumn

      void setTreeColumn(int column)
      Set the column in the tree table that contains the tree.
      Parameters:
      column -
    • getTreeColumn

      int getTreeColumn()
      Returns:
      the column in the tree table that contains the tree.
    • sort

      void sort(int column, boolean ascending)
      Sort the children according to the values of the input column identifier, in either ascending or descending order.
    • sort

      void sort(int column, boolean ascending, boolean asksAllowsChildren)
      Sort the children according to the values of the input column identifier, in either ascending or descending order. Also specify how the ordering determines whether the child node is a branch or a leaf.
    • sort

      void sort(TreeTableNodeComparator comparator, int column, boolean ascending, boolean asksAllowsChildren)
      Sort the children using the natural ordering of the nodes according to the specified comparator.
    • sort

      void sort(TreeTableNodeComparator comparator)
      Sort the children using the natural ordering of the nodes according to the specified comparator.
    • isSorted

      boolean isSorted()
      Determine if the children are sorted
    • getIndexForNewChild

      int getIndexForNewChild(TreeTableNode newChild)
      Get an index to insert a new child into the node that is consistent with the current ordering of the children (if any).