Class VertexIconShapeTransformer<V>
java.lang.Object
edu.uci.ics.jung.visualization.decorators.VertexIconShapeTransformer<V>
- Direct Known Subclasses:
VertexImageShaperDemo.DemoVertexIconShapeTransformer
public class VertexIconShapeTransformer<V>
extends Object
implements com.google.common.base.Function<V,Shape>
A default implementation that stores images in a Map keyed on the
vertex. Also applies a shaping function to images to extract the
shape of the opaque part of a transparent image.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVertexIconShapeTransformer
(com.google.common.base.Function<V, Shape> delegate) Creates an instance with the specified delegate. -
Method Summary
Modifier and TypeMethodDescriptionget the shape from the image.void
setDelegate
(com.google.common.base.Function<V, Shape> delegate) void
setIconMap
(Map<V, Icon> iconMap) void
setShapeMap
(Map<Image, Shape> shapeMap) 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
equals
-
Field Details
-
shapeMap
-
iconMap
-
delegate
-
-
Constructor Details
-
VertexIconShapeTransformer
Creates an instance with the specified delegate.- Parameters:
delegate
- the vertex-to-shape function to use if no image is present for the vertex
-
-
Method Details
-
getDelegate
- Returns:
- Returns the delegate.
-
setDelegate
- Parameters:
delegate
- The delegate to set.
-
apply
get the shape from the image. If not available, get the shape from the delegate VertexShapeFunction -
getIconMap
- Returns:
- the iconMap
-
setIconMap
- Parameters:
iconMap
- the iconMap to set
-
getShapeMap
- Returns:
- the shapeMap
-
setShapeMap
- Parameters:
shapeMap
- the shapeMap to set
-