de.cau.cs.kieler.klay.layered.p5edges
Class OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy

java.lang.Object
  extended by de.cau.cs.kieler.klay.layered.p5edges.OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy
All Implemented Interfaces:
OrthogonalRoutingGenerator.IRoutingDirectionStrategy
Enclosing class:
OrthogonalRoutingGenerator

public static class OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy
extends Object
implements OrthogonalRoutingGenerator.IRoutingDirectionStrategy

Routing strategy for routing layers from south to north.

Rating red

Constructor Summary
OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy()
           
 
Method Summary
 void calculateBendPoints(de.cau.cs.kieler.klay.layered.p5edges.OrthogonalRoutingGenerator.HyperNode hyperNode, double startPos, double edgeSpacing)
          Calculates and assigns bend points for edges incident to the ports belonging to the given hyper edge.
 double getPortPositionOnHyperNode(LPort port)
          Returns the port's position on a hyper edge axis.
 PortSide getSourcePortSide()
          Returns the side of ports that should be considered on a source layer.
 PortSide getTargetPortSide()
          Returns the side of ports that should be considered on a target layer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy

public OrthogonalRoutingGenerator.SouthToNorthRoutingStrategy()
Method Detail

getPortPositionOnHyperNode

public double getPortPositionOnHyperNode(LPort port)
Returns the port's position on a hyper edge axis. In the west-to-east routing case, this would be the port's exact y coordinate.

Specified by:
getPortPositionOnHyperNode in interface OrthogonalRoutingGenerator.IRoutingDirectionStrategy
Parameters:
port - the port.
Returns:
the port's coordinate on the hyper edge axis.

getSourcePortSide

public PortSide getSourcePortSide()
Returns the side of ports that should be considered on a source layer. For a west-to-east routing, this would probably be the eastern ports of each western layer.

Specified by:
getSourcePortSide in interface OrthogonalRoutingGenerator.IRoutingDirectionStrategy
Returns:
the side of ports to be considered in the source layer.

getTargetPortSide

public PortSide getTargetPortSide()
Returns the side of ports that should be considered on a target layer. For a west-to-east routing, this would probably be the western ports of each eastern layer.

Specified by:
getTargetPortSide in interface OrthogonalRoutingGenerator.IRoutingDirectionStrategy
Returns:
the side of ports to be considered in the target layer.

calculateBendPoints

public void calculateBendPoints(de.cau.cs.kieler.klay.layered.p5edges.OrthogonalRoutingGenerator.HyperNode hyperNode,
                                double startPos,
                                double edgeSpacing)
Calculates and assigns bend points for edges incident to the ports belonging to the given hyper edge.

Specified by:
calculateBendPoints in interface OrthogonalRoutingGenerator.IRoutingDirectionStrategy
Parameters:
hyperNode - the hyper edge.
startPos - the position of the trunk of the first hyper edge between the layers. This position, together with the current hyper node's rank allows the calculation of the hyper node's trunk's position.
edgeSpacing - the space between two edges.