public class TreeLayoutHelper
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TreeLayoutHelper.TreeListener
A superclass for listeners that can be added to this observer to get
notification whenever the tree structure changes.
|
static class |
TreeLayoutHelper.TreeNode
Represents a node in a tree structure and stores all information related
to it.
|
static class |
TreeLayoutHelper.TreeNodeFactory
TreeLayoutObserver uses instance of this class to create
instances of TreeLayoutHelper.TreeNode. |
| Constructor and Description |
|---|
TreeLayoutHelper(TreeLayoutHelper.TreeNodeFactory nodeFactory)
Constructs a new
TreeLayoutHelper for observing the given
LayoutContext. |
| Modifier and Type | Method and Description |
|---|---|
void |
computeTree(org.eclipse.gef.graph.Node[] nodes)
Recomputes all the information about the tree structure (the same effect
as creating new
TreeLayoutObserver). |
protected TreeLayoutHelper.TreeNode |
getSuperRoot()
Returns Super Root, that is an artificial node being a common parent for
all nodes in observed tree structure.
|
protected TreeLayoutHelper.TreeNode |
getTreeNode(org.eclipse.gef.graph.Node node)
Returns a
TreeLayoutHelper.TreeNode related to given node layout. |
public TreeLayoutHelper(TreeLayoutHelper.TreeNodeFactory nodeFactory)
TreeLayoutHelper for observing the given
LayoutContext. The given TreeLayoutHelper.TreeNodeFactory will be used for
the construction of TreeLayoutHelper.TreeNodes. If no factory is supplied, the
TreeLayoutHelper.TreeNodeFactory will be used.nodeFactory - The TreeLayoutHelper.TreeNodeFactory to use.public void computeTree(org.eclipse.gef.graph.Node[] nodes)
TreeLayoutObserver).nodes - nodesprotected TreeLayoutHelper.TreeNode getSuperRoot()
protected TreeLayoutHelper.TreeNode getTreeNode(org.eclipse.gef.graph.Node node)
TreeLayoutHelper.TreeNode related to given node layout. If such a
TreeNode doesn't exist, it's created.node - The Node for which to return the corresponding
TreeLayoutHelper.TreeNode.TreeLayoutHelper.TreeNode related to the given
Node or a newly created one in case there was no related
TreeLayoutHelper.TreeNode before.Copyright (c) 2014 itemis AG and others. All rights reserved.