gumbo.visualize.data.layout
Class KinkyGraphLayoutEdge

java.lang.Object
  |
  +--gumbo.visualize.data.layout.GraphLayoutPart
        |
        +--gumbo.visualize.data.layout.GraphLayoutEdge
              |
              +--gumbo.visualize.data.layout.KinkyGraphLayoutEdge
All Implemented Interfaces:
LayoutPart, LayoutPartView, LayoutView

public class KinkyGraphLayoutEdge
extends GraphLayoutEdge

A graph layout edge that can have kinks.

Version:
$Revision: 1.8 $
Author:
Jon Barrilleaux (jonb@jmbaai.com) of JMB and Associates Inc.

Constructor Summary
KinkyGraphLayoutEdge(PartView view)
           
 
Method Summary
 void addKinkNode(GraphLayoutNode node)
          Adds a new kink, associated with the specified node, to this edge.
 AxisBound3 getGraphicBound(AxisBound3 retVal)
           
 java.util.List getKinkNodes()
          Gets an immutable view of the muttable kink nodes in this edge, ordered from edge head to tail.
 AxisBound3 getLayoutBound(AxisBound3 retVal)
          Returns the smallest bounds containing this part, in layout space.
 boolean intersectLayout(LayoutPart part)
          Returns true if the target part intersects this part in layout space.
 void removeKinkNode(GraphLayoutNode node)
          Removes an old kink, associated with the specified node, from this edge.
 void validateLayoutDisplay(LayoutGraphicTransform xform)
          Assumes vertices have already been validated in graphic space, and kink nodes have been validated in layout space.
 
Methods inherited from class gumbo.visualize.data.layout.GraphLayoutEdge
getDataView, getGraphicBound, getHeadVertex, getTailVertex, initLayoutPart, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KinkyGraphLayoutEdge

public KinkyGraphLayoutEdge(PartView view)
Method Detail

addKinkNode

public void addKinkNode(GraphLayoutNode node)
Adds a new kink, associated with the specified node, to this edge. The kink will be added to the tail end of the edge and kink list. End vertex and kink node links are automatically updated.

Parameters:
node - Node associated with the new kink. Null and duplicate nodes are silently ignored.

removeKinkNode

public void removeKinkNode(GraphLayoutNode node)
Removes an old kink, associated with the specified node, from this edge. End vertex and kink node links are automatically updated.

Parameters:
node - Node associated with an old kink. Null and missing nodes are silently ignored.

getKinkNodes

public java.util.List getKinkNodes()
Gets an immutable view of the muttable kink nodes in this edge, ordered from edge head to tail.

Returns:
Kink nodes (GraphLayoutNode). Never null.

intersectLayout

public boolean intersectLayout(LayoutPart part)
Description copied from interface: LayoutPart
Returns true if the target part intersects this part in layout space.

Specified by:
intersectLayout in interface LayoutPart
Overrides:
intersectLayout in class GraphLayoutEdge
Parameters:
part - The target part. Never null.
Returns:
True if the target part intersects this part.

getLayoutBound

public AxisBound3 getLayoutBound(AxisBound3 retVal)
Description copied from interface: LayoutPart
Returns the smallest bounds containing this part, in layout space.

Specified by:
getLayoutBound in interface LayoutPart
Overrides:
getLayoutBound in class GraphLayoutEdge
Parameters:
retVal - Return value object. Never null.
Returns:
Reference to retVal. Never null.

validateLayoutDisplay

public void validateLayoutDisplay(LayoutGraphicTransform xform)
Assumes vertices have already been validated in graphic space, and kink nodes have been validated in layout space. Builds new graphic kinks from layout kinks; sets the edge shape head and tail positions to link the head and tail kinks to the head and tail vertices.

Specified by:
validateLayoutDisplay in interface LayoutView
Overrides:
validateLayoutDisplay in class GraphLayoutEdge
Parameters:
xform - Transform between layout and graphic space. Never null.

getGraphicBound

public AxisBound3 getGraphicBound(AxisBound3 retVal)