edu.uci.ics.jung.visualization3d.layout
Class LayoutDecorator<V,E>

java.lang.Object
  extended by edu.uci.ics.jung.visualization3d.layout.LayoutDecorator<V,E>
All Implemented Interfaces:
Layout<V,E>, IterativeContext, org.apache.commons.collections15.Transformer<V,javax.vecmath.Point3f>
Direct Known Subclasses:
LayoutEventBroadcaster

public abstract class LayoutDecorator<V,E>
extends Object
implements Layout<V,E>, IterativeContext

a pure decorator for the Layout interface. Intended to be overridden to provide specific behavior decoration

Author:
Tom Nelson

Field Summary
protected  Layout<V,E> delegate
           
 
Constructor Summary
LayoutDecorator(Layout<V,E> delegate)
           
 
Method Summary
 boolean done()
          Returns true if this iterative process is finished, and false otherwise.
 Layout getDelegate()
          getter for the delegate
 Graph<V,E> getGraph()
          Returns the full graph (the one that was passed in at construction time) that this Layout refers to.
 javax.media.j3d.BoundingSphere getSize()
          Returns the current size of the visualization's space.
 void initialize()
          Initializes fields in the node that may not have been set during the constructor.
 boolean isLocked(V v)
          Returns true if the position of vertex v is locked.
 void lock(V v, boolean state)
          Sets a flag which fixes this vertex in place.
 void reset()
           
 void setDelegate(Layout<V,E> delegate)
          setter for the delegate
 void setGraph(Graph<V,E> graph)
          setter for graph
 void setInitializer(org.apache.commons.collections15.Transformer<V,javax.vecmath.Point3f> initializer)
          provides initial locations for all vertices.
 void setLocation(V v, javax.vecmath.Point3f location)
          set the location of a vertex
 void setSize(javax.media.j3d.BoundingSphere d)
           
 void step()
          Advances one step.
 javax.vecmath.Point3f transform(V v)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

delegate

protected Layout<V,E> delegate
Constructor Detail

LayoutDecorator

public LayoutDecorator(Layout<V,E> delegate)
Method Detail

getDelegate

public Layout getDelegate()
getter for the delegate

Returns:
the delegate

setDelegate

public void setDelegate(Layout<V,E> delegate)
setter for the delegate

Parameters:
delegate - the new delegate

step

public void step()
Description copied from interface: IterativeContext
Advances one step.

Specified by:
step in interface IterativeContext
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#step()

initialize

public void initialize()
Description copied from interface: Layout
Initializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.

Specified by:
initialize in interface Layout<V,E>
See Also:
Layout.initialize()

setInitializer

public void setInitializer(org.apache.commons.collections15.Transformer<V,javax.vecmath.Point3f> initializer)
Description copied from interface: Layout
provides initial locations for all vertices.

Specified by:
setInitializer in interface Layout<V,E>
Parameters:
initializer -
See Also:
Layout.setInitializer(org.apache.commons.collections15.Transformer)

setLocation

public void setLocation(V v,
                        javax.vecmath.Point3f location)
Description copied from interface: Layout
set the location of a vertex

Specified by:
setLocation in interface Layout<V,E>
Parameters:
v -
location -
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#setLocation(java.lang.Object, java.awt.geom.Point3f)

getSize

public javax.media.j3d.BoundingSphere getSize()
Description copied from interface: Layout
Returns the current size of the visualization's space.

Specified by:
getSize in interface Layout<V,E>
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#getCurrentSize()

getGraph

public Graph<V,E> getGraph()
Description copied from interface: Layout
Returns the full graph (the one that was passed in at construction time) that this Layout refers to.

Specified by:
getGraph in interface Layout<V,E>
See Also:
Layout.getGraph()

transform

public javax.vecmath.Point3f transform(V v)
Specified by:
transform in interface org.apache.commons.collections15.Transformer<V,javax.vecmath.Point3f>
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#getLocation(edu.uci.ics.jung.graph.ArchetypeVertex)

done

public boolean done()
Description copied from interface: IterativeContext
Returns true if this iterative process is finished, and false otherwise.

Specified by:
done in interface IterativeContext
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#done()

lock

public void lock(V v,
                 boolean state)
Description copied from interface: Layout
Sets a flag which fixes this vertex in place.

Specified by:
lock in interface Layout<V,E>
Parameters:
v - vertex
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#lockVertex(edu.uci.ics.jung.graph.Vertex)

isLocked

public boolean isLocked(V v)
Description copied from interface: Layout
Returns true if the position of vertex v is locked.

Specified by:
isLocked in interface Layout<V,E>
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#isLocked(V)

setSize

public void setSize(javax.media.j3d.BoundingSphere d)
Specified by:
setSize in interface Layout<V,E>
See Also:
edu.uci.ics.jung.algorithms.layout.Layout#resize(java.awt.Dimension)

reset

public void reset()
Specified by:
reset in interface Layout<V,E>
See Also:
Layout.reset()

setGraph

public void setGraph(Graph<V,E> graph)
Description copied from interface: Layout
setter for graph

Specified by:
setGraph in interface Layout<V,E>


Copyright © 2009. All Rights Reserved.