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
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLayoutDecorator
(Layout<V, E> delegate) Creates an instance backed by the specifieddelegate
. -
Method Summary
Modifier and TypeMethodDescriptionboolean
done()
getGraph()
getSize()
void
Initializes fields in the node that may not have been set during the constructor.boolean
void
Locks or unlocks the specified vertex.void
reset()
void
setDelegate
(Layout<V, E> delegate) void
void
setInitializer
(com.google.common.base.Function<V, Point2D> initializer) void
setLocation
(V v, Point2D location) Changes the layout coordinates ofv
tolocation
.void
void
step()
Advances one step.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:IterativeContext
Advances one step.- Specified by:
step
in interfaceIterativeContext
-
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 interfaceLayout<V,
E>
-
setInitializer
- Specified by:
setInitializer
in interfaceLayout<V,
E> - Parameters:
initializer
- a function that specifies initial locations for all vertices
-
setLocation
Description copied from interface:Layout
Changes the layout coordinates ofv
tolocation
.- Specified by:
setLocation
in 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:
done
in interfaceIterativeContext
- Returns:
true
if this iterative process is finished, andfalse
otherwise.
-
lock
Description copied from interface:Layout
Locks 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
-