Class VertexTransformer.ShapeSize

  • All Implemented Interfaces:
    org.apache.commons.collections15.Transformer
    Enclosing class:
    VertexTransformer

    public static final class VertexTransformer.ShapeSize
    extends java.lang.Object
    implements org.apache.commons.collections15.Transformer
    A transformer for assigning the shape size. The shape is the border for the arrow head, therefore the shape and the image outline must be (almost) identical.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected edu.uci.ics.jung.graph.Graph graph
      The graph.
      protected VertexTransformer.IconSize iconTransformer
      The transformer for the icon.
      protected java.util.Map shapeMap
      The shape map to save transformed shapes for performance reason
    • Constructor Summary

      Constructors 
      Constructor Description
      ShapeSize​(edu.uci.ics.jung.graph.Graph graph, VertexTransformer.IconSize iconTransformer)
      Creates a ShapeSize transformer for the graph.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object transform​(java.lang.Object group)
      Returns the shape for the agent group.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • graph

        protected edu.uci.ics.jung.graph.Graph graph
        The graph.
      • shapeMap

        protected java.util.Map shapeMap
        The shape map to save transformed shapes for performance reason
    • Constructor Detail

      • ShapeSize

        public ShapeSize​(edu.uci.ics.jung.graph.Graph graph,
                         VertexTransformer.IconSize iconTransformer)
        Creates a ShapeSize transformer for the graph.
        Parameters:
        graph - The graph.
        iconTransformer - The icon transformer
    • Method Detail

      • transform

        public java.lang.Object transform​(java.lang.Object group)
        Returns the shape for the agent group. The shape is calculated from the icon calculated by the icon transformer.
        Specified by:
        transform in interface org.apache.commons.collections15.Transformer
        Parameters:
        group - The agent group.
        Returns:
        The shape.