de.cau.cs.kieler.klodd.hierarchical.structures
Class ElementLoop

java.lang.Object
  extended by de.cau.cs.kieler.klodd.hierarchical.structures.ElementLoop

public class ElementLoop
extends Object

Loop over a single layer element in a layered graph.

Rating proposed yellow
(2009-12-11) msp

Constructor Summary
ElementLoop(KEdge theedge, LayerElement elem, KPort thesourcePort, KPort thetargetPort)
          Creates an element loop with given source and target port.
 
Method Summary
 void applyLayout(KPoint offset)
          Applies the layout of this element loop to the contained edge.
 List<KPoint> getBendPoints()
          Returns the bendPoints.
 int getRoutePos(PortSide side)
          Gets the route position for a specific side.
 KPort getSourcePort()
          Gets the source port of this element loop.
 KPort getTargetPort()
          Gets the target port of this element loop.
 void setRoutePos(int routePos, PortSide side)
          Sets the route position for a specific side.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ElementLoop

public ElementLoop(KEdge theedge,
                   LayerElement elem,
                   KPort thesourcePort,
                   KPort thetargetPort)
Creates an element loop with given source and target port.

Parameters:
theedge - the edge that is to be contained in this element loop
elem - the layer element of this loop
thesourcePort - the source port
thetargetPort - the target port
Method Detail

toString

public String toString()

Overrides:
toString in class Object

getSourcePort

public KPort getSourcePort()
Gets the source port of this element loop.

Returns:
the source port

getTargetPort

public KPort getTargetPort()
Gets the target port of this element loop.

Returns:
the target port

applyLayout

public void applyLayout(KPoint offset)
Applies the layout of this element loop to the contained edge.

Parameters:
offset - offset to be added to each bend point

getBendPoints

public List<KPoint> getBendPoints()
Returns the bendPoints.

Returns:
the bendPoints

setRoutePos

public void setRoutePos(int routePos,
                        PortSide side)
Sets the route position for a specific side.

Parameters:
routePos - the route position to set
side - the side for the route position

getRoutePos

public int getRoutePos(PortSide side)
Gets the route position for a specific side.

Parameters:
side - the side for the route position
Returns:
the route position for the given side