de.cau.cs.kieler.klay.layered.graph
Class LEdge

java.lang.Object
  extended by de.cau.cs.kieler.core.properties.MapPropertyHolder
      extended by de.cau.cs.kieler.klay.layered.graph.LGraphElement
          extended by de.cau.cs.kieler.klay.layered.graph.LEdge
All Implemented Interfaces:
IPropertyHolder, Comparable<LGraphElement>

public class LEdge
extends LGraphElement

An edge in a layered graph. Edges may only be connected to ports of a node, which represent the point where the edge touches the node.

Rating red

Field Summary
 
Fields inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement
id
 
Constructor Summary
LEdge()
           
 
Method Summary
 KVectorChain getBendPoints()
          Returns the list of bend points, which is initially empty.
 List<LLabel> getLabels()
           
 LPort getSource()
          Returns the source port.
 LPort getTarget()
          Returns the target port.
 void reverse()
          Reverses the edge, its bendpoints and properly negates the REVERSED property.
 void setSource(LPort source)
          Sets the source port of this edge and adds itself to the port's list of edges.
 void setTarget(LPort target)
          Sets the target port of this edge and adds itself to the port's list of edges.
 String toString()
          
 
Methods inherited from class de.cau.cs.kieler.klay.layered.graph.LGraphElement
compareTo
 
Methods inherited from class de.cau.cs.kieler.core.properties.MapPropertyHolder
checkProperties, copyProperties, getAllProperties, getProperty, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LEdge

public LEdge()
Method Detail

toString

public String toString()

Overrides:
toString in class Object

reverse

public void reverse()
Reverses the edge, its bendpoints and properly negates the REVERSED property. (an edge that was marked as being reversed is then unmarked, and the other way around) This does not change any properties on the connected ports.


getSource

public LPort getSource()
Returns the source port.

Returns:
the source port

setSource

public void setSource(LPort source)
Sets the source port of this edge and adds itself to the port's list of edges. If the edge previously had another source, it is removed from the original port's list of edges. Be careful not to use this method while iterating through the edges list of the old port nor of the new port, since that could lead to ConcurrentModificationExceptions.

Parameters:
source - the source port to set

getTarget

public LPort getTarget()
Returns the target port.

Returns:
the target port

setTarget

public void setTarget(LPort target)
Sets the target port of this edge and adds itself to the port's list of edges. If the edge previously had another target, it is removed from the original port's list of edges. Be careful not to use this method while iterating through the edges list of the old port nor of the new port, since that could lead to ConcurrentModificationExceptions.

Parameters:
target - the target port to set

getBendPoints

public KVectorChain getBendPoints()
Returns the list of bend points, which is initially empty.

Returns:
the bend points

getLabels

public List<LLabel> getLabels()
Returns:
all labels