gumbo.visualize.data.layout
Class GraphLayoutVertex

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

public class GraphLayoutVertex
extends GraphLayoutNode
implements LayoutPartView

A layout view for a graph model vertex. Except for their edges, ports are ignored. Vertices must be explicitely positioned by the layout engine.

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

Nested Class Summary
 
Nested classes inherited from class gumbo.visualize.data.layout.GraphLayoutNode
GraphLayoutNode.BoundComparator, GraphLayoutNode.IndexCenterComparator, GraphLayoutNode.PositionComparator, GraphLayoutNode.PriorityComparator
 
Constructor Summary
GraphLayoutVertex(PartView view)
           
 
Method Summary
static java.util.Set connectedEdges(java.util.Collection verts, java.util.Set retVal)
          Gets the set of edges connected to a group of vertices.
 java.util.Set getConnectedEdges()
          Gets a reference to the immutable set of edges connected to this vertex.
 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.
 void initLayoutPart(java.util.Map vertMap, java.util.Map edgeMap)
          Completes the initialization of this layout part.
 java.lang.String toString()
           
 void validateLayoutDisplay(LayoutGraphicTransform xform)
          Called by layout engines to prepare and realize the display state of the graphic view associated with this layout view and any of its dependent layout views, possibly recusively.
 
Methods inherited from class gumbo.visualize.data.layout.GraphLayoutNode
addLink, backwardNodes, centerNodes, compactNodes, connectedNodes, expandBalancedNodes, expandNodes, forwardNodes, getAfterNodes, getAfterPriority, getBackwardNodes, getBeforeNodes, getBeforePriority, getConnectedNodes, getForwardNodes, getIndexCenter, getLayoutBound, getPosition, getSize, gridAlignNodes, indexCenterList, indexCenters, intersectLayout, isSingular, isSink, isSource, offsetNodes, otherNodes, positionCenter, positionCenters, priorityList, removeLink, scaleNodes, setAfterNodes, setAfterPriority, setBeforeNodes, setBeforePriority, setIndexCenter, setPosition, setSize, singularNodes, sinkNodes, sourceNodes, traceNodes, traceNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gumbo.visualize.data.layout.LayoutPart
getLayoutBound, intersectLayout
 

Constructor Detail

GraphLayoutVertex

public GraphLayoutVertex(PartView view)
Method Detail

initLayoutPart

public void initLayoutPart(java.util.Map vertMap,
                           java.util.Map edgeMap)
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.
edgeMap - Maps edge models (EdgeModel) to layout part (GraphLayoutEdge). Never null.

getConnectedEdges

public java.util.Set getConnectedEdges()
Gets a reference to the immutable set of edges connected to this vertex.


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)
Description copied from interface: LayoutView
Called by layout engines to prepare and realize the display state of the graphic view associated with this layout view and any of its dependent layout views, possibly recusively. Includes transforming the layout state from layout to graphic space, transferring the layout graphic state to the graphic, and realizing the graphic's display state. For whole layout views, calls validateLayoutDisplay() on each of its layout view parts.

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 GraphLayoutNode

connectedEdges

public static java.util.Set connectedEdges(java.util.Collection verts,
                                           java.util.Set retVal)
Gets the set of edges connected to a group of vertices.

Parameters:
verts - AbstractGroup of vertices (GraphLayoutVertex). Never null.
retVal - Return value object. Filtered edges (GraphLayoutVertex). Never null.
Returns:
Reference to retVal. Never null.