Class AnnotationShapeOptions

  • All Implemented Interfaces:
    Serializable, OptionDataListener, org.zkoss.json.JSONAware
    Direct Known Subclasses:
    AnnotationShape

    public class AnnotationShapeOptions
    extends Optionable
    Options for annotation's shapes. Each shape inherits options from the shapeOptions object. An option from the shapeOptions can be overwritten by config for a specific shape.

    All the options in this class support DynamicalAttribute.

    Since:
    7.2.1.0
    Author:
    rudyhuang
    See Also:
    Serialized Form
    • Constructor Detail

      • AnnotationShapeOptions

        public AnnotationShapeOptions()
    • Method Detail

      • getFill

        public Color getFill()
        Returns the color of the shape's fill.

        Default: rgba(0, 0, 0, 0.75)

      • setFill

        public void setFill​(Color fill)
        Sets the color of the shape's fill.
      • setFill

        public void setFill​(String fill)
        Sets the color of the shape's fill.
      • setFill

        public void setFill​(LinearGradient fill)
        Sets the color of the shape's fill.
      • setFill

        public void setFill​(RadialGradient fill)
        Sets the color of the shape's fill.
      • getHeight

        public Number getHeight()
        Returns the height of the shape.

        Default: null

      • setHeight

        public void setHeight​(Number height)
        Sets the height of the shape.
      • getMarkerEnd

        public String getMarkerEnd()
        Returns id of the marker which will be drawn at the final vertex of the path. Custom markers can be defined in defs property.

        Default: null

      • setMarkerEnd

        public void setMarkerEnd​(String markerEnd)
        Sets id of the marker which will be drawn at the final vertex of the path. Custom markers can be defined in defs property.
      • getMarkerStart

        public String getMarkerStart()
        Returns id of the marker which will be drawn at the first vertex of the path. Custom markers can be defined in defs property.

        Default: null

      • setMarkerStart

        public void setMarkerStart​(String markerStart)
        Sets id of the marker which will be drawn at the first vertex of the path. Custom markers can be defined in defs property.
      • getPoint

        public Object getPoint()
        Returns the point which the shape will be connected. It can be either the point which exists in the series - it is referenced by the point's id - or a new point with defined x, y properties and optionally axes.
      • setPoint

        public void setPoint​(Annotation.Point point)
        Sets the point which the shape will be connected.
      • setPoint

        public void setPoint​(String pointId)
        Sets the id of the point which the shape will be connected.
      • getPoints

        public List<Annotation.Point> getPoints()
        Returns an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
      • setPoints

        public void setPoints​(List<Annotation.Point> points)
        Sets an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
      • setPoints

        public void setPoints​(Annotation.Point... points)
        Sets an array of points for the shape. This option is available for shapes which can use multiple points such as path. A point can be either a point object or a point's id.
      • getR

        public Number getR()
        Returns the radius of the shape.

        Default: 0

      • setR

        public void setR​(Number r)
        Sets the radius of the shape.
      • getSnap

        public Number getSnap()
        Returns the additional snapping area around an annotation making this annotation to focus. Defined in pixels.

        Default: 2

      • setSnap

        public void setSnap​(Number snap)
        Sets the additional snapping area around an annotation making this annotation to focus. Defined in pixels.
      • getStroke

        public Color getStroke()
        Returns the color of the shape's stroke.

        Default: rgba(0, 0, 0, 0.75)

      • setStroke

        public void setStroke​(Color stroke)
        Sets the color of the shape's stroke.
      • setStroke

        public void setStroke​(String stroke)
        Sets the color of the shape's stroke.
      • getStrokeWidth

        public Number getStrokeWidth()
        Returns the pixel stroke width of the shape.

        Default: 1

      • setStrokeWidth

        public void setStrokeWidth​(Number strokeWidth)
        Sets the pixel stroke width of the shape.
      • getType

        public String getType()
        Returns the type of the shape, e.g. circle or rectangle.

        Default: "rect"

      • setType

        public void setType​(String type)
        Sets the type of the shape, e.g. circle or rectangle.
      • getWidth

        public Number getWidth()
        Returns the width of the shape.

        Default: null

      • setWidth

        public void setWidth​(Number width)
        Sets the width of the shape.
      • getX

        public Number getX()
        Returns x position offset of the shape relative to the point.

        Default: 0

      • setX

        public void setX​(Number x)
        Sets the x position offset of the shape relative to the point.
      • getY

        public Number getY()
        Returns the y position offset of the shape relative to the point.

        Default: 0

      • setY

        public void setY​(Number y)
        Sets the y position offset of the shape relative to the point.