|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The SelectionModel
interface represents the current cell
selection state in Table. Although a default implementation is supplied that
supports NONE, SINGLE, RANGE and MULTIRANGE selection, the model opens up
possibilities that previously could only be down through the
JCSelectListener
interface.
Field Summary | |
static int |
ADD
Constant that indicates that the cell range will be added as a new range to the selection. |
static int |
DESELECT
Constant that indicates that the given cell range is being deselected. |
static int |
END
Constant that indicates that the given cell is the end of selection. |
static int |
EXTEND
Constant that indicates that the given cell will be extend to the current selection. |
static int |
SELECT
Constant that indicates that the cell range represents the start of selection. |
static int |
SELECT_MULTIRANGE
A SelectionPolicy constant that indicates that multiple ranges of cells, rows or columns may be selected. |
static int |
SELECT_NONE
A SelectionPolicy constant that indicates that no selection is allowed. |
static int |
SELECT_RANGE
A SelectionPolicy constant that indicates that a range of cells, rows or columnsmay be selected. |
static int |
SELECT_SINGLE
A SelectionPolicy constant that indicates that a single cell may be selected. |
Method Summary | |
boolean |
addColumnSelection(int start_column,
int end_column)
Adds a range of columns to the selection. |
boolean |
addRowSelection(int start_row,
int end_row)
Adds a range of rows to the selection. |
boolean |
addSelection(int start_row,
int start_column,
int end_row,
int end_column)
Adds a range of cells to the selection. |
boolean |
addSelection(com.klg.jclass.table.JCCellRange selection)
Adds a JCCellRange to the selection. |
void |
cleanup()
Removes duplicate ranges from the selection. |
void |
clearSelection()
Clears all selected cells. |
boolean |
extendSelection(int row,
int column)
Extends the current selection to the given row and column. |
Collection |
getSelectedCells()
Returns a Collection containing all of the selected regions as JCCellRange objects. |
int |
getSelectionPolicy()
Returns the policy of selection supported by the model. |
com.klg.jclass.table.JCTable |
getTable()
Returns the JCTable controlled by the SelectionModel. |
boolean |
isSelected(int row,
int column)
Returns true if the given row/column is selected. |
boolean |
select(int state,
int row,
int column)
Adds, extends, deselected or ends a selection based on a row or column. |
boolean |
selectAll()
Selects all cells. |
boolean |
setColumnSelection(int start_column,
int end_column)
Sets a range of columns as the current selection. |
boolean |
setRowSelection(int start_row,
int end_row)
Sets a range of rows as the current selection. |
boolean |
setSelection(Collection selected_cells)
Sets the selection to a Collection of JCCellRange objects. |
boolean |
setSelection(int start_row,
int start_column,
int end_row,
int end_column)
Sets a range of cells as the current selection. |
boolean |
setSelection(com.klg.jclass.table.JCCellRange selection)
Sets the selection to a JCCellRange. |
void |
setSelectionPolicy(int value)
Sets the policy of selection supported by the model. |
void |
setTable(com.klg.jclass.table.JCTable table)
Sets the JCTable controlled by the SelectionModel. |
Methods inherited from interface com.klg.jclass.table.Moveable |
moveColumns, moveRows, remapColumns, remapRows, shiftColumn, shiftRow, swapColumns, swapRows |
Field Detail |
public static final int SELECT
public static final int ADD
public static final int EXTEND
public static final int DESELECT
public static final int END
public static final int SELECT_NONE
public static final int SELECT_SINGLE
public static final int SELECT_RANGE
public static final int SELECT_MULTIRANGE
Method Detail |
public com.klg.jclass.table.JCTable getTable()
public void setTable(com.klg.jclass.table.JCTable table)
public int getSelectionPolicy()
SELECT_NONE
, SELECT_SINGLE
,
SELECT_RANGE
, and SELECT_MULTIRANGE
.
public void setSelectionPolicy(int value)
SELECT_NONE
, SELECT_SINGLE
,
SELECT_RANGE
, and SELECT_MULTIRANGE
.
public boolean addColumnSelection(int start_column, int end_column)
public boolean addRowSelection(int start_row, int end_row)
public boolean addSelection(int start_row, int start_column, int end_row, int end_column)
public boolean addSelection(com.klg.jclass.table.JCCellRange selection)
public void cleanup()
public void clearSelection()
public boolean extendSelection(int row, int column)
public Collection getSelectedCells()
public boolean isSelected(int row, int column)
public boolean selectAll()
public boolean setColumnSelection(int start_column, int end_column)
public boolean setRowSelection(int start_row, int end_row)
public boolean setSelection(int start_row, int start_column, int end_row, int end_column)
public boolean setSelection(Collection selected_cells)
public boolean setSelection(com.klg.jclass.table.JCCellRange selection)
public boolean select(int state, int row, int column)
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |