borland Packages  Class Hierarchy  jbcl.model Package  Index 

CrossMatrixSelection component

java.lang.Object
   +----borland.jbcl.model.CrossMatrixSelection

About the CrossMatrixSelection component

Constructors  Properties  Methods  Event Listeners

Implements MatrixSelection, WritableMatrixSelection, Serializable

CrossMatrixSelection implements the WritableMatrixSelection interface, allowing a single row and column to be selected at a time. The resulting set of selected locations appears as a "crosshairs" selection in the matrix; the selected column and selected row intersect at a single cell.

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 and maxRows properties contain the maximum number of columns and rows, respectively, the selection can contain.


CrossMatrixSelection constructors

CrossMatrixSelection properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

CrossMatrixSelection methods

Methods implemented in this class

Methods implemented in java.lang.Object

CrossMatrixSelection event listeners


CrossMatrixSelection constructors

CrossMatrixSelection()

  public CrossMatrixSelection()
Constructs a CrossMatrixSelection object.

CrossMatrixSelection(int, int)

  public CrossMatrixSelection(int maxRows, int maxColumns)
Constructs a CrossMatrixSelection object that has restrictions on the maximum number of rows that can be selected in the selected column and the maximum number of columns that can be selected in the selected row.

Parameters:

maxRows
The maximum number of rows that can be selected in the selected column.
maxColumns
The maximum number of columns that can be selected in the selected row.

CrossMatrixSelection(int, int, borland.jbcl.model.MatrixLocation)

  public CrossMatrixSelection(int maxRows, int maxColumns, borland.jbcl.model.MatrixLocation focus)
Constructs a CrossMatrixSelection object that has restrictions on the maximum number of rows that can be selected in the selected column and the maximum number of columns that can be selected in the selected row. The value of the focus parameter determines the intersection of the column and row, thereby selecting the column and row.

Parameters:

maxRows
The maximum number of rows that can be selected in the selected column.
maxColumns
The maximum number of columns that can be selected in the selected row.
focus
Specifies the cell within the matrix where the selected column and the selected row meet.

CrossMatrixSelection properties

all

 public MatrixLocation[] getAll()
Returns the set of selected locations in an array of MatrixLocation objects.

count

 public int getCount()
Returns the number of selected locations within the matrix.

maxColumns

 public int getMaxColumns()
 public void setMaxColumns(int maxColumns)
Determines the maximum number of columns the selected row can contain.

Parameters:

maxColumns
The maximum number of columns the selected row can contain.

maxRows

 public int getMaxRows()
 public void setMaxRows(int maxRows)
Determines the maximum number of rows the selected column can contain.

Parameters:

maxRows
The maximum number of rows the selected column can contain.

CrossMatrixSelection methods

processSelectionEvent(borland.jbcl.model.MatrixSelectionEvent)

  protected void processSelectionEvent(borland.jbcl.model.MatrixSelectionEvent e)
If a matrix-selection event occurred and there are listeners for such events, a matrix-selection event object is sent to all listeners.

CrossMatrixSelection event listeners

This component is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

selection

 public void addSelectionListener(borland.jbcl.model.MatrixSelectionListener listener)
 public void removeSelectionListener(borland.jbcl.model.MatrixSelectionListener listener)