Search this API

y.base
Interface GraphFactory

All Known Implementing Classes:
DefaultGraph2DFactory, DefaultHierarchyGraphFactory, Graph2DCopyFactory

public interface GraphFactory

Implementations of this interface provide a factory for graphs and elements within that graph. The created graph and its elements must be compatible.

 

Method Summary
 Edge createEdge(Graph graph, Node source, Node target, java.lang.Object hint)
          Returns a newly created Edge object for the given graph.
 Graph createGraph(java.lang.Object hint)
          Returns a newly created Graph object.
 Node createNode(Graph graph, java.lang.Object hint)
          Returns a newly created Node object for the given graph.
 

Method Detail

createGraph

Graph createGraph(java.lang.Object hint)
Returns a newly created Graph object. The given hint parameter may contain some context-specific information that may guide the factory when actually creating the graph.

Parameters:
hint - Context-specific hint information.
Returns:
The newly created Graph object.

createNode

Node createNode(Graph graph,
                java.lang.Object hint)
Returns a newly created Node object for the given graph. The given hint parameter may contain some context-specific information that may guide the factory when actually creating the node.

Parameters:
graph - The graph that should contain the newly created node.
hint - Context-specific hint information.
Returns:
The newly created Node object.

createEdge

Edge createEdge(Graph graph,
                Node source,
                Node target,
                java.lang.Object hint)
Returns a newly created Edge object for the given graph. The given hint parameter may contain some context-specific information that may guide the factory when actually creating the edge.

Parameters:
graph - The graph that should contain the newly created edge.
source - The source node of the newly created edge.
target - The target node of the newly created edge.
hint - Context-specific hint information.
Returns:
The newly created Edge object.

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.