|
Copyright © 2011 Citra Technologies. 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.citra.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 ReorderModel
l
- the ReorderListenerpublic void fireRowsMapped(int[] changedIndices)
fireRowsMapped
in interface ReorderModel
changedIndices
- int array indicating how the rows have been reordered.ReorderEvent
public void fireRowsReordered(ReorderEvent event)
fireRowsReordered
in interface ReorderModel
event
- the reorder event.ReorderEvent
public Class getColumnClass(int c)
getColumnClass
in interface TableModel
getColumnClass
in class AbstractTableModel
c
- the column being queried
public int getColumnCount()
getColumnCount
in interface TableModel
TableModel.getRowCount()
public String getColumnName(int columnIndex)
getColumnName
in interface TableModel
getColumnName
in class AbstractTableModel
columnIndex
- the column being queried
column
public TableModel getModel()
public int getRowCount()
getRowCount
in interface TableModel
TableModel.getColumnCount()
public Object getValueAt(int row, int column)
getValueAt
in interface TableModel
row
- 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 TableModel
isCellEditable
in class AbstractTableModel
rowIndex
- the row being queriedcolumnIndex
- the column being queried
TableModel.setValueAt(java.lang.Object, int, int)
public void removeReorderListener(ReorderListener l)
removeReorderListener
in interface ReorderModel
l
- the RearrangeListenerpublic void rowsReordered(ReorderEvent e)
rowsReordered
in interface ReorderListener
e
- 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 TableModel
setValueAt
in class AbstractTableModel
aValue
- 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 © 2011 Citra Technologies. All Rights Reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |