jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.MultiColumnMatrixSelection
Constructors Properties Methods Event Listeners
Implements MatrixSelection, WritableMatrixSelection, Serializable
MultiColumnMatrixSelection
implements WritableMatrixSelection
allowing multiple columns 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 maxRows
property contains the maximum number of rows the selection can contain.
public MultiColumnMatrixSelection()Creates a
MultiColumnMatrixSelection
class.
public MultiColumnMatrixSelection(int maxRows)Creates a
MultiColumnMatrixSelection
class that contains a maximum number of rows.
Parameters:
maxRows
public MultiColumnMatrixSelection(int maxRows, MatrixLocation[] selection)Creates a
MultiColumnMatrixSelection
class that specifies a maximum number of rows that can be selected and contains an array of selected matrix locations.
Parameters:
maxRows
selection
public MultiColumnMatrixSelection(int maxRows, int[] columns)Creates a
MultiColumnMatrixSelection
class that contains a maximum number of rows that can be selected and an array of selected columns.
Parameters:
maxRows
columns
public MatrixLocation[] getAll()Returns all the selected cells as an array of
MatrixLocations
.
public int getCount()Returns the number of selected cells.
public int getMaxRows() public void setMaxRows(int maxRows)Determines the maximum number of selectable rows 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)