Class VisualGraphVertexShapeTransformer<V extends VisualVertex>

  • Type Parameters:
    V - the vertex type
    All Implemented Interfaces:
    com.google.common.base.Function<V,​java.awt.Shape>

    public class VisualGraphVertexShapeTransformer<V extends VisualVertex>
    extends java.lang.Object
    implements com.google.common.base.Function<V,​java.awt.Shape>
    The default VisualGraph renderer. By default, the shape returned by this class is a Rectangle of the given vertex's component.

    This class is aware of VertexShapeProviders, which allows vertex creators to provide vertex shapes that differ for rendering and clicking. See that class for more info.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Shape apply​(V vertex)  
      java.awt.Shape transformToCompactShape​(V v)
      Returns the compact shape that the user will see when full, detailed rendering is not being performed for a vertex, such as in the satellite viewer or when fully-zoomed-out
      java.awt.Shape transformToFullShape​(V v)
      Returns the full (the actual) shape of a vertex.
      • Methods inherited from class java.lang.Object

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

        equals
    • Constructor Detail

      • VisualGraphVertexShapeTransformer

        public VisualGraphVertexShapeTransformer()
    • Method Detail

      • transformToCompactShape

        public java.awt.Shape transformToCompactShape​(V v)
        Returns the compact shape that the user will see when full, detailed rendering is not being performed for a vertex, such as in the satellite viewer or when fully-zoomed-out
        Parameters:
        v - the vertex
        Returns:
        the shape
      • transformToFullShape

        public java.awt.Shape transformToFullShape​(V v)
        Returns the full (the actual) shape of a vertex. This can be used to determine if a mouse point intersects a vertex or to get the real bounding-box of a vertex.
        Parameters:
        the - vertex
        Returns:
        the shape
      • apply

        public java.awt.Shape apply​(V vertex)
        Specified by:
        apply in interface com.google.common.base.Function<V extends VisualVertex,​java.awt.Shape>