Class SurfaceSquare

    • Constructor Detail

      • SurfaceSquare

        public SurfaceSquare()
        Constructs a new surface square with the default attributes, default center location, default size, and default heading.
      • SurfaceSquare

        public SurfaceSquare​(SurfaceSquare source)
        Creates a shallow copy of the specified source shape.
        Parameters:
        source - the shape to copy.
      • SurfaceSquare

        public SurfaceSquare​(ShapeAttributes normalAttrs)
        Constructs a new surface square with the specified normal (as opposed to highlight) attributes, default center location, default size, and default heading. Modifying the attribute reference after calling this constructor causes this shape's appearance to change accordingly.
        Parameters:
        normalAttrs - the normal attributes. May be null, in which case default attributes are used.
      • SurfaceSquare

        public SurfaceSquare​(LatLon center,
                             double size)
        Constructs a new surface square with the default attributes, the specified center location and size (in meters).
        Parameters:
        center - the square's center location.
        size - the square's width and height, in meters.
        Throws:
        java.lang.IllegalArgumentException - if the center is null, or if the size is negative.
      • SurfaceSquare

        public SurfaceSquare​(LatLon center,
                             double size,
                             Angle heading)
        Constructs a new surface square with the default attributes, the specified center location, size (in meters), and heading clockwise from North.
        Parameters:
        center - the square's center location.
        size - the square's width and height, in meters.
        heading - the square's heading, clockwise from North.
        Throws:
        java.lang.IllegalArgumentException - if the center or heading are null, or if the size is negative.
      • SurfaceSquare

        public SurfaceSquare​(ShapeAttributes normalAttrs,
                             LatLon center,
                             double size)
        Constructs a new surface square with the specified normal (as opposed to highlight) attributes, the specified center location and size (in meters). Modifying the attribute reference after calling this constructor causes this shape's appearance to change accordingly.
        Parameters:
        normalAttrs - the normal attributes. May be null, in which case default attributes are used.
        center - the square's center location.
        size - the square's width and height, in meters.
        Throws:
        java.lang.IllegalArgumentException - if the center is null, or if the size is negative.
      • SurfaceSquare

        public SurfaceSquare​(ShapeAttributes normalAttrs,
                             LatLon center,
                             double size,
                             Angle heading)
        Constructs a new surface square with the specified normal (as opposed to highlight) attributes, the specified center location and dimensions (in meters). Modifying the attribute reference after calling this constructor causes this shape's appearance to change accordingly.
        Parameters:
        normalAttrs - the normal attributes. May be null, in which case default attributes are used.
        center - the square's center location.
        size - the square's width and height, in meters.
        heading - the square's heading, clockwise from North.
        Throws:
        java.lang.IllegalArgumentException - if the center or heading are null, or if the size is negative.
    • Method Detail

      • getSize

        public double getSize()
      • setSize

        public void setSize​(double size)