|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CellSelectionModel
| Field Summary | |
|---|---|
static int |
MULTIPLE_INTERVAL_SELECTION
A value for the selectionMode property: select one or more contiguous ranges of cell at a time. |
static int |
SINGLE_INTERVAL_SELECTION
A value for the selectionMode property: select one contiguous range of cell at a time. |
static int |
SINGLE_SELECTION
A value for the selectionMode property: select one cell at a time. |
| Method Summary | |
|---|---|
void |
addCellSelectionListener(CellSelectionListener l)
Adds listener to the list of listeners that are notified each time the set of selected cells changes. |
void |
addPropertyChangeListener(PropertyChangeListener l)
Adds a PropertyChangeListener to the listener list. |
void |
addSelectionCell(Cell cell)
Adds the specified cell to the selection. |
void |
addSelectionCells(Cell[] cells)
Adds the specified cells to the selection. |
void |
clearSelection()
Change the selection to the empty set. |
int |
getAnchorSelectionColumn()
Returns the anchor selection column index. |
int |
getAnchorSelectionRow()
Returns the anchor selection row index. |
int |
getLeadSelectionColumn()
Returns the lead selection column index. |
int |
getLeadSelectionRow()
Returns the lead selection row index. |
int |
getMaxSelectionColumn()
Returns the last selected column or -1 if the selection is empty. |
int |
getMaxSelectionRow()
Returns the last selected row or -1 if the selection is empty. |
int |
getMinSelectionColumn()
Returns the first selected column or -1 if the selection is empty. |
int |
getMinSelectionRow()
Returns the first selected row or -1 if the selection is empty. |
Cell |
getSelectedCell()
Returns the selected cell as Cell object. |
Cell[] |
getSelectedCells()
Returns all selected cells in the selection. |
int |
getSelectionCount()
Returns the number of cells that are selected. |
List |
getSelectionList()
Returns the read-only selection list. |
int |
getSelectionMode()
Returns the selection mode. |
boolean |
getValueIsAdjusting()
Returns true if the value is undergoing a series of changes. |
void |
insertColumnInterval(int column,
int length,
boolean before)
Insert length indices beginning before/after column. |
void |
insertRowInterval(int row,
int length,
boolean before)
Insert length indices beginning before/after row. |
boolean |
isCellSelected(Cell c)
Returns whether the cell is selected. |
boolean |
isCellSelected(int row,
int column)
Returns true if the cell at the specified position is selected. |
boolean |
isColumnSelected(int column)
Returns true if the column at the specified index is selected. |
boolean |
isRowSelected(int row)
Returns true if the row at the specified index is selected. |
boolean |
isSelectionEmpty()
Returns true if no cells are selected. |
void |
removeCellSelectionListener(CellSelectionListener l)
Removes listener from the list of listeners that are notified each time the set of selected cells changes. |
void |
removeColumnInterval(int column0,
int column1)
Remove the indices in the interval column0,column1 (inclusive) from the selection model. |
void |
removePropertyChangeListener(PropertyChangeListener l)
Removes a PropertyChangeListener from the listener list. |
void |
removeRowInterval(int row0,
int row1)
Remove the indices in the interval row0,row1 (inclusive) from the selection model. |
void |
removeSelectionCell(Cell cell)
Removes the specified cell from the selection. |
void |
removeSelectionCells(Cell[] cells)
Adds the specified cells to the selection. |
void |
setAnchorSelectionCell(int row,
int column)
Sets the anchor selection cell. |
void |
setLeadSelectionCell(int row,
int column)
Sets the lead selection cell. |
void |
setSelectionCell(Cell cell)
Changes the selection to select the specified cell. |
void |
setSelectionCells(Cell[] cells)
Changes the selection to select the specified cells. |
void |
setSelectionMode(int mode)
Sets the selection mode. |
void |
setValueIsAdjusting(boolean valueIsAdjusting)
This property is true if upcoming changes to the value of the model should be considered a single event. |
| Field Detail |
|---|
static final int SINGLE_SELECTION
setSelectionMode(int),
Constant Field Valuesstatic final int SINGLE_INTERVAL_SELECTION
setSelectionMode(int),
Constant Field Valuesstatic final int MULTIPLE_INTERVAL_SELECTION
setSelectionMode(int),
Constant Field Values| Method Detail |
|---|
void setSelectionMode(int mode)
mode - the selection modeint getSelectionMode()
void setSelectionCell(Cell cell)
cell - the cell to be selectedaddSelectionCell(com.zfqjava.swing.cell.Cell)void setSelectionCells(Cell[] cells)
cells - the cells to be selectedaddSelectionCells(com.zfqjava.swing.cell.Cell[])void addSelectionCell(Cell cell)
cell - the cell to be selectedsetSelectionCell(com.zfqjava.swing.cell.Cell)void addSelectionCells(Cell[] cells)
cells - the cells to be selectedsetSelectionCells(com.zfqjava.swing.cell.Cell[])void removeSelectionCell(Cell cell)
cell - the cell to be selectedsetSelectionCell(com.zfqjava.swing.cell.Cell)void removeSelectionCells(Cell[] cells)
cells - the cells to be selectedsetSelectionCells(com.zfqjava.swing.cell.Cell[])List getSelectionList()
Cell getSelectedCell()
Cell object.
Returns null if have not such selected cell or the selected cell
is not contiguous.
Cell objectCell[] getSelectedCells()
Cell object
void setAnchorSelectionCell(int row,
int column)
getAnchorSelectionRow(),
getAnchorSelectionColumn()int getAnchorSelectionRow()
setAnchorSelectionCell(int, int)int getAnchorSelectionColumn()
setAnchorSelectionCell(int, int)
void setLeadSelectionCell(int row,
int column)
getLeadSelectionRow(),
getLeadSelectionColumn()int getLeadSelectionRow()
setLeadSelectionCell(int, int)int getLeadSelectionColumn()
setLeadSelectionCell(int, int)int getMinSelectionRow()
int getMaxSelectionRow()
int getMinSelectionColumn()
int getMaxSelectionColumn()
int getSelectionCount()
boolean isRowSelected(int row)
row is selected, where 0 is the
first row
IllegalArgumentException - if row is not in the
valid rangeboolean isColumnSelected(int column)
column - the column in the column model
column is selected, where
0 is the first column
IllegalArgumentException - if column is not in the
valid range
boolean isCellSelected(int row,
int column)
row - the row being queriedcolumn - the column being queried
(row, column) is selected,
where the first row and first column are at index 0
IllegalArgumentException - if row or column
are not in the valid rangeboolean isCellSelected(Cell c)
c - the cell
boolean isSelectionEmpty()
void clearSelection()
addCellSelectionListener(com.zfqjava.swing.event.CellSelectionListener)void setValueIsAdjusting(boolean valueIsAdjusting)
valueIsAdjusting - The new value of the property.getValueIsAdjusting()boolean getValueIsAdjusting()
setValueIsAdjusting(boolean)
void insertRowInterval(int row,
int length,
boolean before)
void removeRowInterval(int row0,
int row1)
void insertColumnInterval(int column,
int length,
boolean before)
void removeColumnInterval(int column0,
int column1)
void addPropertyChangeListener(PropertyChangeListener l)
A PropertyChangeEvent will get fired when the selection mode changes.
l - the PropertyChangeListener to be addedvoid removePropertyChangeListener(PropertyChangeListener l)
l - the PropertyChangeListener to be removedvoid addCellSelectionListener(CellSelectionListener l)
l - the new listener to be addedvoid removeCellSelectionListener(CellSelectionListener l)
l - the listener to remove
|
JComponentPack 1.5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||