borland Packages Class Hierarchy jbcl.model Package Index
java.lang.Object +----borland.jbcl.model.SingleVectorSelection
Constructors Properties Methods Event Listeners
Implements VectorSelection, WritableVectorSelection, Serializable
SingleVectorSelection implements the WritableVectorSelection interface, allowing only one item to be selected.
The all property contains the selected item in the vector. The count property returns the number of selected items, which for this class, is either 1 or 0.
public SingleVectorSelection()Constructs a SingleVectorSelection object.
public SingleVectorSelection(int location)Constructs a SingleVectorSelection object. The selected location is specified with the location parmater.
Parameters:
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.
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).
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).
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:
public final String toString()Returns the value of the SingleVectorSelection object as a string.
Overrides: java.lang.Object.toString()
public void addSelectionListener(borland.jbcl.model.VectorSelectionListener listener) public void removeSelectionListener(borland.jbcl.model.VectorSelectionListener listener)