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

SingleVectorSelection component

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

About the SingleVectorSelection component

Constructors  Properties  Methods  Event Listeners

Implements VectorSelection, WritableVectorSelection

SingleVectorSelection implements the WritableVectorSelection interface, allowing only one item to be selected.


SingleVectorSelection constructors

SingleVectorSelection properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

SingleVectorSelection methods

Methods implemented in this class

Methods implemented in java.lang.Object

SingleVectorSelection event listeners


SingleVectorSelection constructors

SingleVectorSelection()

  public SingleVectorSelection()
Constructs a SingleVectorSelection object.

SingleVectorSelection(int)

  public SingleVectorSelection(int location)
Constructs a SingleVectorSelection object. The selected location is specified with the location parmater.

Parameters:

location
The single location that makes up the set of selection locations in the SingleVectorSelection object.

SingleVectorSelection properties

all

 public  int[] getAll()
Returns the selected location in an array of integers. 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).

SingleVectorSelection methods

paramString()

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

"index=" + index

where index is either 1 (an item is selected), or 0 (no item is selected).

processSelectionEvent(borland.jbcl.model.VectorSelectionEvent)

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

Parameters:

e
The vector-selection event object sent to all listeners.

toString()

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

Overrides: java.lang.Object.toString()


SingleVectorSelection 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.VectorSelectionListener listener)
 public void removeSelectionListener(borland.jbcl.model.VectorSelectionListener listener)