| 
 | Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.io.graphml.layout.GroupingBasedGraphElementFactory
public class GroupingBasedGraphElementFactory
Element factory that creates nesting information for
 GroupingKeys. I.e. this factory's
 createNode method
 will set node ID, parent node ID, and group state of newly created nodes
 if the corresponding GroupingKeys reference
 DataAcceptor implementations.
| Constructor Summary | |
|---|---|
| GroupingBasedGraphElementFactory(GraphElementFactory coreFactory)Initializes a new GroupingBasedGraphElementFactoryinstance. | |
| Method Summary | |
|---|---|
|  Edge | createEdge(GraphMLParseContext context,
           Node sourceNode,
           Port sourcePort,
           Node targetNode,
           Port targetPort)Creates a new edge for the given context. | 
| protected  java.lang.Object | createId(Node node)Creates a unique ID for the given node that can be used as data for GroupingKeys.NODE_ID_DPKEYandGroupingKeys.PARENT_NODE_ID_DPKEY. | 
|  Node | createNode(GraphMLParseContext context)Creates a new node for the given context. | 
|  Port | createPort(GraphMLParseContext context,
           Node owner)Creates a new port for the given context. | 
|  GraphElementFactory | getCoreFactory()Returns the decorated graph element factory that handles the actual element creation. | 
| protected  Node | getParent(GraphMLParseContext context)Retrieves the parent node for new nodes. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GroupingBasedGraphElementFactory(GraphElementFactory coreFactory)
GroupingBasedGraphElementFactory instance.
coreFactory - the factory used for actually creating graph elements.| Method Detail | 
|---|
public GraphElementFactory getCoreFactory()
GroupingBasedGraphElementFactory(y.io.graphml.input.GraphElementFactory)public Node createNode(GraphMLParseContext context)
GroupingKeys reference
 DataAcceptor implementations.
createNode in interface GraphElementFactorycontext - 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)
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.
public Port createPort(GraphMLParseContext context,
                       Node owner)
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
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 java.lang.Object createId(Node node)
GroupingKeys.NODE_ID_DPKEY
 and GroupingKeys.PARENT_NODE_ID_DPKEY.
 The default implementation returns the node itself.
node - the node for which a unique ID has to be created.
| 
 | © Copyright 2000-2025, yWorks GmbH. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||