jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.MultiRowMatrixSelection
Constructors Properties Methods Event Listeners
Implements MatrixSelection, WritableMatrixSelection, Serializable
MultiRowMatrixSelection
implements WritableMatrixSelection
and allows a multiple rows to be selected at a time.
All of the selected locations are contained in the all
property and the number of selected locations are held in the count
property. The maxColumns
property contains the maximum number of columns the selection can contain.
public MultiRowMatrixSelection()Creates a
MultiRowMatrixSelection
class.
public MultiRowMatrixSelection(int maxColumns)Creates a
MultiRowMatrixSelection
class that contains a maximum number of columns.
Parameters:
maxColumns
public MultiRowMatrixSelection(int maxColumns, MatrixLocation[] selection)Creates a
MultiRowMatrixSelection
class that specifies a maximum number of columns that can be selected and an array of selected matrix locations.
Parameters:
maxColumns
selection
public MultiRowMatrixSelection(int maxColumns, int[] rows)Creates a
MultiRowMatrixSelection
class that contains a maximum number of columns that can be selected and an array of selected rows.
Parameters:
maxColumns
rows
public MatrixLocation[] getAll()Returns all the selected cells as an array of
MatrixLocations
.
public int getCount()Returns the number of selected cells.
public int getMaxColumns() public void setMaxColumns(int maxColumns)Determines the maximum number of selectable columns in the matrix and sends a SelectionEvent.SELECTION_CHANGED event to all listeners.
protected void processSelectionEvent(MatrixSelectionEvent e)Sends SelectionEvent.SELECTION_CHANGED to all registered listeners for this event.
public void addSelectionListener(MatrixSelectionListener listener) public void removeSelectionListener(MatrixSelectionListener listener)