Enum RectangleAnchor

    • Method Detail

      • values

        public static RectangleAnchor[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (RectangleAnchor c : RectangleAnchor.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static RectangleAnchor valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getAnchorPoint

        public Point2D getAnchorPoint​(Rectangle2D rectangle)
        Returns the anchor point relative to the specified rectangle.
        Parameters:
        rectangle - the rectangle (null not permitted).
        Returns:
        The anchor point (never null).
      • createRectangle

        public static Rectangle2D createRectangle​(org.jfree.chart.block.Size2D dimensions,
                                                  double anchorX,
                                                  double anchorY,
                                                  RectangleAnchor anchor)
        Creates a new rectangle with the specified dimensions that is aligned to the given anchor point (anchorX, anchorY).
        Parameters:
        dimensions - the dimensions (null not permitted).
        anchorX - the x-anchor.
        anchorY - the y-anchor.
        anchor - the anchor (null not permitted).
        Returns:
        A rectangle.