org.xnap.gui.table
Class AbstractColumnTreeTableModel

java.lang.Object
  extended by org.xnap.gui.table.AbstractTreeTableModel
      extended by org.xnap.gui.table.AbstractColumnTreeTableModel
All Implemented Interfaces:
javax.swing.tree.TreeModel, ColumnModel, SortableModel, TreeTableModel
Direct Known Subclasses:
DefaultColumnTreeTableModel

public abstract class AbstractColumnTreeTableModel
extends AbstractTreeTableModel
implements ColumnModel, SortableModel

Provides a sortable table model with dynamic column support. FIX: maintainSortOrder


Field Summary
protected  java.util.List columns
           
 
Fields inherited from class org.xnap.gui.table.AbstractTreeTableModel
listenerList, root
 
Constructor Summary
AbstractColumnTreeTableModel()
           
 
Method Summary
 void addColumn(Column c)
           
 void addColumns(Column[] columns)
           
 javax.swing.JMenu createColumnMenu(java.lang.String name, TablePreferencesProvider tpp, java.lang.String table)
           
 JTreeTable createTreeTable(TablePreferencesProvider tpp, java.lang.String table)
          Creates a table from this model.
 Column getColumnAt(int i)
          Returns the column at index i.
 java.lang.Class getColumnClass(int i)
          Returns the class of the data displayed by the column at index i.
 int getColumnCount()
          Returns the number of columns.
 java.lang.String getColumnName(int i)
          Returns the name of the column at index i.
 boolean isLeaf(java.lang.Object node)
           
 
Methods inherited from class org.xnap.gui.table.AbstractTreeTableModel
addTreeModelListener, fireTreeNodesChanged, fireTreeNodesInserted, fireTreeNodesRemoved, fireTreeStructureChanged, getIndexOfChild, getRoot, isCellEditable, removeTreeModelListener, setValueAt, valueForPathChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xnap.gui.table.SortableModel
getSortedColumn, isSortedAscending, setMaintainSortOrder, sortByColumn
 
Methods inherited from interface org.xnap.gui.table.TreeTableModel
getValueAt
 
Methods inherited from interface javax.swing.tree.TreeModel
getChild, getChildCount
 

Field Detail

columns

protected java.util.List columns
Constructor Detail

AbstractColumnTreeTableModel

public AbstractColumnTreeTableModel()
Method Detail

createTreeTable

public JTreeTable createTreeTable(TablePreferencesProvider tpp,
                                  java.lang.String table)
Creates a table from this model.


createColumnMenu

public javax.swing.JMenu createColumnMenu(java.lang.String name,
                                          TablePreferencesProvider tpp,
                                          java.lang.String table)

addColumn

public void addColumn(Column c)

addColumns

public void addColumns(Column[] columns)

getColumnAt

public Column getColumnAt(int i)
Returns the column at index i.

Specified by:
getColumnAt in interface ColumnModel

getColumnClass

public java.lang.Class getColumnClass(int i)
Returns the class of the data displayed by the column at index i.

Specified by:
getColumnClass in interface SortableModel
Specified by:
getColumnClass in interface TreeTableModel
Overrides:
getColumnClass in class AbstractTreeTableModel
See Also:
TableHeaderHandler.sortByColumn(int)

getColumnCount

public int getColumnCount()
Returns the number of columns.

Specified by:
getColumnCount in interface ColumnModel
Specified by:
getColumnCount in interface TreeTableModel

getColumnName

public java.lang.String getColumnName(int i)
Returns the name of the column at index i.

Specified by:
getColumnName in interface TreeTableModel

isLeaf

public boolean isLeaf(java.lang.Object node)
Specified by:
isLeaf in interface javax.swing.tree.TreeModel
Overrides:
isLeaf in class AbstractTreeTableModel


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