Class RandomLocationTransformer<V>
- java.lang.Object
-
- edu.uci.ics.jung.algorithms.layout.util.RandomLocationTransformer<V>
-
- Type Parameters:
V
-
- All Implemented Interfaces:
org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>
public class RandomLocationTransformer<V> extends java.lang.Object implements org.apache.commons.collections4.Transformer<V,java.awt.geom.Point2D>
Transforms the input type into a random location within the bounds of the Dimension property. This is used as the backing Transformer for the LazyMap for many Layouts, and provides a random location for unmapped vertices the first time they are accessed.
-
-
Constructor Summary
Constructors Constructor Description RandomLocationTransformer(java.awt.Dimension d)
Creates an instance with the specified size which uses the current time as the random seed.RandomLocationTransformer(java.awt.Dimension d, long seed)
Creates an instance with the specified dimension and random seed.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.geom.Point2D
transform(V v)
-
-
-
Constructor Detail
-
RandomLocationTransformer
public RandomLocationTransformer(java.awt.Dimension d)
Creates an instance with the specified size which uses the current time as the random seed.
-
RandomLocationTransformer
public RandomLocationTransformer(java.awt.Dimension d, long seed)
Creates an instance with the specified dimension and random seed.- Parameters:
d
-seed
-
-
-