| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.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 aGraph2DElementFactory | |
| 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 | 
| protected  void | edgeCreated(Graph graph,
            Edge edge,
            CreationProperties properties)Notifies interested parties that an edge was created. | 
| protected  void | folderCreated(Graph graph,
              Node node,
              CreationProperties properties)Notifies interested parties that a folder node was created. | 
|  GraphElementFactory | getCoreFactory()Returns the core factory for creation of normal nodes and edges. | 
| protected  Node | getParent(GraphMLParseContext context)Retrieves the parent node for new nodes. | 
| protected  void | groupCreated(Graph graph,
             Node node,
             CreationProperties properties)Notifies interested parties that a group node was created. | 
| protected  void | nodeCreated(Graph graph,
            Node node,
            CreationProperties properties)Notifies interested parties that a normal node was created. | 
| 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 GraphElementFactorycontext - The context from which the graph, the CreationProperties, and the GraphMLParseContext.getObjectStack()
 can be queried.
protected Node getParent(GraphMLParseContext context)
createNode(y.io.graphml.input.GraphMLParseContext).
context - The context from which the graph, the
 CreationProperties, and the
 GraphMLParseContext.getObjectStack() can be queried.
null if new nodes
 should be top-level nodes.
protected void nodeCreated(Graph graph,
                           Node node,
                           CreationProperties properties)
The default implementation does nothing.
 Called from createNode(y.io.graphml.input.GraphMLParseContext).
 
HierarchyManager.isNormalNode(y.base.Node)
protected void folderCreated(Graph graph,
                             Node node,
                             CreationProperties properties)
The default implementation sets the folder node's associated node realizer.
 Called from createNode(y.io.graphml.input.GraphMLParseContext).
 
HierarchyManager.isFolderNode(y.base.Node)
protected void groupCreated(Graph graph,
                            Node node,
                            CreationProperties properties)
The default implementation sets the group node's associated node realizer.
 Called from createNode(y.io.graphml.input.GraphMLParseContext).
 
HierarchyManager.isGroupNode(y.base.Node)
public Edge createEdge(GraphMLParseContext context,
                       Node sourceNode,
                       Port sourcePort,
                       Node targetNode,
                       Port targetPort)
GraphElementFactory
createEdge in interface GraphElementFactorycontext - 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.
protected void edgeCreated(Graph graph,
                           Edge edge,
                           CreationProperties properties)
The default implementation sets the edge's associated edge realizer.
 Called from createNode(y.io.graphml.input.GraphMLParseContext).
 
public Port createPort(GraphMLParseContext context,
                       Node owner)
GraphElementFactoryowner
createPort in interface GraphElementFactorycontext - The context from which the graph, the CreationProperties, and the GraphMLParseContext.getObjectStack()
 can be queried.owner - The owner of the port object
| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||