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

GraphSelection interface

borland.jbcl.model.GraphSelection
   +----borland.jbcl.model.WritableGraphSelection

About the GraphSelection interface

Properties  Methods  Event Listeners

Implemented by BasicGraphSelection, NullGraphSelection, SingleGraphSelection

The GraphSelection interface provides read access to the set of selected nodes within the graph model. It contains a count property that holds the number of selected locations. Use the contains() method to determine if a specific node is currently selected and the all property to return all selected nodes.

Classes that implement the GraphSelection interface are usually used to pass selection sets. Usually you will use one of the graph-selection classes, such as BasicGraphSelection, NullGraphSelection, or SingleGraphSelection, but you can implement the GraphSelection interface directly.

If you need an interface that provides read-write access to the set of selected nodes within the graph, use the WritableGraphSelection interface instead.


GraphSelection properties

*Read-only properties **Write-only properties

Properties defined in this interface

GraphSelection methods

Methods defined in this interface

GraphSelection event listeners


GraphSelection properties

all

 public GraphLocation[] getAll()
Returns all selected nodes in an array of GraphLocation objects.

count

 public int getCount()
Returns the number of selected nodes.

GraphSelection methods

contains(borland.jbcl.model.GraphLocation)

  public boolean contains(borland.jbcl.model.GraphLocation node)
Determines whether a specific node is selected. If contains() returns true, the node is in the set of selected nodes; if it is false, the node is not selected.

Parameters:

node
The GraphLocation object that identifies the node in question.

GraphSelection event listeners

This interface 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)