|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.swing.table.AbstractTableModel
com.sciapp.table.TableMap
public class TableMap
TableMap is a wrapper around a given TableModel instance, just as ListTableMap is for ListTableModel. The methods of TableModel that are implemented are nothing more than calls to the respective methods of the underlying TableModel.
| Field Summary | |
|---|---|
protected TableModel |
tableModel
The underlying ListTableModel |
| Fields inherited from class javax.swing.table.AbstractTableModel |
|---|
listenerList |
| Constructor Summary | |
|---|---|
TableMap(TableModel tableModel)
Constructs a TableMap having tableModel as the underlying TableModel |
|
| Method Summary | |
|---|---|
void |
addReorderListener(ReorderListener l)
Adds a ReorderListener that is notified each time a change to the data model occurs so that the table updates the selected rows accordingly. |
void |
fireRowsMapped(int[] changedIndices)
Notifies listeners that the rows of the table have been reordered according to the changedIndices map. |
void |
fireRowsReordered(ReorderEvent event)
Notifies listeners that the rows of the table have been reordered in some way. |
Class |
getColumnClass(int c)
Returns tableModel.getColumnClass |
int |
getColumnCount()
Returns tableModel.getColumnCount |
String |
getColumnName(int columnIndex)
Returns tableModel.getColumnName |
TableModel |
getModel()
Returns the underlying TableModel instance. |
int |
getRowCount()
Returns tableModel.getRowCount |
Object |
getValueAt(int row,
int column)
Returns tableModel.getValueAt |
boolean |
isCellEditable(int rowIndex,
int columnIndex)
Returns tableModel.isCellEditable |
void |
removeReorderListener(ReorderListener l)
Removes a listener from the list that is notified each time a reorder event is generated. |
void |
rowsReordered(ReorderEvent e)
Called whenever the rows of a JTable have been restructured. |
void |
setModel(TableModel newModel)
Sets the underlying TableModel to newModel. |
void |
setValueAt(Object aValue,
int rowIndex,
int columnIndex)
Returns tableModel.setValueAt |
void |
tableChanged(TableModelEvent e)
Fires the event to its TableModelListeners. |
| 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 |
| Field Detail |
|---|
protected TableModel tableModel
| Constructor Detail |
|---|
public TableMap(TableModel tableModel)
| Method Detail |
|---|
public void addReorderListener(ReorderListener l)
addReorderListener in interface ReorderModell - the ReorderListenerpublic void fireRowsMapped(int[] changedIndices)
fireRowsMapped in interface ReorderModelchangedIndices - int array indicating how the rows have been reordered.ReorderEventpublic void fireRowsReordered(ReorderEvent event)
fireRowsReordered in interface ReorderModelevent - the reorder event.ReorderEventpublic Class getColumnClass(int c)
getColumnClass in interface TableModelgetColumnClass in class AbstractTableModelc - the column being queried
public int getColumnCount()
getColumnCount in interface TableModelTableModel.getRowCount()public String getColumnName(int columnIndex)
getColumnName in interface TableModelgetColumnName in class AbstractTableModelcolumnIndex - the column being queried
columnpublic TableModel getModel()
public int getRowCount()
getRowCount in interface TableModelTableModel.getColumnCount()
public Object getValueAt(int row,
int column)
getValueAt in interface TableModelrow - the row whose value is to be queriedcolumn - the column whose value is to be queried
public boolean isCellEditable(int rowIndex,
int columnIndex)
isCellEditable in interface TableModelisCellEditable in class AbstractTableModelrowIndex - the row being queriedcolumnIndex - the column being queried
TableModel.setValueAt(java.lang.Object, int, int)public void removeReorderListener(ReorderListener l)
removeReorderListener in interface ReorderModell - the RearrangeListenerpublic void rowsReordered(ReorderEvent e)
rowsReordered in interface ReorderListenere - the ReorderEvent objectpublic void setModel(TableModel newModel)
newModel - the new TableModel to assign.
public void setValueAt(Object aValue,
int rowIndex,
int columnIndex)
setValueAt in interface TableModelsetValueAt in class AbstractTableModelaValue - value to assign to cellrowIndex - row of cellcolumnIndex - column of cellTableModel.getValueAt(int, int),
TableModel.isCellEditable(int, int)public void tableChanged(TableModelEvent e)
tableChanged in interface TableModelListener
|
Copyright © 2005 Scientific Applications. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||