Search this API

y.view
Class DefaultGraph2DFactory

java.lang.Object
  extended by y.view.DefaultGraph2DFactory
All Implemented Interfaces:
GraphFactory
Direct Known Subclasses:
DefaultHierarchyGraphFactory

public class DefaultGraph2DFactory
extends java.lang.Object
implements GraphFactory

This is the default implementation of a graph factory that produces graphs of type Graph2D and default graph objects corresponding to that graph type.

 

Constructor Summary
DefaultGraph2DFactory()
           
 
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)
          Creates a new instance of Graph2D.
 Node createNode(Graph graph, java.lang.Object hint)
          Returns a newly created node object for the given graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultGraph2DFactory

public DefaultGraph2DFactory()
Method Detail

createGraph

public Graph createGraph(java.lang.Object hint)
Creates a new instance of Graph2D.

Specified by:
createGraph in interface GraphFactory
Parameters:
hint - the hint object will be ignored.
Returns:
The newly created Graph object.

createNode

public Node createNode(Graph graph,
                       java.lang.Object hint)
Returns a newly created node object for the given graph.

Specified by:
createNode in interface GraphFactory
Parameters:
graph - the graph containing the newly created node.
hint - the hint object will be ignored.
Returns:
a newly created node

createEdge

public Edge createEdge(Graph graph,
                       Node source,
                       Node target,
                       java.lang.Object hint)
Returns a newly created edge object for the given graph.

Specified by:
createEdge in interface GraphFactory
Parameters:
graph - the graph containing the newly created edge.
source - the source node of the newly created edge.
target - the target node of the newly created edge.
hint - the hint object will be ignored.
Returns:
a newly created edge

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