|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.DefaultGraph2DFactory | +--y.view.hierarchy.DefaultHierarchyGraphFactory
This is the default graph factory used by HierarchyManager
to
create and configure new graph elements within the hierarchy.
The graph factory creates graphs of type Graph2D
and corresponding
graph elements. Whenever a new Graph is created by this factory, it
will inherit all Graph-, Graph2D- and Graph2DSelectionListeners
available in the parent graph.
This graph will also create and configure folder nodes and group nodes.
Constructor Summary | |
DefaultHierarchyGraphFactory()
Create a new instance of DefaultHierarchyGraphFactory. |
Method Summary | |
protected void |
configureGraph(Graph2D createdGraph,
Object hint)
Adds all graph-, graph2d- and graph2dselectionlisteners found in the parent graph to the newly created graph. |
Graph |
createGraph(Object hint)
Creates a new Graph2D that inherits all listeners from the parent graph |
Node |
createNode(Graph graph,
Object hint)
Creates a new node in the given graph. |
NodeRealizer |
createNodeRealizer(Object hint)
Creates a realizer for a node. |
NodeRealizer |
getDefaultFolderNodeRealizer()
Returns the default node realizer for folder nodes. |
NodeRealizer |
getDefaultGroupNodeRealizer()
Returns the default node realizer for group nodes. |
boolean |
isProxyNodeRealizerEnabled()
Returns whether or not to use a proxy node realizer that delegates to the default realizers for group or folder nodes. |
void |
setDefaultFolderNodeRealizer(NodeRealizer r)
Sets the default node realizer for folder nodes. |
void |
setDefaultGroupNodeRealizer(NodeRealizer r)
Sets the default node realizer for group nodes. |
void |
setProxyNodeRealizerEnabled(boolean proxyNodeRealizerEnabled)
Whether or not this class should assign a proxy node realizer to all group and folder nodes. |
Methods inherited from class y.view.DefaultGraph2DFactory |
createEdge |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultHierarchyGraphFactory()
Method Detail |
public Graph createGraph(Object hint)
createGraph
in interface GraphFactory
createGraph
in class DefaultGraph2DFactory
hint
- expects hint to be the parent graph
of the newly created graph.protected void configureGraph(Graph2D createdGraph, Object hint)
public Node createNode(Graph graph, Object hint)
GroupNodeRealizer
will
be assigned to such the newly created node.
createNode
in interface GraphFactory
createNode
in class DefaultGraph2DFactory
graph
- the graph containing the newly created node.hint
- the hint object will be ignored.
DefaultHierarchyGraphFactory.createNodeRealizer(Object)
public NodeRealizer createNodeRealizer(Object hint)
GroupNodeRealizer
will be returned.
DefaultHierarchyGraphFactory.createNode(Graph, Object).
public void setDefaultGroupNodeRealizer(NodeRealizer r)
public void setDefaultFolderNodeRealizer(NodeRealizer r)
public NodeRealizer getDefaultGroupNodeRealizer()
public NodeRealizer getDefaultFolderNodeRealizer()
public void setProxyNodeRealizerEnabled(boolean proxyNodeRealizerEnabled)
0
of the
realizer list. The realizer for folder nodes can be found at position 1
of this list.
The main purpose of using a proxy node realizer is to be able to use completely different realizers to represent open and closed group nodes.
By default this feature is deactivated.
ProxyShapeNodeRealizer
,
ProxyShapeNodeRealizer.getRealizer(int)
,
ProxyShapeNodeRealizer.setRealizerDelegate(NodeRealizer)
public boolean isProxyNodeRealizerEnabled()
DefaultHierarchyGraphFactory.setProxyNodeRealizerEnabled(boolean)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |