|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
| Method Summary | |
void |
addDataGridModelListener(DataGridModelListener l)
Adds a listener to the list that is notified each time a change to the data model occurs. |
void |
addUndoableEditListener(javax.swing.event.UndoableEditListener l)
Registers the given observer to begin receiving notifications when undoable edits are made to the model. |
javax.swing.text.AttributeSet |
getCellAttributes(int rowIndex,
int columnIndex)
Returns the cell attributes. |
java.lang.Class |
getCellClass(int rowIndex,
int columnIndex)
Returns the cell class. |
Cell |
getCellSpans(int rowIndex,
int columnIndex)
Returns the cell that spans the specified cell at rowIndex and columnIndex. |
Cell[] |
getCellSpans(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Returns the cells that spans the specified cell area. |
Cell[] |
getSpannedCells()
Returns all spanned cells. |
boolean |
hasCellSpans(int rowIndex,
int columnIndex)
Returns true if has cell spans the specified cell at rowIndex and columnIndex. |
boolean |
hasCellSpans(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Returns true if has some cells spans the specified cell area. |
boolean |
isSpannedCell(Cell c)
Determines whether the cell is spanned cell. |
boolean |
merge(Cell c)
Merges the cell. |
void |
removeDataGridModelListener(DataGridModelListener l)
Removes a listener from the list that is notified each time a change to the data model occurs. |
void |
removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
Unregisters the given observer from the notification list so it will no longer receive updates. |
void |
setCellAttributes(javax.swing.text.AttributeSet attributes,
int rowIndex,
int columnIndex)
Sets the cell attributes. |
void |
setCellClass(java.lang.Class c,
int rowIndex,
int columnIndex)
Sets the cell class. |
void |
setCellEditable(boolean editable,
int rowIndex,
int columnIndex)
Sets the editable value for the specified cell at rowIndex and
columnIndex. |
void |
setColumnClass(java.lang.Class c,
int columnIndex)
Sets the column class for the specified columnIndex. |
void |
setColumnCount(int columnCount)
Sets the number of columns in the model. |
void |
setColumnName(java.lang.String name,
int columnIndex)
Sets the column name for the specified columnIndex. |
void |
setRowCount(int rowCount)
Sets the number of rows in the model. |
boolean |
split(Cell c)
Splits the cell. |
| Methods inherited from interface javax.swing.table.TableModel |
addTableModelListener, getColumnClass, getColumnCount, getColumnName, getRowCount, getValueAt, isCellEditable, removeTableModelListener, setValueAt |
| Method Detail |
public void setRowCount(int rowCount)
rowCount - the number of rows in the modelTableModel.getRowCount(),
setColumnCount(int),
TableModel.getColumnCount()public void setColumnCount(int columnCount)
columnCount - the number of columns in the modelTableModel.getRowCount(),
setRowCount(int),
TableModel.getColumnCount()
public void setColumnName(java.lang.String name,
int columnIndex)
columnIndex.name - the column namecolumnIndex - the specified columnIndexTableModel.getColumnName(int)
public void setColumnClass(java.lang.Class c,
int columnIndex)
columnIndex.c - the column classcolumnIndex - the specified columnIndexTableModel.getColumnClass(int)
public void setCellEditable(boolean editable,
int rowIndex,
int columnIndex)
rowIndex and
columnIndex.editable - the cell editable valuerowIndex - the row whose value to be queriedcolumnIndex - the column whose value to be queriedTableModel.setValueAt(java.lang.Object, int, int),
TableModel.isCellEditable(int,int)
public boolean hasCellSpans(int rowIndex,
int columnIndex)
rowIndex and columnIndex.rowIndex - the row index of the specified cellcolumnIndex - the column index of the specified cellgetCellSpans(int,int)
public Cell getCellSpans(int rowIndex,
int columnIndex)
rowIndex and columnIndex.rowIndex - the row index of the specified cellcolumnIndex - the column index of the specified cellhasCellSpans(int,int)
public boolean hasCellSpans(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Note:Some cell spans the area can have row and column index out of the area index.
firstRow - the first row index of the specified cell arealastRow - the last row index of the specified cell areafirstColumn - the first column index of the specified cell arealastColumn - the last column index of the specified cell areagetCellSpans(int,int,int,int)
public Cell[] getCellSpans(int firstRow,
int lastRow,
int firstColumn,
int lastColumn)
Note:Some cell spans the area can have row and column index out of the area index.
firstRow - the first row index of the specified cell arealastRow - the last row index of the specified cell areafirstColumn - the first column index of the specified cell arealastColumn - the last column index of the specified cell areahasCellSpans(int,int,int,int)public boolean isSpannedCell(Cell c)
c - the cellmerge(com.zfqjava.swing.cell.Cell).public Cell[] getSpannedCells()
merge(com.zfqjava.swing.cell.Cell).public boolean merge(Cell c)
true if this model changes
as a result of the call. (Returns false if this model
already contains such spanned cell c or does not permit
such operation.)c - the cellsplit(com.zfqjava.swing.cell.Cell)public boolean split(Cell c)
true if this model changes
as a result of the call. (Returns false if this model
have not such spanned cell or does not permit such operation.)c - the cellmerge(com.zfqjava.swing.cell.Cell)
public javax.swing.text.AttributeSet getCellAttributes(int rowIndex,
int columnIndex)
rowIndex - the index of the rowcolumnIndex - the index of the columnsetCellAttributes(javax.swing.text.AttributeSet, int, int)
public void setCellAttributes(javax.swing.text.AttributeSet attributes,
int rowIndex,
int columnIndex)
attributes - the cell attributesrowIndex - the index of the rowcolumnIndex - the index of the columngetCellAttributes(int, int)
public java.lang.Class getCellClass(int rowIndex,
int columnIndex)
rowIndex - the index of the rowcolumnIndex - the index of the columnsetCellClass(java.lang.Class, int, int)
public void setCellClass(java.lang.Class c,
int rowIndex,
int columnIndex)
c - the class for the specified cellrowIndex - the index of the rowcolumnIndex - the index of the columngetCellClass(int, int)public void addDataGridModelListener(DataGridModelListener l)
l - the DataGridModelListenerpublic void removeDataGridModelListener(DataGridModelListener l)
l - the DataGridModelListenerpublic void addUndoableEditListener(javax.swing.event.UndoableEditListener l)
listener - the observer to registerUndoableEditEventpublic void removeUndoableEditListener(javax.swing.event.UndoableEditListener l)
listener - the observer to registerUndoableEditEvent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||