Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.gui
Class TreeTableModelAdapter  view TreeTableModelAdapter download TreeTableModelAdapter.java

java.lang.Object
  extended byjavax.swing.table.AbstractTableModel
      extended bycom.puppycrawl.tools.checkstyle.gui.TreeTableModelAdapter
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel

public class TreeTableModelAdapter
extends javax.swing.table.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

Field Summary
private  javax.swing.JTree mTree
           
private  TreeTableModel mTreeTableModel
           
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TreeTableModelAdapter(TreeTableModel aTreeTableModel, javax.swing.JTree aTree)
           
 
Method Summary
protected  void delayedFireTableDataChanged()
          Invokes fireTableDataChanged after all the pending events have been processed.
 java.lang.Class getColumnClass(int column)
          Returns the Class for all Object instances in the specified column.
 int getColumnCount()
          Returns the number of columns in the model.
 java.lang.String getColumnName(int column)
          Returns the name of the specified column.
 int getRowCount()
          Returns the number of rows in the model.
 java.lang.Object getValueAt(int row, int column)
          Returns the value (Object) at a particular cell in the table.
 boolean isCellEditable(int row, int column)
          Returns true if the specified cell is editable, and false if it is not.
protected  java.lang.Object nodeForRow(int row)
           
 void setValueAt(java.lang.Object value, int row, int column)
          Sets the value of the given cell.
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mTree

private javax.swing.JTree mTree

mTreeTableModel

private TreeTableModel mTreeTableModel
Constructor Detail

TreeTableModelAdapter

public TreeTableModelAdapter(TreeTableModel aTreeTableModel,
                             javax.swing.JTree aTree)
Method Detail

getColumnCount

public int getColumnCount()
Description copied from interface: javax.swing.table.TableModel
Returns the number of columns in the model.


getColumnName

public java.lang.String getColumnName(int column)
Description copied from class: javax.swing.table.AbstractTableModel
Returns the name of the specified column. This method generates default names in a sequence (starting with column 0): A, B, C, ..., Z, AA, AB, AC, ..., AZ, BA, BB, BC, and so on. Subclasses may override this method to allow column names to be specified on some other basis.


getColumnClass

public java.lang.Class getColumnClass(int column)
Description copied from class: javax.swing.table.AbstractTableModel
Returns the Class for all Object instances in the specified column.


getRowCount

public int getRowCount()
Description copied from interface: javax.swing.table.TableModel
Returns the number of rows in the model.


nodeForRow

protected java.lang.Object nodeForRow(int row)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)
Description copied from interface: javax.swing.table.TableModel
Returns the value (Object) at a particular cell in the table.


isCellEditable

public boolean isCellEditable(int row,
                              int column)
Description copied from class: javax.swing.table.AbstractTableModel
Returns true if the specified cell is editable, and false if it is not. This implementation returns false for all arguments, subclasses should override the method if necessary.


setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Description copied from class: javax.swing.table.AbstractTableModel
Sets the value of the given cell. This implementation ignores all arguments and does nothing, subclasses should override the method if necessary.


delayedFireTableDataChanged

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