Class TreeTableModelAdapter

java.lang.Object
javax.swing.table.AbstractTableModel
org.cytoscape.util.swing.TreeTableModelAdapter
All Implemented Interfaces:
Serializable, TableModel

public final class TreeTableModelAdapter extends AbstractTableModel
This is a wrapper class takes a TreeTableModel and implements the table model interface. The implementation is trivial, with all of the event dispatching support provided by the superclass: the AbstractTableModel.
Version:
1.2 10/27/98
Author:
Philip Milne, Scott Violet
See Also:

Cytoscape Backwards Compatibility (Final Class): This class is final and therefore can't be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.

Module: swing-util-api

To use this in your app, include the following dependency in your POM:

<dependency>
    <groupId>org.cytoscape</groupId>
    <artifactId>swing-util-api</artifactId>
</dependency>
  • Constructor Details

    • TreeTableModelAdapter

      public TreeTableModelAdapter(TreeTableModel treeTableModel, JTree tree)
      Creates a new TreeTableModelAdapter object.
      Parameters:
      treeTableModel - The tree table model.
      tree - The tree itself.
  • Method Details

    • getColumnCount

      public int getColumnCount()
      Returns the number of columns in the TreeTabelModel.
      Returns:
      the int number of columns in the TreeTabelModel.
    • getColumnName

      public String getColumnName(int column)
      Returns the column name at the given column number.
      Specified by:
      getColumnName in interface TableModel
      Overrides:
      getColumnName in class AbstractTableModel
      Parameters:
      column - The column number.
      Returns:
      The name of the column,.
    • getColumnClass

      public Class getColumnClass(int column)
      Returns the class of the column at the given column number.
      Specified by:
      getColumnClass in interface TableModel
      Overrides:
      getColumnClass in class AbstractTableModel
      Parameters:
      column - The column number.
      Returns:
      The class of the column.
    • getRowCount

      public int getRowCount()
      Returns the number of rows in the JTree.
      Returns:
      The int number of rows in the JTree.
    • getValueAt

      public Object getValueAt(int row, int column)
      Returns the value at the given row and column.
      Parameters:
      row - The row number.
      column - The column number.
      Returns:
      The value at the given location.
    • isCellEditable

      public boolean isCellEditable(int row, int column)
      Returns whether the cell at the given location is editable.
      Specified by:
      isCellEditable in interface TableModel
      Overrides:
      isCellEditable in class AbstractTableModel
      Parameters:
      row - The row number.
      column - The column number.
      Returns:
      True if the cell is editable, false otherwise.
    • setValueAt

      public void setValueAt(Object value, int row, int column)
      Sets the value at the given row and column..
      Specified by:
      setValueAt in interface TableModel
      Overrides:
      setValueAt in class AbstractTableModel
      Parameters:
      value - The value to set to.
      row - The row number.
      column - The column number.
    • delayedFireTableDataChanged

      protected void delayedFireTableDataChanged()
      Invokes fireTableDataChanged after all the pending events have been processed. SwingUtilities.invokeLater is used to handle this.