SalesPoint Framework v3.0

util.swing
Class TableMap

java.lang.Object
  |
  +--javax.swing.table.AbstractTableModel
        |
        +--util.swing.AbstractTableModel
              |
              +--util.swing.TableMap
Direct Known Subclasses:
TableSorter

public class TableMap
extends AbstractTableModel
implements TableModelListener

In a chain of data manipulators some behaviour is common. TableMap provides most of this behavour and can be subclassed by filters that only need to override a handful of specific methods. TableMap implements TableModel by routing all requests to its model, and TableModelListener by routing all events to its listeners. Inserting a TableMap which has not been subclassed into a chain of table filters should have no effect. Habe diese Implementation mit geringen ?nderungen in dieses Package ?bernommen.

Version:
1.4 12/17/97
Author:
Philip Milne, Thomas Medack
See Also:
Serialized Form

Field Summary
protected  AbstractTableModel model
          Das Tablemodel.
 
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
 
Constructor Summary
TableMap()
          Konstruktor.
 
Method Summary
 Class getColumnClass(int aColumn)
          Klassenzugeh?rigkeit der Spalten.
 int getColumnCount()
          Die Anzahl der Spalten.
 String getColumnName(int aColumn)
          Namen der Spalten.
 AbstractTableModel getModel()
          Gibt das Model zur?ck.
 Object getRecord(int row)
          Wrapper - getRecord
 int getRowCount()
          Anzahl der Zeilen.
 Object getValueAt(int aRow, int aColumn)
          Wrapping - getValueAt
 boolean isCellEditable(int row, int column)
          Editierbar oder nicht.
 void setModel(AbstractTableModel model)
          Setzt das Tablemodel.
 void setValueAt(Object aValue, int aRow, int aColumn)
          Wrapping - setValueAt
 void tableChanged(TableModelEvent e)
          Wrapping Tablemodellistener.
 
Methods inherited from class util.swing.AbstractTableModel
getEntryDescriptor, orderByColumn, reOrderBy
 
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, removeTableModelListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

model

protected AbstractTableModel model
Das Tablemodel.
Constructor Detail

TableMap

public TableMap()
Konstruktor.
Method Detail

getModel

public AbstractTableModel getModel()
Gibt das Model zur?ck.
Returns:
das Tablemodel.

setModel

public void setModel(AbstractTableModel model)
Setzt das Tablemodel.
Parameters:
model - das Tablemodel.

getValueAt

public Object getValueAt(int aRow,
                         int aColumn)
Wrapping - getValueAt
Parameters:
aRow - die Zeile.
aColumn - die Spalte
Returns:
der Wert.
Overrides:
getValueAt in class AbstractTableModel

setValueAt

public void setValueAt(Object aValue,
                       int aRow,
                       int aColumn)
Wrapping - setValueAt
Parameters:
aValue - der Wert.
aRow - die Zeile.
aColumn - die Spalte.
Overrides:
setValueAt in class AbstractTableModel

getRowCount

public int getRowCount()
Anzahl der Zeilen.
Returns:
die Anzahl.
Overrides:
getRowCount in class AbstractTableModel

getColumnCount

public int getColumnCount()
Die Anzahl der Spalten.
Returns:
die Anzahl.
Overrides:
getColumnCount in class AbstractTableModel

getColumnName

public String getColumnName(int aColumn)
Namen der Spalten.
Parameters:
aColumn - die jeweilige Spalte.
Returns:
der Name.
Overrides:
getColumnName in class AbstractTableModel

getColumnClass

public Class getColumnClass(int aColumn)
Klassenzugeh?rigkeit der Spalten.
Parameters:
aColumn - die Spalte.
Returns:
die Klasse.
Overrides:
getColumnClass in class AbstractTableModel

isCellEditable

public boolean isCellEditable(int row,
                              int column)
Editierbar oder nicht.
Parameters:
row - die Zeile.
column - die Spalte.
Returns:
true, falls editierbar.
Overrides:
isCellEditable in class AbstractTableModel

getRecord

public Object getRecord(int row)
Wrapper - getRecord
Parameters:
row - die Zeile
Returns:
das Object
Overrides:
getRecord in class AbstractTableModel

tableChanged

public void tableChanged(TableModelEvent e)
Wrapping Tablemodellistener.
Specified by:
tableChanged in interface TableModelListener
Parameters:
e - das Event.

SalesPoint Framework v3.0