|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.io.graphml.graph2d.HierarchyManagerBasedGraphElementFactory
public class HierarchyManagerBasedGraphElementFactory
Implementation of the GraphElementFactory
interface that can create HierarchyManager
based hierarchy information.
If a HierarchyManager
instance is registered on the graph
that is populated, it is used to create the hierarchy information. The actual creation
of normal nodes is delegated to a customizable implementation.
Constructor Summary | |
---|---|
HierarchyManagerBasedGraphElementFactory()
Create a new instance with a getCoreFactory() set to a Graph2DElementFactory |
|
HierarchyManagerBasedGraphElementFactory(GraphElementFactory coreFactory)
Create a new instance with a custom getCoreFactory() . |
Method Summary | |
---|---|
Edge |
createEdge(GraphMLParseContext context,
Node sourceNode,
Port sourcePort,
Node targetNode,
Port targetPort)
Creates an edge for the given context and the provided source and target nodes or ports. |
Node |
createNode(GraphMLParseContext context)
Creates a node for the given context. |
Port |
createPort(GraphMLParseContext context,
Node owner)
Creates a port object that is owned by owner |
GraphElementFactory |
getCoreFactory()
Returns the core factory for creation of normal nodes and edges. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HierarchyManagerBasedGraphElementFactory()
getCoreFactory()
set to a Graph2DElementFactory
public HierarchyManagerBasedGraphElementFactory(GraphElementFactory coreFactory)
getCoreFactory()
.
It is the users responsibility to set up the HierarchyManager
to work
correctly with non Graph2D
instances.
Method Detail |
---|
public GraphElementFactory getCoreFactory()
public Node createNode(GraphMLParseContext context)
GraphElementFactory
createNode
in interface GraphElementFactory
context
- The context from which the graph, the CreationProperties
, and the GraphMLParseContext.getObjectStack()
can be queried.
public Edge createEdge(GraphMLParseContext context, Node sourceNode, Port sourcePort, Node targetNode, Port targetPort)
GraphElementFactory
createEdge
in interface GraphElementFactory
context
- The context from which the graph, the CreationProperties
, and the GraphMLParseContext.getObjectStack()
can be queried.sourceNode
- The source node for the edge.sourcePort
- The source port for the edge, if specified, otherwise null
.targetNode
- The target node for the edge.targetPort
- The target port for the edge, if specified, otherwise null
.
public Port createPort(GraphMLParseContext context, Node owner)
GraphElementFactory
owner
createPort
in interface GraphElementFactory
owner
- The owner of the port object
|
© Copyright 2000-2013, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |