Class PickableVertexIconTransformer<V>

  • All Implemented Interfaces:
    org.apache.commons.collections4.Transformer<V,​javax.swing.Icon>

    public class PickableVertexIconTransformer<V>
    extends java.lang.Object
    implements org.apache.commons.collections4.Transformer<V,​javax.swing.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

      Fields 
      Modifier and Type Field Description
      protected javax.swing.Icon icon  
      protected PickedInfo<V> pi  
      protected javax.swing.Icon picked_icon  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      javax.swing.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 javax.swing.Icon icon
      • picked_icon

        protected javax.swing.Icon picked_icon
    • Constructor Detail

      • PickableVertexIconTransformer

        public PickableVertexIconTransformer​(PickedInfo<V> pi,
                                             javax.swing.Icon icon,
                                             javax.swing.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 javax.swing.Icon transform​(V v)
        Returns the appropriate Icon, depending on picked state.
        Specified by:
        transform in interface org.apache.commons.collections4.Transformer<V,​javax.swing.Icon>