Search this API

y.layout.hierarchic
Class PortAssignment

java.lang.Object
  extended by y.layout.hierarchic.PortAssignment

public class PortAssignment
extends Object

This class assigns port coordinates to the edges of a graph.


Constructor Summary
PortAssignment()
           
 
Method Summary
static void assignPorts(LayoutGraph g, DataProvider dummyMark, Comparator inComp, Comparator outComp)
          Assigns port coordinates to the edges.
static void assignPorts(LayoutGraph g, NodeList[] layers, DataProvider dummyMark)
          Assigns port coordinates to the edges.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PortAssignment

public PortAssignment()
Method Detail

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 assignment
layers - the layering of g
dummyMark - 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 assignment
dummyMark - 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

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