|
Oracle JEWT API Reference Release 4.2.24.0.0 B12199-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.bali.ewt.model.AbstractTwoDModel | +--oracle.bali.ewt.model.ArrayTwoDModel
An ArrayTwoDModel is a two dimensional data source that stores data in a two dimensional array. Clients can specify how many columns and rows the ArrayTwoDModel contains at creation time. Clients can add and remove columns and rows with the addColumns, removeColumns, addRows, removeRows methods. Clients can set the data for a cell with the setData method.
ArrayTwoDModel sends the proper TwoDModelEvents to the list of registered listeners.
TwoDModel
,
TwoDModelEvent
,
TwoDModelListener
Constructor Summary | |
ArrayTwoDModel(int columns,
int rows)
Create a ArrayTwoDModel with the given number of columns and rows. |
|
ArrayTwoDModel(java.lang.Object[][] contents)
Creates a ArrayTwoDModel from the specified two dimensional array. |
Method Summary | |
void |
addColumns(int startIndex,
int numberOfColumns)
Add numberOfColumns more columns starting at index, startIndex. |
void |
addRows(int startIndex,
int numberOfRows)
Add numberOfRows more rows starting at index, startIndex. |
int |
getColumnCount()
Get the number of columns. |
java.lang.Object |
getData(int columnIndex,
int rowIndex)
Return the data of the cell. |
int |
getRowCount()
Get the number of rows. |
void |
removeColumns(int startIndex,
int numberOfColumns)
Remove numberOfColumns starting from startIndex. |
void |
removeRows(int startIndex,
int numberOfRows)
Remove numberOfRows starting from startIndex. |
void |
setData(int columnIndex,
int rowIndex,
java.lang.Object data)
Set the cell data to the new value. |
Methods inherited from class oracle.bali.ewt.model.AbstractTwoDModel |
addModelListener, fireModelEvent, fireModelEvent, removeModelListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ArrayTwoDModel(int columns, int rows)
columns
- the initial number of columns in the model.rows
- the initial number of rows in the model.public ArrayTwoDModel(java.lang.Object[][] contents)
columns
- the initial number of columns in the model.rows
- the initial number of rows in the model.Method Detail |
public void addRows(int startIndex, int numberOfRows)
startIndex
- the row index from which to addnumberOfRows
- the number of rows to addpublic void removeRows(int startIndex, int numberOfRows)
startIndex
- the row index from which to removenumberOfRows
- the number of rows to removepublic void addColumns(int startIndex, int numberOfColumns)
startIndex
- the column index from which to addnumberOfColumns
- the number of columns to addpublic void removeColumns(int startIndex, int numberOfColumns)
startIndex
- the column index from which to removenumberOfColumns
- the number of columns to removepublic int getColumnCount()
getColumnCount
in class AbstractTwoDModel
oracle.bali.ewt.model.AbstractTwoDModel
public int getRowCount()
getRowCount
in class AbstractTwoDModel
oracle.bali.ewt.model.AbstractTwoDModel
public java.lang.Object getData(int columnIndex, int rowIndex)
getData
in class AbstractTwoDModel
columnIndex
- the column index of the cellrowIndex
- the row index of the cellpublic void setData(int columnIndex, int rowIndex, java.lang.Object data)
setData
in class AbstractTwoDModel
rowIndex
- row index of the cellcolumnIndex
- column index of the celldata
- new data
|
Oracle JEWT 4.2.24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |