Class DefaultTreeTableModel

  • All Implemented Interfaces:
    TreeTableModel, javax.swing.tree.TreeModel

    public class DefaultTreeTableModel
    extends AbstractTreeTableModel
    Default implementation of the TreeTableModel interface.
    • Field Detail

      • columns

        protected java.lang.String[] columns
        The column names.
      • editable

        protected boolean[] editable
        The editable columns.
    • Constructor Detail

      • DefaultTreeTableModel

        public DefaultTreeTableModel​(TreeTableNode root,
                                     java.lang.String[] columns)
        Create a new tree table model with the given root node and column names.
        Parameters:
        root - The root node.
        columns - The column names.
      • DefaultTreeTableModel

        public DefaultTreeTableModel​(TreeTableNode root,
                                     java.lang.String[] columns,
                                     boolean[] editable)
        Create a new tree table model with the given root node and column names.
        Parameters:
        root - The root node.
        columns - The column names.
        editable - The editable columns.
    • Method Detail

      • getChild

        public java.lang.Object getChild​(java.lang.Object node,
                                         int index)
        Get a child of a node.
        Parameters:
        node - The node.
        index - The index of the child.
        Returns:
        The child at the specified index.
      • getChildCount

        public int getChildCount​(java.lang.Object node)
        Get the number of children of a node.
        Parameters:
        node - The node.
        Returns:
        The number of children of a node.
      • getValueAt

        public java.lang.Object getValueAt​(java.lang.Object node,
                                           int column)
        Get the number of children of a node.
        Parameters:
        node - The node.
        column - The column.
        Returns:
        The node's value at the specified column.
      • getColumnCount

        public int getColumnCount()
        Get the number of columns.
        Returns:
        The number of columns.
      • getColumnName

        public java.lang.String getColumnName​(int column)
        Get the name of a column.
        Parameters:
        column - The column.
        Returns:
        The name of the column.