ptolemy.vergil.basic
Class BasicGraphFrame.PtolemyLayout
java.lang.Object
diva.graph.layout.AbstractGlobalLayout
diva.graph.layout.LevelLayout
ptolemy.vergil.basic.BasicGraphFrame.PtolemyLayout
- All Implemented Interfaces:
- GlobalLayout
- Enclosing class:
- BasicGraphFrame
private static class BasicGraphFrame.PtolemyLayout
- extends LevelLayout
A layout algorithm for laying out ptolemy graphs. Since our edges
are undirected, this layout algorithm turns them into directed edges
aimed consistently. i.e. An edge should always be "out" of an
internal output port and always be "in" of an internal input port.
Conversely, an edge is "out" of an external input port, and "in" of
an external output port. The copying operation also flattens
the graph, because the level layout algorithm doesn't understand
how to layout hierarchical nodes.
Method Summary |
private java.lang.Object |
_getParentInGraph(GraphModel model,
java.lang.Object graph,
java.lang.Object node)
|
protected java.lang.Object |
copyComposite(java.lang.Object origComposite)
Copy the given graph and make the nodes/edges in the copied
graph point to the nodes/edges in the original. |
Methods inherited from class diva.graph.layout.LevelLayout |
applyLayout, applyLayout, calculateLayout, copyLayout, getLocalGraphModel, getOrientation, getRandomizedPlacement, isVisited, layout, setAllVisited, setOrientation, setRandomizedPlacement, setVisited |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicGraphFrame.PtolemyLayout
public BasicGraphFrame.PtolemyLayout(LayoutTarget target)
- Construct a new levelizing layout with a vertical orientation.
copyComposite
protected java.lang.Object copyComposite(java.lang.Object origComposite)
- Copy the given graph and make the nodes/edges in the copied
graph point to the nodes/edges in the original.
- Overrides:
copyComposite
in class LevelLayout
_getParentInGraph
private java.lang.Object _getParentInGraph(GraphModel model,
java.lang.Object graph,
java.lang.Object node)