|
JComponentPack 1.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zfqjava.swing.AbstractCellSelectionModel
com.zfqjava.swing.DefaultCellSelectionModel
public class DefaultCellSelectionModel
| Field Summary |
|---|
| Fields inherited from class com.zfqjava.swing.AbstractCellSelectionModel |
|---|
changeSupport, listenerList |
| Fields inherited from interface com.zfqjava.swing.CellSelectionModel |
|---|
MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION |
| Constructor Summary | |
|---|---|
DefaultCellSelectionModel()
|
|
| Method Summary | |
|---|---|
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 |
removeColumnInterval(int column0,
int column1)
Remove the indices in the interval column0,column1 (inclusive) from the selection model. |
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. |
| Methods inherited from class com.zfqjava.swing.AbstractCellSelectionModel |
|---|
addCellSelectionListener, addPropertyChangeListener, firePropertyChange, fireValueChanged, getCellSelectionListeners, getListeners, removeCellSelectionListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultCellSelectionModel()
| Method Detail |
|---|
public void setSelectionMode(int mode)
CellSelectionModel
mode - the selection modepublic int getSelectionMode()
CellSelectionModel
public void setSelectionCell(Cell cell)
CellSelectionModel
cell - the cell to be selectedCellSelectionModel.addSelectionCell(com.zfqjava.swing.cell.Cell)public void setSelectionCells(Cell[] cells)
CellSelectionModel
cells - the cells to be selectedCellSelectionModel.addSelectionCells(com.zfqjava.swing.cell.Cell[])public void addSelectionCell(Cell cell)
CellSelectionModel
cell - the cell to be selectedCellSelectionModel.setSelectionCell(com.zfqjava.swing.cell.Cell)public void addSelectionCells(Cell[] cells)
CellSelectionModel
cells - the cells to be selectedCellSelectionModel.setSelectionCells(com.zfqjava.swing.cell.Cell[])public void removeSelectionCell(Cell cell)
CellSelectionModel
cell - the cell to be selectedCellSelectionModel.setSelectionCell(com.zfqjava.swing.cell.Cell)public void removeSelectionCells(Cell[] cells)
CellSelectionModel
cells - the cells to be selectedCellSelectionModel.setSelectionCells(com.zfqjava.swing.cell.Cell[])public List getSelectionList()
CellSelectionModel
public Cell getSelectedCell()
CellSelectionModelCell object.
Returns null if have not such selected cell or the selected cell
is not contiguous.
Cell objectpublic Cell[] getSelectedCells()
CellSelectionModel
Cell object
public void setAnchorSelectionCell(int row,
int column)
CellSelectionModel
CellSelectionModel.getAnchorSelectionRow(),
CellSelectionModel.getAnchorSelectionColumn()public int getAnchorSelectionRow()
CellSelectionModel
CellSelectionModel.setAnchorSelectionCell(int, int)public int getAnchorSelectionColumn()
CellSelectionModel
CellSelectionModel.setAnchorSelectionCell(int, int)
public void setLeadSelectionCell(int row,
int column)
CellSelectionModel
CellSelectionModel.getLeadSelectionRow(),
CellSelectionModel.getLeadSelectionColumn()public int getLeadSelectionRow()
CellSelectionModel
CellSelectionModel.setLeadSelectionCell(int, int)public int getLeadSelectionColumn()
CellSelectionModel
CellSelectionModel.setLeadSelectionCell(int, int)public int getMinSelectionRow()
CellSelectionModel
public int getMaxSelectionRow()
CellSelectionModel
public int getMinSelectionColumn()
CellSelectionModel
public int getMaxSelectionColumn()
CellSelectionModel
public int getSelectionCount()
CellSelectionModel
public boolean isRowSelected(int row)
CellSelectionModel
row is selected, where 0 is the
first rowpublic boolean isColumnSelected(int column)
CellSelectionModel
column - the column in the column model
column is selected, where
0 is the first column
public boolean isCellSelected(int row,
int column)
CellSelectionModel
row - the row being queriedcolumn - the column being queried
(row, column) is selected,
where the first row and first column are at index 0public boolean isCellSelected(Cell c)
CellSelectionModel
c - the cell
public boolean isSelectionEmpty()
CellSelectionModel
public void clearSelection()
CellSelectionModel
CellSelectionModel.addCellSelectionListener(com.zfqjava.swing.event.CellSelectionListener)public void setValueIsAdjusting(boolean valueIsAdjusting)
CellSelectionModel
valueIsAdjusting - The new value of the property.CellSelectionModel.getValueIsAdjusting()public boolean getValueIsAdjusting()
CellSelectionModel
CellSelectionModel.setValueIsAdjusting(boolean)
public void insertRowInterval(int row,
int length,
boolean before)
CellSelectionModel
public void removeRowInterval(int row0,
int row1)
CellSelectionModel
public void insertColumnInterval(int column,
int length,
boolean before)
CellSelectionModel
public void removeColumnInterval(int column0,
int column1)
CellSelectionModel
|
JComponentPack 1.3.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||