samples.preview_new_graphdraw
Class AbstractLayout

java.lang.Object
  extended by samples.preview_new_graphdraw.AbstractLayout
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
StaticLayout

public abstract class AbstractLayout
extends Object
implements Cloneable

This class is essentially a decorator: for each vertex or edge, it must return a VisVertex or VisEdge object. Note that it also must know about the Dimensions of the current space (although whether it does anything about them is another question entirely). This abstract class is the superclass for just one subclass:

Author:
Danyel Fisher, Scott White

Field Summary
 Dimension screenSize
           
 Map visEdgeMap
           
 Map visVertexMap
           
 
Constructor Summary
AbstractLayout()
           
 
Method Summary
 Dimension getScreenSize()
           
 VisEdge getVisEdge(Edge e)
           
 VisVertex getVisVertex(Vertex v)
           
protected  void repositionLayout(Dimension oldScreenSize, Dimension screenSize2)
           
 void setDimensions(Dimension dimension)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

screenSize

public Dimension screenSize

visVertexMap

public Map visVertexMap

visEdgeMap

public Map visEdgeMap
Constructor Detail

AbstractLayout

public AbstractLayout()
Method Detail

getVisVertex

public VisVertex getVisVertex(Vertex v)

getVisEdge

public VisEdge getVisEdge(Edge e)

setDimensions

public void setDimensions(Dimension dimension)
Parameters:
dimension -

repositionLayout

protected void repositionLayout(Dimension oldScreenSize,
                                Dimension screenSize2)
Parameters:
oldScreenSize -
screenSize2 -

getScreenSize

public Dimension getScreenSize()
Returns:
the current dimensions of the screen size