|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.jeppers.grid.AbstractGridModel | +--net.sf.jeppers.grid.DefaultGridModel
This is an implementation of GridModel
that uses
a Map
of cell points to the cell object values.
Field Summary |
Fields inherited from class net.sf.jeppers.grid.AbstractGridModel |
listenerList |
Constructor Summary | |
DefaultGridModel(int rows,
int columns)
|
Method Summary | |
int |
getColumnCount()
Return the number of columns in the model. |
int |
getRowCount()
Returns the number of rows in the model. |
Object |
getValueAt(int row,
int column)
Returns the value for the cell at row and column |
void |
insertColumns(int column,
int columnCount)
Insert columnCount columns at column . |
void |
insertRows(int row,
int rowCount)
Insert rowCount rows at row . |
boolean |
isCellEditable(int row,
int column)
Returns true if the cell at row and column
is editable. |
void |
removeColumns(int column,
int columnCount)
Remove columnCount columns at column . |
void |
removeRows(int row,
int rowCount)
Remove rowCount rows at row . |
void |
setCellLock(boolean lock,
int row,
int column)
Set whether cell at row and column
can be editted. |
void |
setValueAt(Object value,
int row,
int column)
Sets the value for the cell at row and column
to value |
Methods inherited from class net.sf.jeppers.grid.AbstractGridModel |
addGridModelListener, fireGridCellUpdated, fireGridChanged, fireGridColumnsDeleted, fireGridColumnsInserted, fireGridColumnsUpdated, fireGridModelChanged, fireGridRowsDeleted, fireGridRowsInserted, fireGridRowsUpdated, getListeners, removeGridModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultGridModel(int rows, int columns)
Method Detail |
public int getRowCount()
GridModel
getRowCount
in interface GridModel
public int getColumnCount()
GridModel
getColumnCount
in interface GridModel
public Object getValueAt(int row, int column)
GridModel
row
and column
getValueAt
in interface GridModel
row
- row index of cellcolumn
- column index of cell
public boolean isCellEditable(int row, int column)
GridModel
row
and column
is editable. Otherwise, setValueAt
on the cell will not change
the value of that cell.
isCellEditable
in interface GridModel
row
- row index of cellcolumn
- column index of cell
public void setCellLock(boolean lock, int row, int column)
row
and column
can be editted.
lock
- lock flag of cellrow
- row index of cellcolumn
- column index of cellpublic void setValueAt(Object value, int row, int column)
GridModel
row
and column
to value
setValueAt
in interface GridModel
value
- new cell valuerow
- row index of cellcolumn
- column index of cellpublic void insertRows(int row, int rowCount)
ResizableGrid
rowCount
rows at row
.
insertRows
in interface ResizableGrid
row
- the row to insert atrowCount
- the number of rows to insertpublic void removeRows(int row, int rowCount)
ResizableGrid
rowCount
rows at row
.
removeRows
in interface ResizableGrid
row
- the row to remove fromrowCount
- the number of rows to removepublic void insertColumns(int column, int columnCount)
ResizableGrid
columnCount
columns at column
.
insertColumns
in interface ResizableGrid
column
- the column to insert atcolumnCount
- the number of columns to insertpublic void removeColumns(int column, int columnCount)
ResizableGrid
columnCount
columns at column
.
removeColumns
in interface ResizableGrid
column
- the column to remove fromcolumnCount
- the number of columns to remove
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |