borland Packages  Class Hierarchy  jbcl.model Package  Index 

WritableGraphSelection interface

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

About the WritableGraphSelection interface

Properties  Methods  Event Listeners

Implemented by BasicGraphSelection, NullGraphSelection, SingleGraphSelection

The WritableGraphSelection interface provides read-write access to the set of selected nodes within a graph model. Usually it is used to manage the selection set.

Most of the time you will use classes that implement WritableGraphSelection, such as BasicGraphSelection. You can implement the interface directly, however.

If you need read access only to a set of selected nodes, you can use the GraphSelection interface instead.

To add a node or an array of nodes, call one of the add() methods. To delete one or more nodes, call one of the remove() methods. You can set the data object of a specified node with the set() method.


WritableGraphSelection properties

*Read-only properties **Write-only properties

Properties implemented in borland.jbcl.model.GraphSelection

WritableGraphSelection methods

Methods defined in this interface

Methods implemented in borland.jbcl.model.GraphSelection

WritableGraphSelection event listeners


WritableGraphSelection methods

add(borland.jbcl.model.GraphLocation)

  public void add(borland.jbcl.model.GraphLocation location)
Adds a node in the graph to the set of selected nodes.

Parameters:

location
A GraphLocation object that identifes the location of the node.

add(borland.jbcl.model.GraphLocation[])

  public void add(borland.jbcl.model.GraphLocation[] location)
Adds multiple nodes to the set of selected nodes in the graph.

Parameters:

locations
An array of GraphLocation objects that specify the locations of nodes in the graph.

enableSelectionEvents(boolean)

  public void enableSelectionEvents(boolean enable)
Determines whether the broadcasting of graph-selection events is enabled or disabled based on the value of the enable parameter.

Parameters:

enable
If enable is true, graph-selection events are enabled and a SELECTION_CHANGED event is fired to all graph-selection listeners. If enable is false, all graph-selection events are disabled.

remove(borland.jbcl.model.GraphLocation)

  public void remove(borland.jbcl.model.GraphLocation location)
Removes the specified node from the set of selected nodes. The node is specified as a GraphLocation object.

Parameters:

location
A GraphLocation object that specifies the location of the node in the set of selected nodes.

remove(borland.jbcl.model.GraphLocation[])

  public void remove(borland.jbcl.model.GraphLocation[] location)
Removes a specified array of nodes from the set of selected nodes.

Parameters:

locations
An array of GraphLocation objects that specify the nodes that are to be removed from the set of selected nodes.

removeAll()

  public void removeAll()
Removes all nodes from the set of selected nodes.

set(borland.jbcl.model.GraphLocation[])

  public void set(borland.jbcl.model.GraphLocation[] locations)
Sets the selection pool to a given set of nodes.

Parameters:

locations
An array of GraphLocation objects that becomes the new sets of selected nodes.

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