jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.SingleMatrixSelection
Constructors Properties Methods Event Listeners
Implements MatrixSelection, WritableMatrixSelection, Serializable
SingleMatrixSelection
implements the WritableMatrixSelection
interface, allowing only a single location within the matrix to be selected at a time.
The all
property contains the selected location in the matrix. The count
property returns the number of selected locations, which for this class, is either 1 or 0.
public SingleMatrixSelection()Constructs a
SingleMatrixSelection
object.
public SingleMatrixSelection(MatrixLocation location)Constructs a
SingleMatrixSelection
object. The selected location is specified with the location
parmater.
Parameters:
location
SingleMatrixSelection
object.
public MatrixLocation[] getAll()Returns the selected location in an array of
MatrixLocation
objects. 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
cell
parameter of the SingleMatrixSelection
object as a string. The string takes this form:
"cell=" + cell
where cell
is the MatrixLocation
object.
protected void processSelectionEvent(MatrixSelectionEvent e)If a matrix-selection event occurred and there are listeners for such events, a matrix-selection event object is sent to all listeners.
public final String toString()Returns the value of the
SingleMatrixSelection
object as a string.
Overrides: java.lang.Object.toString()
public void addSelectionListener(MatrixSelectionListener listener) public void removeSelectionListener(MatrixSelectionListener listener)