Class CachingLayout<V,E>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.LayoutDecorator<V,E>
-
- edu.uci.ics.jung.visualization.layout.CachingLayout<V,E>
-
- All Implemented Interfaces:
com.google.common.base.Function<V,java.awt.geom.Point2D>
,Layout<V,E>
,IterativeContext
,Caching
,java.util.function.Function<V,java.awt.geom.Point2D>
public class CachingLayout<V,E> extends LayoutDecorator<V,E> implements Caching
A LayoutDecorator that caches locations in a clearable Map. This can be used to ensure that edge endpoints are always the same as vertex locations when they are drawn in the render loop during the time that the layout's relaxer thread is changing the locations.- Author:
- Tom Nelson
- See Also:
LayoutDecorator
-
-
Field Summary
Fields Modifier and Type Field Description protected com.google.common.cache.LoadingCache<V,java.awt.geom.Point2D>
locations
-
Fields inherited from class edu.uci.ics.jung.algorithms.layout.LayoutDecorator
delegate
-
-
Constructor Summary
Constructors Constructor Description CachingLayout(Layout<V,E> delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D
apply(V v)
void
clear()
clear cachevoid
init()
ititialize resources for a cachevoid
setGraph(Graph<V,E> graph)
-
Methods inherited from class edu.uci.ics.jung.algorithms.layout.LayoutDecorator
done, getDelegate, getGraph, getSize, initialize, isLocked, lock, reset, setDelegate, setInitializer, setLocation, setSize, step, transform
-
-
-
-
Field Detail
-
locations
protected com.google.common.cache.LoadingCache<V,java.awt.geom.Point2D> locations
-
-