infovis.graph.visualization.layout
Class AbstractGraphLayout

java.lang.Object
  extended by infovis.graph.GraphProxy
      extended by infovis.graph.visualization.layout.AbstractGraphLayout
All Implemented Interfaces:
Graph, NodeLinkGraphLayout, Metadata, Constants, Layout
Direct Known Subclasses:
CircularLayout, GraphVizLayout, RandomGraphLayout

public abstract class AbstractGraphLayout
extends GraphProxy
implements NodeLinkGraphLayout

Abstract implementation of NodeLinkGraphLayout

Version:
$Revision: 1.16 $
Author:
Jean-Daniel Fekete

Field Summary
static String COLUMN_FIXED
           
 
Fields inherited from interface infovis.Graph
GRAPH_TYPE, GRAPH_TYPE_DIRECTED, GRAPH_TYPE_UNDIRECTED, NIL
 
Fields inherited from interface infovis.metadata.Constants
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE
 
Method Summary
 void computeShapes(Rectangle2D bounds, NodeLinkGraphVisualization vis)
           
 void computeShapes(Rectangle2D bounds, Visualization vis)
          Computes the layout.
 Rectangle2D.Float createRect()
           
 Rectangle2D getBounds()
           
 ShapeColumn getLinkShapes()
           
 short getOrientation()
           
 Component getParent()
           
 Dimension getPreferredSize(Visualization vis)
          Computes and return the preferred size for this layout and this visualization.
 Rectangle2D.Float getRectAt(int row)
           
 ShapeColumn getShapes()
           
 NodeLinkGraphVisualization getVisualization()
           
 void incrementLayout(Rectangle2D bounds, NodeLinkGraphVisualization vis)
           
 Rectangle2D.Float initRect(Rectangle2D.Float rect)
           
 void invalidate(Visualization vis)
          Invalidate the cached state of the layout.
 boolean isFinished()
           
 void setRectSizeAt(int row, Rectangle2D.Float rect)
           
 void setShapeAt(int row, Shape s)
           
 
Methods inherited from class infovis.graph.GraphProxy
addEdge, addGraphChangedListener, addVertex, clear, edgeIterator, edgeIterator, findEdge, getClientProperty, getDegree, getEdge, getEdgesCount, getEdgeTable, getFirstVertex, getGraph, getInDegree, getInEdgeAt, getMetadata, getName, getOtherVertex, getOutDegree, getOutEdgeAt, getSecondVertex, getVertexTable, getVerticesCount, inEdgeIterator, isDirected, outEdgeIterator, removeEdge, removeGraphChangedListener, removeVertex, setDirected, setGraph, setName, vertexIterator
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface infovis.visualization.Layout
getName
 

Field Detail

COLUMN_FIXED

public static final String COLUMN_FIXED
See Also:
Constant Field Values
Method Detail

getVisualization

public NodeLinkGraphVisualization getVisualization()

getRectAt

public Rectangle2D.Float getRectAt(int row)

createRect

public Rectangle2D.Float createRect()

initRect

public Rectangle2D.Float initRect(Rectangle2D.Float rect)

getShapes

public ShapeColumn getShapes()

setRectSizeAt

public void setRectSizeAt(int row,
                          Rectangle2D.Float rect)

setShapeAt

public void setShapeAt(int row,
                       Shape s)

getBounds

public Rectangle2D getBounds()

getOrientation

public short getOrientation()

getParent

public Component getParent()

getLinkShapes

public ShapeColumn getLinkShapes()

computeShapes

public void computeShapes(Rectangle2D bounds,
                          Visualization vis)
Description copied from interface: Layout
Computes the layout.

Specified by:
computeShapes in interface Layout
Parameters:
bounds - the allocated bounds of the visualization.
vis - the visualization.

computeShapes

public void computeShapes(Rectangle2D bounds,
                          NodeLinkGraphVisualization vis)

incrementLayout

public void incrementLayout(Rectangle2D bounds,
                            NodeLinkGraphVisualization vis)
Specified by:
incrementLayout in interface NodeLinkGraphLayout

isFinished

public boolean isFinished()
Specified by:
isFinished in interface NodeLinkGraphLayout

getPreferredSize

public Dimension getPreferredSize(Visualization vis)
Description copied from interface: Layout
Computes and return the preferred size for this layout and this visualization.

Specified by:
getPreferredSize in interface Layout
Parameters:
vis - the visualization
Returns:
the preferred size for this layout and this visualization.

invalidate

public void invalidate(Visualization vis)
Description copied from interface: Layout
Invalidate the cached state of the layout.

Call this method from the visualization when it gets invalidated.

Specified by:
invalidate in interface Layout
Parameters:
vis - the visualization.


Copyright © 2005 by Jean-Daniel Fekete and INRIA, France All rights reserved.