y.layout.hierarchic
Class PortAssignment
java.lang.Object
y.layout.hierarchic.PortAssignment
public class PortAssignment
- extends Object
This class assigns port coordinates to the edges of a graph.
-
-
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PortAssignment
public PortAssignment()
assignPorts
public static void assignPorts(LayoutGraph g,
NodeList[] layers,
DataProvider dummyMark)
- Assigns port coordinates to the edges. It is assumed that all incoming edges
of a node connect at the top side of that node and that all outgoing edges
of a node leave at the bottom side of that node.
Port assignment will be such that the ports will be spread evenly
at top and bottom sides of the nodes. Ports will be assigned such that
no unnecessary edge crossings will be introduced.
- Parameters:
g - graph whose edges need port assignmentlayers - the layering of gdummyMark - provides boolean data about whether a node
is a dummy node or not.
assignPorts
public static void assignPorts(LayoutGraph g,
DataProvider dummyMark,
Comparator inComp,
Comparator outComp)
- Assigns port coordinates to the edges. It is assumed that all incoming edges
of a node connect at the top side of that node and that all outgoing edges
of a node leave at the bottom side of that node.
Port assignment will be such that the ports will be spread evenly
at top and bottom sides of the nodes. Ports will be assigned according to
the given Comparators.
- Parameters:
g - graph whose edges need port assignmentdummyMark - provides boolean data about whether a node
is a dummy node or not.inComp - A Comparator that defines an ordering for edges. This comparator is used for ordering the edges entering a node.outComp - A Comparator that defines an ordering for edges. This comparator is used for ordering the edges leaving a node