|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.klg.jclass.table.JCSelection
The SelectionModel interface represents the current cell
selection state in Table. This implementation supports all
selection policies. If the policy is changed, the current selection is
cleared.
| Field Summary | |
protected int |
last_selected_column
|
protected int |
last_selected_row
|
protected int |
policy
|
protected Vector |
selected_cells
|
protected com.klg.jclass.table.JCTable |
table
|
| Fields inherited from interface com.klg.jclass.table.SelectionModel |
ADD, DESELECT, END, EXTEND, SELECT, SELECT_MULTIRANGE, SELECT_NONE, SELECT_RANGE, SELECT_SINGLE |
| Constructor Summary | |
JCSelection()
|
|
JCSelection(com.klg.jclass.table.JCTable table)
|
|
| 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 cr)
Adds a JCCellRange to the selection. |
void |
cleanup()
Ensures that the last range does not duplicate another. |
void |
clearSelection()
Clears all selected cells and generates required JCSelectEvents. |
void |
clearSelection(boolean withAllEvents)
Clears all selected cells. |
protected void |
clearWithNoNotification()
Clears the current selection without notification. |
boolean |
extendSelection(int row,
int column)
Extends the current selection to the given row and column. |
Collection |
getSelectedCells()
Returns a Vector 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 Table controlled by the SelectionModel. |
protected boolean |
isLabel(int row,
int column)
Returns true if the given row/column is a label. |
boolean |
isSelected(int row,
int column)
Returns true if the given row/column is selected. |
void |
moveColumns(int start_column,
int num_columns,
int destination)
Adjusts the selection after moving columns. |
void |
moveRows(int start_row,
int num_rows,
int destination)
Adjusts the selection after moving rows. |
void |
remapColumns(int[] new_positions)
Reorders selected columns after the column mapping changes. |
void |
remapRows(int[] new_positions)
Reorders selected rows after the row mapping changes. |
boolean |
select(int state,
int row,
int column)
Adds, extends, deselects, 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 ranges)
Sets the selection to a Vector of JCCellRange. |
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 cr)
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 Table controlled by the SelectionModel. |
void |
shiftColumn(int start_column,
int num_columns,
int direction)
Adjusts the selection after adding or deleting columns. |
void |
shiftRow(int start_row,
int num_rows,
int direction)
Adjusts the selection after adding or deleting rows. |
void |
swapColumns(int column1,
int column2)
Adjusts the selection based on two columns swapping position. |
void |
swapRows(int row1,
int row2)
Adjusts the selection based on two rows swapping position. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected com.klg.jclass.table.JCTable table
protected Vector selected_cells
protected int policy
protected int last_selected_row
protected int last_selected_column
| Constructor Detail |
public JCSelection()
public JCSelection(com.klg.jclass.table.JCTable table)
| Method Detail |
public com.klg.jclass.table.JCTable getTable()
SelectionModel.
getTable in interface SelectionModelSelectionModelpublic void setTable(com.klg.jclass.table.JCTable table)
SelectionModel.
setTable in interface SelectionModeltable - public int getSelectionPolicy()
SELECT_NONE, SELECT_SINGLE,
SELECT_RANGE, and SELECT_MULTIRANGE.
getSelectionPolicy in interface SelectionModelSELECT_NONE, SELECT_SINGLE,
SELECT_RANGE, or SELECT_MULTIRANGEsetSelectionPolicy(int)public void setSelectionPolicy(int value)
SELECT_NONE, SELECT_SINGLE,
SELECT_RANGE, and SELECT_MULTIRANGE.
setSelectionPolicy in interface SelectionModelvalue -
public boolean addColumnSelection(int start_column,
int end_column)
addColumnSelection in interface SelectionModelstart_column - end_column -
true if the selection is accepted
public boolean addRowSelection(int start_row,
int end_row)
addRowSelection in interface SelectionModelend_row - start_row -
true if the selection is accepted
public boolean addSelection(int start_row,
int start_column,
int end_row,
int end_column)
addSelection in interface SelectionModelend_column - end_row - start_column - start_row -
true if the selection is acceptedpublic boolean addSelection(com.klg.jclass.table.JCCellRange cr)
JCCellRange to the selection.
addSelection in interface SelectionModelcr -
true if the selection is acceptedpublic void cleanup()
cleanup in interface SelectionModelpublic void clearSelection()
JCSelectEvents.
clearSelection in interface SelectionModelpublic void clearSelection(boolean withAllEvents)
withAllEvents is
true, before and after events are generated for the deselected
cell ranges.
withAllEvents -
public boolean extendSelection(int row,
int column)
extendSelection in interface SelectionModelrow - column -
true if the selection is acceptedpublic Collection getSelectedCells()
JCCellRange objects.
getSelectedCells in interface SelectionModelJCCellRange objects
public boolean isSelected(int row,
int column)
true if the given row/column is selected.
isSelected in interface SelectionModelcolumn - row -
true if the selection is acceptedpublic boolean selectAll()
selectAll in interface SelectionModeltrue if the selection is accepted
public boolean setColumnSelection(int start_column,
int end_column)
setColumnSelection in interface SelectionModelend_column - start_column -
true if the selection is accepted
public boolean setRowSelection(int start_row,
int end_row)
setRowSelection in interface SelectionModelend_row - start_row -
true if the selection is accepted
public boolean setSelection(int start_row,
int start_column,
int end_row,
int end_column)
setSelection in interface SelectionModelend_column - end_row - start_column - start_row -
true if the selection is acceptedpublic boolean setSelection(Collection ranges)
JCCellRange.
setSelection in interface SelectionModelranges -
true if the selection is acceptedpublic boolean setSelection(com.klg.jclass.table.JCCellRange cr)
JCCellRange.
setSelection in interface SelectionModelcr -
true if the selection is accepted
public boolean select(int state,
int row,
int column)
select in interface SelectionModelcolumn - row - state -
true if the model supports the selectionprotected void clearWithNoNotification()
protected boolean isLabel(int row,
int column)
true if the given row/column is a label.
column - row -
true if the given row/column is a label
public void moveColumns(int start_column,
int num_columns,
int destination)
moveColumns in interface Moveablestart_column - the starting positionnum_columns - the number of columnsdestination - the column before which the source columns are
moved (use JCTableEnum.MAXINT to move the columns to
the end)
public void moveRows(int start_row,
int num_rows,
int destination)
moveRows in interface Moveablestart_row - the starting positionnum_rows - the number of rowsdestination - the row before which the source rows are moved (use
JCTableEnum.MAXINT to move the rows to the end)public void remapColumns(int[] new_positions)
remapColumns in interface Moveablenew_positions - public void remapRows(int[] new_positions)
remapRows in interface Moveablenew_positions -
public void shiftColumn(int start_column,
int num_columns,
int direction)
shiftColumn in interface Moveablestart_column - the start positionnum_columns - the number of columnsdirection - use +1 for insert and -1
for delete
public void shiftRow(int start_row,
int num_rows,
int direction)
shiftRow in interface Moveablestart_row - the start positionnum_rows - the number of rowsdirection - use +1 for insert and -1
for delete
public void swapColumns(int column1,
int column2)
swapColumns in interface Moveablecolumn1 - column2 -
public void swapRows(int row1,
int row2)
swapRows in interface Moveablerow1 - row2 -
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||