Documentation of 'edu.uci.ics.jung.visualization.decorators.VertexIconShapeTransformer' Java class
VertexIconShapeTransformer
edu.uci.ics.jung.visualization.decorators

Class VertexIconShapeTransformer<V>

  • All Implemented Interfaces:
    com.google.common.base.Function<V,java.awt.Shape>
    Direct Known Subclasses:
    VertexImageShaperDemo.DemoVertexIconShapeTransformer


    public class VertexIconShapeTransformer<V>
    extends java.lang.Object
    implements com.google.common.base.Function<V,java.awt.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.
    • Constructor Summary

      Constructors 
      Constructor and Description
      VertexIconShapeTransformer(com.google.common.base.Function<V,java.awt.Shape> delegate)
      Creates an instance with the specified delegate.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.awt.Shape apply(V v)
      get the shape from the image.
      com.google.common.base.Function<V,java.awt.Shape> getDelegate() 
      java.util.Map<V,javax.swing.Icon> getIconMap() 
      java.util.Map<java.awt.Image,java.awt.Shape> getShapeMap() 
      void setDelegate(com.google.common.base.Function<V,java.awt.Shape> delegate) 
      void setIconMap(java.util.Map<V,javax.swing.Icon> iconMap) 
      void setShapeMap(java.util.Map<java.awt.Image,java.awt.Shape> shapeMap) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface com.google.common.base.Function

        equals
    • Constructor Detail

      • VertexIconShapeTransformer

        public VertexIconShapeTransformer(com.google.common.base.Function<V,java.awt.Shape> delegate)
        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 Detail

      • getDelegate

        public com.google.common.base.Function<V,java.awt.Shape> getDelegate()
        Returns:
        Returns the delegate.
      • setDelegate

        public void setDelegate(com.google.common.base.Function<V,java.awt.Shape> delegate)
        Parameters:
        delegate - The delegate to set.
      • apply

        public java.awt.Shape apply(V v)
        get the shape from the image. If not available, get the shape from the delegate VertexShapeFunction
        Specified by:
        apply in interface com.google.common.base.Function<V,java.awt.Shape>
      • getIconMap

        public java.util.Map<V,javax.swing.Icon> getIconMap()
        Returns:
        the iconMap
      • setIconMap

        public void setIconMap(java.util.Map<V,javax.swing.Icon> iconMap)
        Parameters:
        iconMap - the iconMap to set
      • getShapeMap

        public java.util.Map<java.awt.Image,java.awt.Shape> getShapeMap()
        Returns:
        the shapeMap
      • setShapeMap

        public void setShapeMap(java.util.Map<java.awt.Image,java.awt.Shape> shapeMap)
        Parameters:
        shapeMap - the shapeMap to set

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.