Class Shape

  • All Implemented Interfaces:
    TagBase, AAttributable, AreaAttributable, java.io.Serializable, java.lang.Cloneable


    public class Shape
    extends AbstractAttribute
    implements AAttributable, AreaAttributable
    This attribute is used to define a selectable region for hypertext source links associated with a figure to create an image map. The values for the attribute are circle, default, polygon, and rect. The format of the coords attribute depends on the value of shape. For circle, the value is x,y,r where x and y are the pixel coordinates for the center of the circle and r is the radius value in pixels. For rect, the coords attribute should be x,y,w,h. The x,y values define the upper-left-hand corner of the rectangle, while w and h define the width and height respectively. A value of polygon for shape requires x1,y1,x2,y2,... values for coords. Each of the x,y pairs defines a point in the polygon, with successive points being joined by straight lines and the last point joined to the first. The value default for shape requires that the entire enclosed area, typically an image, be used. shape attribute for the element.NB: This attribute is not supported by html5
    Since:
    1.0.0
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT

        public static final java.lang.String DEFAULT
        Specifies the entire region
        See Also:
        Constant Field Values
      • rect

        public static final java.lang.String rect
        Defines a rectangular region
        See Also:
        Constant Field Values
      • circle

        public static final java.lang.String circle
        Defines a circular region
        See Also:
        Constant Field Values
      • poly

        public static final java.lang.String poly
        Defines a polygonal region
        See Also:
        Constant Field Values
    • Constructor Detail

      • Shape

        public Shape​(java.lang.String value)
        Parameters:
        value - the value for the attribute
        Since:
        1.0.0
    • Method Detail

      • setValue

        public void setValue​(java.lang.String value)
        sets the value for this attribute
        Parameters:
        value - the value for the attribute.
        Since:
        1.0.0
      • getValue

        public java.lang.String getValue​()
        gets the value of this attribute
        Returns:
        the value of the attribute
        Since:
        1.0.0
      • init

        protected void init​()
        invokes only once per object
        Since:
        1.0.0