jbcl.model Package
java.lang.Object +----com.borland.jbcl.model.LinkedTreeContainer +----com.borland.jbcl.model.BasicTreeContainer
Variables Constructors Properties Methods Event Listeners
Implements GraphModel, WritableGraphModel, Serializable
This data provider component handles a graph data model; that is, data arranged in a hierarchy such as a directory structure. It accepts data that are of type LinkedTreeNode
.
protected boolean eventsUsed to determine whether graph-model events are enabled. If
events
is true, graph-model events can be processed.
protected transient EventMulticaster listenersContains set of listeners for graph-model events generated in this component.
protected LinkedTreeNode rootDetermines the root node of the tree hierarchy.
public LinkedTreeContainer()Creates a new
LinkedTreeContainer
object with a null root node.
public LinkedTreeContainer(LinkedTreeNode root)Creates a new
LinkedTreeContainer
object with the specified root node.
Parameters:
root
public GraphLocation getRoot()Obtains the root node for this
LinkedTreeContainer
object.
public boolean isVariableSize()Determines whether the size of the
LinkedTreeContainer
can vary. If variableSize
is true, nodes can be added and deleted; otherwise, the size of the tree cannot change.
public Enumeration elements()Returns the nodes of the tree as an
InputIterator
. As it does so, it creates an array to hold the nodes and calls the fillNodes()
method to populate the array.
protected void fillNodes(LinkedTreeNode node, Vector nodes)Populates the array.
Parameters:
node
LinkedTreeNode
to use as the item container.
nodes
public void processModelEvent(GraphModelEvent e)Dispatches graph-model events to all registered listeners.
Parameters:
e
public void addModelListener(GraphModelListener listener) public void removeModelListener(GraphModelListener listener)