infovis.visualization.linkShapers
Class DefaultLinkShaper

java.lang.Object
  extended by infovis.visualization.linkShapers.DefaultLinkShaper
All Implemented Interfaces:
LinkShaper
Direct Known Subclasses:
CurvedLinkShaper, DendrogramLinkShaper

public class DefaultLinkShaper
extends Object
implements LinkShaper

Class DefaultLinkShaper

Version:
$Revision: 1.7 $
Author:
Jean-Daniel Fekete
InfoVis factory arguments:
LinkShaperFactory "Straight Line"

Constructor Summary
DefaultLinkShaper()
           
DefaultLinkShaper(Visualization visualization, ShapeColumn nodeShapes)
           
 
Method Summary
 Shape computeLinkShape(int link, NodeAccessor accessor, Shape s)
           
 Shape createLink(Point2D startPos, int startOrientation, Point2D endPos, int endOrientation, Shape prevShape)
           
 Shape createSelfLink(Shape nodeShape)
           
static Point2D defaultLinkEnd(Shape s, int orientation, Point2D ptRet)
          Compute the ending point of link.
static Point2D defaultLinkStart(Shape s, int orientation, Point2D ptRet)
          Computes the starting point of link.
 String getName()
           
 void init(Visualization visualization, ShapeColumn nodeShapes)
           
 Point2D linkEnd(Shape s, int orientation, Point2D ptRet)
           
 Point2D linkStart(Shape s, int orientation, Point2D ptRet)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLinkShaper

public DefaultLinkShaper(Visualization visualization,
                         ShapeColumn nodeShapes)

DefaultLinkShaper

public DefaultLinkShaper()
Method Detail

init

public void init(Visualization visualization,
                 ShapeColumn nodeShapes)
Specified by:
init in interface LinkShaper

getName

public String getName()
Specified by:
getName in interface LinkShaper

computeLinkShape

public Shape computeLinkShape(int link,
                              NodeAccessor accessor,
                              Shape s)
Specified by:
computeLinkShape in interface LinkShaper

createSelfLink

public Shape createSelfLink(Shape nodeShape)

createLink

public Shape createLink(Point2D startPos,
                        int startOrientation,
                        Point2D endPos,
                        int endOrientation,
                        Shape prevShape)

linkStart

public Point2D linkStart(Shape s,
                         int orientation,
                         Point2D ptRet)

linkEnd

public Point2D linkEnd(Shape s,
                       int orientation,
                       Point2D ptRet)

defaultLinkStart

public static Point2D defaultLinkStart(Shape s,
                                       int orientation,
                                       Point2D ptRet)
Computes the starting point of link.

Parameters:
s - the Node shape
orientation - the overall orientation
ptRet - the returned reference point
Returns:
the starting point of a link

defaultLinkEnd

public static Point2D defaultLinkEnd(Shape s,
                                     int orientation,
                                     Point2D ptRet)
Compute the ending point of link.

Parameters:
s - the Node Shape
orientation - the visualization orientation
ptRet - the returned point
Returns:
the ending point of a link


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