edu.uci.ics.jung.visualization.decorators
Class VertexImageShapeTransformer<V>

java.lang.Object
  extended by edu.uci.ics.jung.visualization.decorators.VertexImageShapeTransformer<V>
All Implemented Interfaces:
org.apache.commons.collections15.Transformer<V,Shape>

public class VertexImageShapeTransformer<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

Field Summary
protected  org.apache.commons.collections15.Transformer<V,Shape> delegate
           
protected  Map<V,Image> imageMap
           
protected  Map<Image,Shape> shapeMap
           
 
Constructor Summary
VertexImageShapeTransformer(org.apache.commons.collections15.Transformer<V,Shape> delegate)
           
 
Method Summary
 org.apache.commons.collections15.Transformer<V,Shape> getDelegate()
           
 Map<V,Image> getImageMap()
           
 Map<Image,Shape> getShapeMap()
           
 void setDelegate(org.apache.commons.collections15.Transformer<V,Shape> delegate)
           
 void setImageMap(Map<V,Image> imageMap)
           
 void setShapeMap(Map<Image,Shape> shapeMap)
           
 Shape transform(V v)
          get the shape from the image.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shapeMap

protected Map<Image,Shape> shapeMap

imageMap

protected Map<V,Image> imageMap

delegate

protected org.apache.commons.collections15.Transformer<V,Shape> delegate
Constructor Detail

VertexImageShapeTransformer

public VertexImageShapeTransformer(org.apache.commons.collections15.Transformer<V,Shape> delegate)
Method Detail

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>

getImageMap

public Map<V,Image> getImageMap()
Returns:
the iconMap

setImageMap

public void setImageMap(Map<V,Image> imageMap)
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 © 2007. All Rights Reserved.