Class ShapeRenderer

    • Constructor Detail

      • ShapeRenderer

        public ShapeRenderer()
    • Method Detail

      • draw

        public void draw​(java.awt.Graphics g,
                         PresentationElement presentationElement)
        Draws the symbol using the predifined drawing pattern. Override the method to add the custom drawing.
        Parameters:
        g - graphics where shape is drawn.
        presentationElement - presentation element to draw.
      • calculateMinimumSize

        public void calculateMinimumSize​(ShapeElement presentationElement,
                                         java.awt.Dimension minimumSize)
        Calculate the minimum shape size of the given shape element. Override to change the shape element minimum size.
        Parameters:
        presentationElement - minimum size of.
        minimumSize - calculated minimum size.
      • calculatePreferredSize

        public void calculatePreferredSize​(ShapeElement shapeElement,
                                           java.awt.Dimension prefSize)
        Calculate the shape element preferred size. Override to change the shape element preferred size.
        Parameters:
        shapeElement - preferred size of.
        prefSize - calculated preferred size.
      • getDefaultSize

        @CheckForNull
        public java.awt.Dimension getDefaultSize​(ShapeElement shapeElement)
        Return default shape element size used during symbol drawing. Override method to use custom default size.
        Parameters:
        shapeElement - shape
        Returns:
        custom default size, or null to use predefined default size.
      • createBoundingShape

        public ContainerShape createBoundingShape​(ShapeElement shapeElement,
                                                  PathElement pathElement,
                                                  BoundsTransformation data)
        Returns the shape element boundaries where the path will be connected. Override to add (calculate) the custom boundaries.
        Parameters:
        shapeElement - shape to calculate boundaries of.
        pathElement - path connecting.
        data - bounds transformation data
        Returns:
        bounding shape that defines the boundaries.