Interface TreeTableModel

    • Method Detail

      • getColumnClass

        Class<?> getColumnClass​(int columnIndex)
        Returns the most specific superclass for all the cell values in the column. This is used by the JXTreeTable to set up a default renderer and editor for the column.
        Parameters:
        columnIndex - the index of the column
        Returns:
        the common ancestor class of the object values in the model.
        See Also:
        TableModel.getColumnClass(int)
      • getColumnCount

        int getColumnCount()
        Returns the number of columns in the model. A JXTreeTable uses this method to determine how many columns it should create and display by default.
        Returns:
        the number of columns in the model
        See Also:
        TableModel.getColumnCount()
      • getColumnName

        String getColumnName​(int column)
        Returns the name of the column at columnIndex. This is used to initialize the table's column header name. Note: this name does not need to be unique; two columns in a table can have the same name.
        Parameters:
        column - the index of the column
        Returns:
        the name of the column
        See Also:
        TableModel.getColumnName(int)
      • getHierarchicalColumn

        int getHierarchicalColumn()
        Returns the column that is the "tree" column. While it is not required, most implementations will default the first column to be the hierarchical one.
        Returns:
        the index of the hierarchical column or -1 if no column is the hierarchical column.
      • isCellEditable

        boolean isCellEditable​(Object node,
                               int column)
        Returns true if the cell for the node at columnIndex is editable. Otherwise, setValueAt on the cell will not change the value of that cell. The node must be managed by this model. Unamanaged nodes should throw an IllegalArgumentException.
        Parameters:
        node - the node whose value to be queried
        column - the column whose value to be queried
        Returns:
        true if the cell is editable
        Throws:
        IllegalArgumentException - if node is not managed by this model.
        See Also:
        setValueAt(java.lang.Object, java.lang.Object, int), TableModel.isCellEditable(int, int)