|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.table.AbstractTableModel
org.ozoneDB.adminGui.widget.TableMap
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.
Per Nyfelt
Copyright © 1997-2004 by SMB GmbH. All Rights Reserved.
Field Summary | |
protected int |
columnCount
Contains the number of columns in panel tables. |
protected java.util.Vector |
columnNames
Contains the panel tables column names. |
protected java.util.Vector |
data
Contains the panel tables data. |
protected javax.swing.table.TableModel |
model
Contains the instance to the table model. |
protected int |
rowCount
Contains the number of rows in the panel tables. |
Fields inherited from class javax.swing.table.AbstractTableModel |
listenerList |
Constructor Summary | |
TableMap()
|
Method Summary | |
void |
clear()
This method clears all the elements from the table. |
java.lang.Class |
getColumnClass(int index)
This method returns the class of objects the given column renders. |
int |
getColumnCount()
This method returns the column count in the current table model. |
java.lang.String |
getColumnName(int index)
This method returns the title of a column for the current table model. |
javax.swing.table.TableModel |
getModel()
This method returns a handle for the current table model. |
int |
getRowCount()
This method returns the row count in the current table model. |
java.lang.Object |
getValueAt(int row,
int column)
This method returns the value in a specified cell for the current table model. |
void |
setModel(javax.swing.table.TableModel model)
This method sets the current table model with the designated model. |
void |
setValueAt(java.lang.Object aValue,
int aRow,
int aColumn)
This method sets the value in a specified cell for the current table model. |
void |
tableChanged(javax.swing.event.TableModelEvent e)
This method fires an event when the table is changed. |
Methods inherited from class javax.swing.table.AbstractTableModel |
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected javax.swing.table.TableModel model
protected int columnCount
protected int rowCount
protected java.util.Vector columnNames
protected java.util.Vector data
Constructor Detail |
public TableMap()
Method Detail |
public javax.swing.table.TableModel getModel()
public void setModel(javax.swing.table.TableModel model)
model
- - the new table model.public java.lang.Object getValueAt(int row, int column)
getValueAt
in interface javax.swing.table.TableModel
row
- - the row containing the cell to change.column
- - the column containing the cell to change.
public void setValueAt(java.lang.Object aValue, int aRow, int aColumn)
setValueAt
in interface javax.swing.table.TableModel
aValue
- - the value to set in the table.aRow
- - the row containing the cell to change.aColumn
- - the column containing the cell to change.public int getRowCount()
getRowCount
in interface javax.swing.table.TableModel
public int getColumnCount()
getColumnCount
in interface javax.swing.table.TableModel
public java.lang.String getColumnName(int index)
getColumnName
in interface javax.swing.table.TableModel
index
- - the selected column.
public java.lang.Class getColumnClass(int index)
getColumnClass
in interface javax.swing.table.TableModel
index
- - the selected column.
public void clear()
public void tableChanged(javax.swing.event.TableModelEvent e)
tableChanged
in interface javax.swing.event.TableModelListener
e
- - table model event.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |