borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.model 

SingleMatrixSelection component

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

About the SingleMatrixSelection component

Constructors  Properties  Methods  Event Listeners

Implements MatrixSelection, WritableMatrixSelection

SingleMatrixSelection implements the WritableMatrixSelection interface, allowing only a single location within the matrix to be selected at a time.


SingleMatrixSelection constructors

SingleMatrixSelection properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

SingleMatrixSelection methods

Methods implemented in this class

Methods implemented in java.lang.Object

SingleMatrixSelection event listeners


SingleMatrixSelection constructors

SingleMatrixSelection()

  public SingleMatrixSelection()
Constructs a SingleMatrixSelection object.

SingleMatrixSelection(borland.jbcl.model.MatrixLocation)

  public SingleMatrixSelection(borland.jbcl.model.MatrixLocation location)
Constructs a SingleMatrixSelection object. The selected location is specified with the location parmater.

Parameters:

location
The single location that makes up the set of selected locations in the SingleMatrixSelection object.

SingleMatrixSelection properties

all

 public MatrixLocation[] getAll()
Returns the selected location in an array of MatrixLocation objects. Because there is only one selected location, the returned array contains only one value.

count

 public int getCount()
Returns the number of selected locations. The number will be either 1 (an item is selected), or 0 (no item is selected).

SingleMatrixSelection methods

paramString()

  protected String paramString()
Returns the single cell parameter of the SingleMatrixSelection object as a string. The string takes this form:

"cell=" + cell

where cell is the MatrixLocation object.

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.

toString()

  public final String toString()
Returns the value of the SingleMatrixSelection object as a string.

Overrides: java.lang.Object.toString()


SingleMatrixSelection 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)