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

BasicSelection class (abstract)

java.lang.Object
   +----borland.jbcl.model.BasicSelection
           +----borland.jbcl.model.BasicMatrixSelection
           +----borland.jbcl.model.BasicVectorSelection
           +----borland.jbcl.model.BasicGraphSelection

About the BasicSelection class

Variables  Properties  Methods  
BasicSelection uses a jgl.Array to store the locations in the model object of those items that are selected.

Generally, you would use or extend one of the subclasses of BasicSelection, depending upon which model type your component requires. If you are creating a new model type, extend BasicSelection and add your own functionality.


BasicSelection variables

Variables implemented in this class

BasicSelection properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

BasicSelection methods

Methods implemented in this class

Methods implemented in java.lang.Object


BasicSelection variables

array

  protected Array array
An array that contains the selected items.

events

  protected boolean events
Used to determine whether selection events are enabled. If events is true, events are enabled. The default value is true.

selectionListeners

  protected EventMulticaster selectionListeners
The list of listeners for selection events.

BasicSelection properties

count

 public int getCount()
Returns the number of selected items.

BasicSelection methods

doAdd(java.lang.Object)

  protected boolean doAdd(java.lang.Object location)
Adds the specified location to the set of selected locations, if it is not already there. doAdd() returns true if the location was added; otherwise, it returns false.

Parameters:

location
The object to be added to the set of selected locations.

doRemove(java.lang.Object)

  protected boolean doRemove(java.lang.Object location)
If the location exists in the set of selected locations, this method removes the specified location from the selection pool and returns true. If location is not removed doRemove() returns false.

Parameters:

location
The object to be removed from the set of selected locations.

doRemoveAll()

  protected boolean doRemoveAll()
If the selection set has items in it, doRemoveAll() removes them all and returns true; otherwise, it returns false.

paramString()

  protected String paramString()
Returns the size of the selected items array as a string. Here is the returned string:

"size=" + array.size();

toString()

  public final String toString()
Returns the BasicSelection object as a string.

Overrides: java.lang.Object.toString()