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

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

public class PickableVertexIconTransformer<V>
extends Object
implements org.apache.commons.collections15.Transformer<V,Icon>

Supplies an Icon for each vertex according to the Icon parameters given in the constructor, so that picked and non-picked vertices can be made to look different.


Field Summary
protected  Icon icon
           
protected  PickedInfo<V> pi
           
protected  Icon picked_icon
           
 
Constructor Summary
PickableVertexIconTransformer(PickedInfo<V> pi, Icon icon, Icon picked_icon)
           
 
Method Summary
 Icon transform(V v)
          Returns the appropriate Icon, depending on picked state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

icon

protected Icon icon

picked_icon

protected Icon picked_icon

pi

protected PickedInfo<V> pi
Constructor Detail

PickableVertexIconTransformer

public PickableVertexIconTransformer(PickedInfo<V> pi,
                                     Icon icon,
                                     Icon picked_icon)
Parameters:
pi - specifies which vertices report as "picked"
icon - Icon used to represent vertices
picked_icon - Icon used to represent picked vertices
Method Detail

transform

public Icon transform(V v)
Returns the appropriate Icon, depending on picked state.

Specified by:
transform in interface org.apache.commons.collections15.Transformer<V,Icon>


Copyright © 2009. All Rights Reserved.