|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TableRowModel
TableRowModel is table model which natural organization of data
is grouped by rows. This model can not be used directly in
JTable, it must be used in collaboration with
TableModelRows or similar implementation of
TableModel.
| Method Summary | |
|---|---|
void |
addTableRowModelListener(TableRowModelListener l)
Add listener, which receives notification of changes in the model. |
void |
fireRowUpdate(TableRow row,
int valueIndex)
This method is called from table row, when wants to notify its parent model about value change. |
int |
getColumnCount()
Number of columns inside this model. |
java.lang.String |
getColumnName(int index)
Returns name of column. |
TableRow |
getRowAt(int rowIndex)
Returns a row object at row index. |
int |
getRowCount()
Returns number of rows contained in this model. |
int |
getRowIndex(TableRow row)
Returns index of a row. |
void |
removeTableRowModelListener(TableRowModelListener l)
Removes listener. |
void |
sortRows(int column,
boolean descending)
Sort rows in ascending or descengin order according to the natural order of cells in specified column. |
| Method Detail |
|---|
int getColumnCount()
int getRowCount()
TableRow getRowAt(int rowIndex)
rowIndex - the row index
int getRowIndex(TableRow row)
row - a row form this model
void addTableRowModelListener(TableRowModelListener l)
l - a TableRowModelListener listenervoid removeTableRowModelListener(TableRowModelListener l)
l - a TableRowModelListener listenerjava.lang.String getColumnName(int index)
index - the index of the colummn
TableModel.getColumnName(int)
void fireRowUpdate(TableRow row,
int valueIndex)
row - the row which value has changesvalueIndex - the index of the value, if -1 all values
has been changed
void sortRows(int column,
boolean descending)
Comparable.
column - the column index, according to which rows are sorteddescending - sorted rows are ordered ascending if
false, or descending if true.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||