borland.jbcl Packages borland.jbcl Class Hierarchy borland.jbcl.model
java.lang.Object +----borland.jbcl.model.SingleGraphSelection
Constructors Properties Methods Event Listeners
Implements GraphSelection, WritableGraphSelection
SingleGraphSelection implements the WritableGraphSelection interface, allowing only one item to be selected.
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)