|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
GridData is an abstract interface for a class used for storing the data for the Grid's cells, and the Row and Column headers. An instance of a class that implements this interface is stored in the GridPanel and it's methods are called to get or set the data, as well as to resize it's structure as and when needed. The GridData object implements this interface.
| Method Summary | |
int |
compare(java.lang.Object aData,
java.lang.Object bData,
int col)
The default compare method used by sortRows(). |
void |
deleteCols(int atCol,
int count)
Delete a specified number of columns from a specified position. |
void |
deleteRows(int atRow,
int count)
Delete a specified number of rows from a specified position. |
java.lang.Object |
getCellData(int col,
int row)
Return the data for a cell. |
java.lang.String |
getCellText(int col,
int row)
Return the text for a cell. |
java.lang.Object |
getColHeaderData(int col)
Return the data for a column header. |
java.lang.String |
getColHeaderText(int col)
Return the text for a column header. |
int |
getNumCols()
Return the number columns in this object. |
int |
getNumRows()
Return the number rows in this object. |
java.util.Vector |
getRowData(int row)
Return the data for all the cells in a row. |
java.lang.Object |
getRowHeaderData(int row)
Return the data for a row header. |
java.lang.String |
getRowHeaderText(int row)
Return the text for a row header. |
void |
insertCols(int atCol,
int count)
Insert a specified number of columns at a specified position. |
void |
insertRows(int atRow,
int count)
Insert a specified number of rows at a specified position. |
void |
setCellData(int col,
int row,
java.lang.Object cellData)
Sets the data for a cell. |
void |
setCellText(int col,
int row,
java.lang.String cellText)
Sets the text data for a cell. |
void |
setColHeaderData(int col,
java.lang.Object colHeaderData)
Sets the data for a column header. |
void |
setColHeaderText(int col,
java.lang.String colHeaderText)
Sets the text data for a column header. |
void |
setNumCols(int numCols)
Adjusts the number columns in this object. |
void |
setNumRows(int numRows)
Adjusts the number rows in this object. |
void |
setRowData(int row,
java.util.Vector rowData)
Sets the data for all the cells in a row. |
void |
setRowHeaderData(int row,
java.lang.Object rowHeaderData)
Sets the data for a row header. |
void |
setRowHeaderText(int row,
java.lang.String rowHeaderText)
Sets the text data for a row header. |
| Method Detail |
public void setNumRows(int numRows)
numRows - the number of rowsGridPanel.setNumRows(int)public int getNumRows()
public void setNumCols(int numCols)
numRows - the number of rowsGridPanel.setNumCols(int)public int getNumCols()
public void insertRows(int atRow, int count)
atRow - the index at which new rows will be insertedcount - the number of rows to be insertedGridPanel.insertRows(int, int)public void deleteRows(int atRow, int count)
atRow - the index from which new rows will be deletedcount - the number of rows to be deletedGridPanel.deleteRows(int, int)public void insertCols(int atCol, int count)
atCol - the index at which new columns will be insertedcount - the number of columns to be insertedGridPanel.insertCols(int, int)public void deleteCols(int atCol, int count)
atCol - the index from which new columns will be deletedcount - the number of columns to be deletedGridPanel.deleteCols(int, int)public java.lang.String getCellText(int col, int row)
col - the columnrow - the rowGridPanel.getCellText(int, int)public java.lang.Object getCellData(int col, int row)
col - the columnrow - the rowpublic java.lang.String getRowHeaderText(int row)
row - the rowGridPanel.getRowHeaderText(int)public java.lang.Object getRowHeaderData(int row)
row - the rowpublic java.lang.String getColHeaderText(int col)
col - the columnGridPanel.getColHeaderText(int)public java.lang.Object getColHeaderData(int col)
col - the columnpublic void setCellText(int col, int row, java.lang.String cellText)
col - the columnrow - the rowcellText - the text data for the cellGridPanel.setCellText(int, int, java.lang.String, boolean)public void setCellData(int col, int row, java.lang.Object cellData)
col - the columnrow - the rowcellData - a reference to the data for a cellpublic void setRowHeaderText(int row, java.lang.String rowHeaderText)
row - the rowrowHeaderText - the text data for the row headerGridPanel.setRowHeaderText(int, java.lang.String, boolean)public void setRowHeaderData(int row, java.lang.Object rowHeaderData)
row - the rowrowHeaderData - a reference to the data for a row headerpublic void setColHeaderText(int col, java.lang.String colHeaderText)
col - the columncolHeaderText - the text data for the column headerGridPanel.setColHeaderText(int, java.lang.String, boolean)public void setColHeaderData(int col, java.lang.Object colHeaderData)
col - the columncolHeaderData - a reference to the data for a row headerpublic java.util.Vector getRowData(int row)
row - the rowpublic void setRowData(int row, java.util.Vector rowData)
row - the rowrowData - a Vector containing references to the data for all the cells in a rowpublic int compare(java.lang.Object aData, java.lang.Object bData, int col)
aData - the first data objectbData - the second data objectcol - the column whose data objects are being compared for the sort
|
||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||