anl.aida.viz.layout
Class AbstractLayout2D<T>
java.lang.Object
anl.aida.viz.layout.AbstractLayout2D<T>
- All Implemented Interfaces:
- Layout2D<T>
- Direct Known Subclasses:
- CircleLayout
public abstract class AbstractLayout2D<T>
- extends java.lang.Object
- implements Layout2D<T>
Abstract base class for 2D layouts.
Field Summary |
protected java.util.Map<T,java.awt.geom.Point2D> |
locations
|
protected java.awt.Dimension |
size
|
Constructor Summary |
AbstractLayout2D(java.util.Collection<T> objs,
java.awt.Dimension size)
|
Method Summary |
java.awt.geom.Point2D |
getLocation(T obj)
Gets the location of the object. |
protected void |
initNodes(java.util.Collection<T> objs)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
locations
protected java.util.Map<T,java.awt.geom.Point2D> locations
size
protected java.awt.Dimension size
AbstractLayout2D
public AbstractLayout2D(java.util.Collection<T> objs,
java.awt.Dimension size)
initNodes
protected void initNodes(java.util.Collection<T> objs)
getLocation
public java.awt.geom.Point2D getLocation(T obj)
- Description copied from interface:
Layout2D
- Gets the location of the object.
- Specified by:
getLocation
in interface Layout2D<T>
- Parameters:
obj
- the object whose location we want
- Returns:
- the location of the object.