org.xnap.gui.table
Class TreeTableModelAdapter

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.xnap.gui.table.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
Author:
Philip Milne, Scott Violet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TreeTableModelAdapter(TreeTableModel treeTableModel, javax.swing.JTree tree)
           
 
Method Summary
protected  void delayedFireTableDataChanged()
          Invokes fireTableDataChanged after all the pending events have been processed.
protected  void delayedFireTableRowsDeleted()
           
protected  void delayedFireTableRowsInserted()
           
protected  void delayedFireTableRowsUpdated()
           
 java.lang.Class getColumnClass(int column)
           
 int getColumnCount()
           
 java.lang.String getColumnName(int column)
           
 int getRowCount()
           
 java.lang.Object getValueAt(int row, int column)
           
 boolean isCellEditable(int row, int column)
           
protected  java.lang.Object nodeForRow(int row)
           
 void setValueAt(java.lang.Object value, int row, int column)
           
 
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
 

Constructor Detail

TreeTableModelAdapter

public TreeTableModelAdapter(TreeTableModel treeTableModel,
                             javax.swing.JTree tree)
Method Detail

getColumnCount

public int getColumnCount()

getColumnName

public java.lang.String getColumnName(int column)
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel

getColumnClass

public java.lang.Class getColumnClass(int column)
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel

getRowCount

public int getRowCount()

nodeForRow

protected java.lang.Object nodeForRow(int row)

getValueAt

public java.lang.Object getValueAt(int row,
                                   int column)

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Specified by:
isCellEditable in interface javax.swing.table.TableModel
Overrides:
isCellEditable in class javax.swing.table.AbstractTableModel

setValueAt

public void setValueAt(java.lang.Object value,
                       int row,
                       int column)
Specified by:
setValueAt in interface javax.swing.table.TableModel
Overrides:
setValueAt in class javax.swing.table.AbstractTableModel

delayedFireTableDataChanged

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


delayedFireTableRowsInserted

protected void delayedFireTableRowsInserted()

delayedFireTableRowsDeleted

protected void delayedFireTableRowsDeleted()

delayedFireTableRowsUpdated

protected void delayedFireTableRowsUpdated()


Copyright © 2001-2005 XNap Team. All Rights Reserved.