borland Packages Class Hierarchy jbcl.model Package Index
borland.jbcl.model.VectorSelection +----borland.jbcl.model.WritableVectorSelection
Methods
Implemented by BasicVectorSelection, NullVectorSelection, SingleVectorSelection
The VectorSelection interface provides read access to the set of selected locations within the vector model. It contains a count property that holds the number of selected locations. Use the contains() method to determine if a specific location is currently selected and the getAll() method to return all selected locations.
Classes that implement the VectorSelection interface are usually used to pass selection sets. Usually you will use one of the vector-selection classes, such as BasicVectorSelection, NullVectorSelection, or SingleVectorSelection, but you can implement the VectorSelection interface directly.
If you need an interface that provides read-write access to the set of selected locations within the vector, use the WritableVectorSelection interface instead.
void addSelectionListener(borland.jbcl.model.VectorSelectionListener listener)Adds a vector-selection event listener to the set of selected locations.
Parameters:
boolean contains(int location)Determines whether a particular location where a data item is stored in the vector is selected. If contains() is true, the specified location is in the selection set and is therefore selected. If contains() is false, the location is not selected.
Parameters:
int[] getAll()Returns the complete set of selected locations.
int getCount()Returns the number of selected locations.
void removeSelectionListener(borland.jbcl.model.VectorSelectionListener listener)Removes a selection-event listener from the set of selected locations.
Parameters: