Class LayoutDecorator<V,E>
java.lang.Object
edu.uci.ics.jung.algorithms.layout.LayoutDecorator<V,E>
- All Implemented Interfaces:
com.google.common.base.Function<V,,Point2D> Layout<V,,E> IterativeContext,Function<V,Point2D>
- Direct Known Subclasses:
CachingLayout,ObservableCachingLayout
a pure decorator for the Layout interface. Intended to be overridden
to provide specific behavior decoration
- Author:
- Tom Nelson
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLayoutDecorator(Layout<V, E> delegate) Creates an instance backed by the specifieddelegate. -
Method Summary
Modifier and TypeMethodDescriptionbooleandone()getGraph()getSize()voidInitializes fields in the node that may not have been set during the constructor.booleanvoidLocks or unlocks the specified vertex.voidreset()voidsetDelegate(Layout<V, E> delegate) voidvoidsetInitializer(com.google.common.base.Function<V, Point2D> initializer) voidsetLocation(V v, Point2D location) Changes the layout coordinates ofvtolocation.voidvoidstep()Advances one step.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
apply, equals
-
Field Details
-
delegate
-
-
Constructor Details
-
LayoutDecorator
Creates an instance backed by the specifieddelegate.- Parameters:
delegate- the layout to which this instance is delegating
-
-
Method Details
-
getDelegate
- Returns:
- the backing (delegate) layout.
-
setDelegate
-
step
public void step()Description copied from interface:IterativeContextAdvances one step.- Specified by:
stepin interfaceIterativeContext
-
initialize
public void initialize()Description copied from interface:LayoutInitializes fields in the node that may not have been set during the constructor. Must be called before the iterations begin.- Specified by:
initializein interfaceLayout<V,E>
-
setInitializer
- Specified by:
setInitializerin interfaceLayout<V,E> - Parameters:
initializer- a function that specifies initial locations for all vertices
-
setLocation
Description copied from interface:LayoutChanges the layout coordinates ofvtolocation.- Specified by:
setLocationin interfaceLayout<V,E> - Parameters:
v- the vertex whose location is to be specifiedlocation- the coordinates of the specified location
-
getSize
-
getGraph
-
transform
-
done
public boolean done()- Specified by:
donein interfaceIterativeContext- Returns:
trueif this iterative process is finished, andfalseotherwise.
-
lock
Description copied from interface:LayoutLocks or unlocks the specified vertex. Locking the vertex fixes it at its current position, so that it will not be affected by the layout algorithm. Unlocking it allows the layout algorithm to change the vertex's position. -
isLocked
-
setSize
-
reset
public void reset() -
setGraph
-