gumbo.visualize.data.layout
Class GraphLayoutEdge

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

public class GraphLayoutEdge
extends GraphLayoutPart
implements LayoutPartView

A layout view for a graph model edge with two connections. Automatically connects its ends to their vertices when the display is validated.

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

Constructor Summary
GraphLayoutEdge(PartView view)
           
 
Method Summary
 DataView getDataView()
          Gets the data view associated with this layout view.
 AxisBound3 getGraphicBound()
          Returns an immutable view of the smallest bounds containing this layout part, in graphic space.
 GraphLayoutVertex getHeadVertex()
           
 AxisBound3 getLayoutBound(AxisBound3 retVal)
          Returns the smallest bounds containing this part, in layout space.
 GraphLayoutVertex getTailVertex()
           
 void initLayoutPart(java.util.Map vertMap)
          Completes the initialization of this layout part.
 boolean intersectLayout(LayoutPart part)
          Returns true if the target part intersects this part in layout space.
 java.lang.String toString()
           
 void validateLayoutDisplay(LayoutGraphicTransform xform)
          Assumes vertices have already been validated in graphic space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphLayoutEdge

public GraphLayoutEdge(PartView view)
Method Detail

initLayoutPart

public void initLayoutPart(java.util.Map vertMap)
Completes the initialization of this layout part. Must be called after all layout parts for the graph have been constructed, but before using this part to perform layout.

Parameters:
vertMap - Maps vertex models (VertexModel) to layout part (GraphLayoutVertex). Never null.

getHeadVertex

public GraphLayoutVertex getHeadVertex()

getTailVertex

public GraphLayoutVertex getTailVertex()

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
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
Parameters:
retVal - Return value object. Never null.
Returns:
Reference to retVal. Never null.

getDataView

public final DataView getDataView()
Description copied from interface: LayoutView
Gets the data view associated with this layout view.

Specified by:
getDataView in interface LayoutView
Returns:
Reference to the data view. The data view graphic must be a GraphicPresence. Never null.

validateLayoutDisplay

public void validateLayoutDisplay(LayoutGraphicTransform xform)
Assumes vertices have already been validated in graphic space. Sets the edge shape head and tail positions to link the head and tail vertices.

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

getGraphicBound

public AxisBound3 getGraphicBound()
Description copied from interface: LayoutPartView
Returns an immutable view of the smallest bounds containing this layout part, in graphic space.

Specified by:
getGraphicBound in interface LayoutPartView
Returns:
The bound. Never null.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object