Enum IArea.Shape

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      CIRCLE
      Treat the coords format as a circle.
      POLYGON
      Treat the coords format as a rectangle.
      RECTANGLE
      Treat the coords format as a rectangle.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static IArea.Shape valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static IArea.Shape[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • RECTANGLE

        public static final IArea.Shape RECTANGLE
        Treat the coords format as a rectangle. withCoords("x1, y1, x2, y2") Where the first coordinate pair is one corner of the rectangle and the other pair is the corner diagonally opposite. A rectangle is just a shortened way of specifying a polygon with four vertices.
      • CIRCLE

        public static final IArea.Shape CIRCLE
        Treat the coords format as a circle. withCoords("x, y, r") Where x and y define the position of the circle’s center and r is the radius in pixels.
      • POLYGON

        public static final IArea.Shape POLYGON
        Treat the coords format as a rectangle. withCoords("x1, y1, x2, y2, x3, y3...") Where each pair of x and y define a point of the polygon. At least three pairs of coordinates are required to define a triangle. The polygon is automatically closed, so it is not necessary to repeat the first coordinate at the end of the list to close the region.
    • Method Detail

      • values

        public static IArea.Shape[] 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 (IArea.Shape c : IArea.Shape.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IArea.Shape valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null