samples.preview_new_graphdraw
Class AbstractLayout
java.lang.Object
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:
The StaticLayout, which creates a new layout from
scratch.
- Author:
- Danyel Fisher, Scott White
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
screenSize
public Dimension screenSize
visVertexMap
public Map visVertexMap
visEdgeMap
public Map visEdgeMap
AbstractLayout
public AbstractLayout()
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