edu.uci.ics.jung.visualization.decorators
Class VertexIconShapeTransformer<V>
java.lang.Object
edu.uci.ics.jung.visualization.decorators.VertexIconShapeTransformer<V>
- All Implemented Interfaces:
- org.apache.commons.collections15.Transformer<V,Shape>
- Direct Known Subclasses:
- VertexImageShaperDemo.DemoVertexIconShapeTransformer
public class VertexIconShapeTransformer<V>
- extends Object
- implements org.apache.commons.collections15.Transformer<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.
- Author:
- Tom Nelson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shapeMap
protected Map<Image,Shape> shapeMap
iconMap
protected Map<V,Icon> iconMap
delegate
protected org.apache.commons.collections15.Transformer<V,Shape> delegate
VertexIconShapeTransformer
public VertexIconShapeTransformer(org.apache.commons.collections15.Transformer<V,Shape> delegate)
getDelegate
public org.apache.commons.collections15.Transformer<V,Shape> getDelegate()
- Returns:
- Returns the delegate.
setDelegate
public void setDelegate(org.apache.commons.collections15.Transformer<V,Shape> delegate)
- Parameters:
delegate
- The delegate to set.
transform
public Shape transform(V v)
- get the shape from the image. If not available, get
the shape from the delegate VertexShapeFunction
- Specified by:
transform
in interface org.apache.commons.collections15.Transformer<V,Shape>
getIconMap
public Map<V,Icon> getIconMap()
- Returns:
- the iconMap
setIconMap
public void setIconMap(Map<V,Icon> iconMap)
- Parameters:
iconMap
- the iconMap to set
getShapeMap
public Map<Image,Shape> getShapeMap()
- Returns:
- the shapeMap
setShapeMap
public void setShapeMap(Map<Image,Shape> shapeMap)
- Parameters:
shapeMap
- the shapeMap to set
Copyright © 2009. All Rights Reserved.