borland.jbcl Packages  borland.jbcl Class Hierarchy  borland.jbcl.model 

SingleGraphSelection component

java.lang.Object
   +----borland.jbcl.model.SingleGraphSelection

About the SingleGraphSelection component

Constructors  Properties  Methods  Event Listeners

Implements GraphSelection, WritableGraphSelection

SingleGraphSelection implements the WritableGraphSelection interface, allowing only one item to be selected.


SingleGraphSelection constructors

SingleGraphSelection properties

*Read-only properties **Write-only properties

Properties implemented in this class

Properties implemented in java.lang.Object

SingleGraphSelection methods

Methods implemented in this class

Methods implemented in java.lang.Object

SingleGraphSelection event listeners


SingleGraphSelection constructors

SingleGraphSelection()

  public SingleGraphSelection()
Constructs a SingleGraphSelection object.

SingleGraphSelection(borland.jbcl.model.GraphLocation)

  public SingleGraphSelection(borland.jbcl.model.GraphLocation newItem)
Constructs a SingleGraphSelection object. The selected node is specified with the location parmater.

Parameters:

newItem
The new selected node.

SingleGraphSelection properties

all

 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.

count

 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).

SingleGraphSelection methods

paramString()

  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.

processSelectionEvent(borland.jbcl.model.GraphSelectionEvent)

  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.

toString()

  public final String toString()
Returns the value of the SingleGraphSelection object as a string.

Overrides: java.lang.Object.toString()


SingleGraphSelection event listeners

This component is a source for the following event sets. For information on the JBCL event sets, see Events in JBCL.

selection

 public void addSelectionListener(borland.jbcl.model.GraphSelectionListener listener)
 public void removeSelectionListener(borland.jbcl.model.GraphSelectionListener listener)