jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.RowMatrixSelection
Constructors Properties Methods Event Listeners
Implements MatrixSelection, WritableMatrixSelection, Serializable
RowMatrixSelection
implements the WritableMatrixSelection
interface, allowing a single row 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 RowMatrixSelection()Constructs a
RowMatrixSelection
object.
public RowMatrixSelection(int maxColumns)Constructs a
RowMatrixSelection
object and specifies the maximum number of columns that can be selected within the row.
Parameters:
maxColumns
public RowMatrixSelection(int maxColumns, int row)Constructs a
RowMatrixSelection
object, specifying the specifc row in the matrix and the maximum number of columns that can be selected in that row.
Parameters:
maxRows
column
public MatrixLocation[] getAll()A read-only property that returns the locations within the selected row to an array of
MatrixLocation
objects.
public int getCount()Returns the number of selected locations within the row.
public int getMaxColumns() public void setMaxColumns(int maxColumns)Used to obtain and set the maximum number of rows in the selected column. When
maxRows
is set, the processSelectEvent()
method is called.
Parameters:
maxColumns
protected void processSelectionEvent(MatrixSelectionEvent e)If a row-matrix event occurred and there are listeners for matrix-selection events, the event object is sent to the listening objects.
Parameters:
e
public void addSelectionListener(MatrixSelectionListener listener) public void removeSelectionListener(MatrixSelectionListener listener)