|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DataGridModel
| 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(UndoableEditListener l)
Registers the given observer to begin receiving notifications when undoable edits are made to the model. |
AttributeSet |
getCellAttributes(int rowIndex,
int columnIndex)
Returns the cell attributes. |
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(UndoableEditListener l)
Unregisters the given observer from the notification list so it will no longer receive updates. |
void |
setCellAttributes(AttributeSet attributes,
int rowIndex,
int columnIndex)
Sets the cell attributes. |
void |
setCellClass(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(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(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 |
| Methods inherited from interface com.zfqjava.swing.CellSpanModel |
|---|
addCellSpanListener, removeCellSpanListener |
| Method Detail |
|---|
void setRowCount(int rowCount)
rowCount - the number of rows in the modelTableModel.getRowCount(),
setColumnCount(int),
TableModel.getColumnCount()void setColumnCount(int columnCount)
columnCount - the number of columns in the modelTableModel.getRowCount(),
setRowCount(int),
TableModel.getColumnCount()
void setColumnName(String name,
int columnIndex)
columnIndex.
name - the column namecolumnIndex - the specified columnIndexTableModel.getColumnName(int)
void setColumnClass(Class c,
int columnIndex)
columnIndex.
c - the column classcolumnIndex - the specified columnIndexTableModel.getColumnClass(int)
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)
boolean hasCellSpans(int rowIndex,
int columnIndex)
rowIndex and columnIndex.
hasCellSpans in interface CellSpanModelrowIndex - the row index of the specified cellcolumnIndex - the column index of the specified cellgetCellSpans(int,int)
Cell getCellSpans(int rowIndex,
int columnIndex)
rowIndex and columnIndex.
getCellSpans in interface CellSpanModelrowIndex - the row index of the specified cellcolumnIndex - the column index of the specified cell
hasCellSpans(int,int)
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.
hasCellSpans in interface CellSpanModelfirstRow - 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 area
getCellSpans(int,int,int,int)
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.
getCellSpans in interface CellSpanModelfirstRow - 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 area
hasCellSpans(int,int,int,int)boolean isSpannedCell(Cell c)
isSpannedCell in interface CellSpanModelc - the cell
merge(com.zfqjava.swing.cell.Cell).Cell[] getSpannedCells()
getSpannedCells in interface CellSpanModelmerge(com.zfqjava.swing.cell.Cell).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.)
merge in interface CellSpanModelc - the cell
split(com.zfqjava.swing.cell.Cell)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.)
split in interface CellSpanModelc - the cell
merge(com.zfqjava.swing.cell.Cell)
AttributeSet getCellAttributes(int rowIndex,
int columnIndex)
rowIndex - the index of the rowcolumnIndex - the index of the column
setCellAttributes(javax.swing.text.AttributeSet, int, int)
void setCellAttributes(AttributeSet attributes,
int rowIndex,
int columnIndex)
attributes - the cell attributesrowIndex - the index of the rowcolumnIndex - the index of the columngetCellAttributes(int, int)
Class getCellClass(int rowIndex,
int columnIndex)
rowIndex - the index of the rowcolumnIndex - the index of the column
setCellClass(java.lang.Class, int, int)
void setCellClass(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)void addDataGridModelListener(DataGridModelListener l)
l - the DataGridModelListenervoid removeDataGridModelListener(DataGridModelListener l)
l - the DataGridModelListenervoid addUndoableEditListener(UndoableEditListener l)
l - the observer to registerUndoableEditEventvoid removeUndoableEditListener(UndoableEditListener l)
l - the observer to registerUndoableEditEvent
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||