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

GraphModel interface

borland.jbcl.model.GraphModel
   +----borland.jbcl.model.WritableGraphModel

About the GraphModel interface

Properties  Methods  Event Listeners

Implemented by TreeControl, BasicTreeContainer, LinkedTreeContainer

Provides the methods for a read-only graph model object; that is, a model that holds data in a hierarchical relationship such as a directory listing. Each node (except the root node, or origin of the graph) has a parent node from which it descends. Each node may or may not have one or more sibling nodes (descendants from the same parent) and one or more children nodes (descendants from itself).

Usually you extend a class that implements this interface, such as LinkedTreeContainer, but you can implement it directly.

See also:
Models in the Java Beans Component Library
Graph model classes and interfaces


GraphModel properties

*Read-only properties **Write-only properties

Properties defined in this interface

GraphModel methods

Methods defined in this interface

GraphModel event listeners


GraphModel properties

root

 public GraphLocation getRoot()
Returns the root node for this graph.

GraphModel methods

find(java.lang.Object)

  public GraphLocation find(java.lang.Object data)
Returns the location of the passed data object in the graph.

Parameters:

data
The data object whose location you are searching for in the graph.

get(borland.jbcl.model.GraphLocation)

  public Object get(borland.jbcl.model.GraphLocation node)
Returns the data object specified by the node parameter.

Parameters:

node
A location in the graph specified as a GraphLocation object.

GraphModel event listeners

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

model

 public void addModelListener(borland.jbcl.model.GraphModelListener listener)
 public void removeModelListener(borland.jbcl.model.GraphModelListener listener)