borland Packages Class Hierarchy jbcl.model Package Index
java.lang.Object +----borland.jbcl.model.SingleGraphSelection
Constructors Properties Methods Event Listeners
Implements GraphSelection, WritableGraphSelection, Serializable
SingleGraphSelection implements the WritableGraphSelection interface, allowing only one item to be selected.
The all property contains the selected node in the graph. The count property returns the number of selected nodes, which for this class, is either 1 or 0.
public SingleGraphSelection()Constructs a SingleGraphSelection object.
public SingleGraphSelection(borland.jbcl.model.GraphLocation newItem)Constructs a SingleGraphSelection object. The selected node is specified with the location parmater.
Parameters:
public GraphLocation[] getAll()Returns the selected node in an array of GraphLocation objects. Because there is only one selected node, the returned array contains only one value.
public int getCount()Returns the number of selected nodes. The number will be either 1 (an item is selected), or 0 (no item is selected).
protected String paramString()Returns the single item parameter of the SingleGraphSelection object as a string. The string takes this form:
"item=" + item
where item is the GraphLocation object.
protected void processSelectionEvent(borland.jbcl.model.GraphSelectionEvent e)If a graph-selection event occurred and there are listeners for such events, a graph-selection event object is sent to all listeners.
public final String toString()Returns the value of the SingleGraphSelection object as a string.
Overrides: java.lang.Object.toString()
public void addSelectionListener(borland.jbcl.model.GraphSelectionListener listener) public void removeSelectionListener(borland.jbcl.model.GraphSelectionListener listener)