jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.BasicSelection +----com.borland.jbcl.model.BasicGraphSelection +----com.borland.jbcl.model.BasicMatrixSelection +----com.borland.jbcl.model.BasicVectorSelection
Variables Properties Methods
Implements Serializable
BasicSelection
stores 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.
protected transient Vector arrayAn array that contains the selected items.
protected boolean eventsUsed to determine whether selection events are enabled. If events is true, events are enabled. The default value is true.
protected transient EventMulticaster selectionListenersThe list of listeners for selection events.
public int getCount()Returns the number of selected items.
protected boolean doAdd(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
protected boolean doRemove(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
protected boolean doRemoveAll()If the selection set has items in it,
doRemoveAll()
removes them all and returns true; otherwise, it returns false.
protected String paramString()Returns the size of the selected items array as a string. Here is the returned string:
public final String toString()Returns the
BasicSelection
object as a string.
Overrides: java.lang.Object.toString()