|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
In terms of the javax.swing.table.TableModel
, this is the description of a data model suitable for a symmetrical grid.
This describes a rectangular array of cells, without per-column or
per-row hypothesis.
This is a source of GridModelEvent
s.
GridModelEvent
,
GridModelListener
Method Summary | |
void |
addGridModelListener(GridModelListener l)
Adds a listener to the list that's notified each time a change to the data model occurs. |
int |
getColumnCount()
Returns the number of columns in the model. |
int |
getRowCount()
Returns the number of rows in the model. |
java.lang.Object |
getValueAt(int row,
int column)
Returns the value for the cell at column and row . |
boolean |
isCellEditable(int row,
int column)
Returns whether the cell at row and column is editable.
|
void |
removeGridModelListener(GridModelListener l)
Removes a listener from the list that's notified each time a change to the data model occurs. |
void |
setValueAt(java.lang.Object aValue,
int row,
int column)
Sets the value in the cell at column and row
to aValue . |
Method Detail |
public int getRowCount()
Grid
uses this
method to determine how many rows it should create and display.
This method should be quick, as it is called frequently during rendering.getColumnCount()
public int getColumnCount()
Grid
uses this
method to determine how many columns it should create and display.
This method should be quick, as it is called frequently during rendering.getRowCount()
public boolean isCellEditable(int row, int column)
row
and column
is editable.
Otherwise, setValueAt
on the cell will not change
the value of that cell.row
- the row whose value is to be queriedcolumn
- the column whose value is to be queriedsetValueAt(java.lang.Object, int, int)
public java.lang.Object getValueAt(int row, int column)
column
and row
.row
- the row whose value is to be queriedcolumn
- the column whose value is to be queriedpublic void setValueAt(java.lang.Object aValue, int row, int column)
column
and row
to aValue
.aValue
- the new valuerow
- the row whose value is to be changedcolumn
- the column whose value is to be changedgetValueAt(int, int)
,
isCellEditable(int, int)
public void addGridModelListener(GridModelListener l)
removeXXX
function. An implementation class is of course responsible for the
firing of events, but the fireGridModelEvent
methods
may be private.l
- the GridModelListenerGridModelEvent
,
GridModelListener
public void removeGridModelListener(GridModelListener l)
addXXX
function. An implementation class is of course responsible for the
firing of events, but the fireGridModelEvent
methods
may be private.l
- the GridModelListenerGridModelEvent
,
GridModelListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |