org.xnap.gui.table
Class AbstractColumnTableModel

java.lang.Object
  extended by javax.swing.table.AbstractTableModel
      extended by org.xnap.gui.table.AbstractSortableTableModel
          extended by org.xnap.gui.table.AbstractColumnTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel, ColumnModel, SortableModel
Direct Known Subclasses:
AzureusTrackerTableModel, ChannelTableModel, FreewayPanel.FreewayStatsTableModel, HotlistTableModel, JTellaConnectionTableModel, LibraryTableModel, LimeWireConnectionTableModel, OpenNapWhoisTableModel, PeerTableModel, ZipFileTableModel

public abstract class AbstractColumnTableModel
extends AbstractSortableTableModel
implements ColumnModel

Provides a sortable table model with dynamic column support.

See Also:
Serialized Form

Field Summary
protected  java.util.List columns
           
 
Fields inherited from class org.xnap.gui.table.AbstractSortableTableModel
ascending, compares, indexes, lastSortedColumn, maintainSortOrder, revIndexes, sortingColumns
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
AbstractColumnTableModel()
           
 
Method Summary
 void addColumn(Column c)
           
 void addColumns(Column[] columns)
           
 javax.swing.JMenu createColumnMenu(java.lang.String name, TablePreferencesProvider tpp, java.lang.String table)
           
 javax.swing.JTable createTable(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.
 
Methods inherited from class org.xnap.gui.table.AbstractSortableTableModel
compare, compareRowsByColumn, fireTableChanged, get, getSortedColumn, getValueAt, isCellEditable, isSortedAscending, mapToDtmIndex, mapToIndex, n2sort, reallocateIndexes, reallocateIndexes, resort, set, setMaintainSortOrder, setSortedAscending, setValueAt, shuttlesort, sort, sortByColumn, swap
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, 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
 
Methods inherited from interface javax.swing.table.TableModel
getRowCount
 

Field Detail

columns

protected java.util.List columns
Constructor Detail

AbstractColumnTableModel

public AbstractColumnTableModel()
Method Detail

createTable

public javax.swing.JTable createTable(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 javax.swing.table.TableModel
Specified by:
getColumnClass in interface SortableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
See Also:
TableHeaderHandler.sortByColumn(int)

getColumnCount

public int getColumnCount()
Returns the number of columns.

Specified by:
getColumnCount in interface javax.swing.table.TableModel
Specified by:
getColumnCount in interface ColumnModel

getColumnName

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

Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel


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