Class ItemShape

  • All Implemented Interfaces:
    java.io.Serializable

    public class ItemShape
    extends java.lang.Object
    implements java.io.Serializable
    This class defines the shapes which used in the chart.
    Since:
    8.0
    See Also:
    Serialized Form
    • Field Detail

      • DEFAULT_SHAPE_SIZE

        public static final double DEFAULT_SHAPE_SIZE
        The default shape size.
        See Also:
        Constant Field Values
      • TYPE_DEFAULT_SHAPE

        public static final int TYPE_DEFAULT_SHAPE
        The chart use a shapes sequence.
        See Also:
        Constant Field Values
      • TYPE_RECTANGLE_SHAPE

        public static final int TYPE_RECTANGLE_SHAPE
        The chart use only rectangle shapes.
        See Also:
        Constant Field Values
      • TYPE_CIRCLE_SHAPE

        public static final int TYPE_CIRCLE_SHAPE
        The chart use only circle shapes.
        See Also:
        Constant Field Values
      • TYPE_DIAMOND_SHAPE

        public static final int TYPE_DIAMOND_SHAPE
        The chart use only diamond shapes.
        See Also:
        Constant Field Values
      • TYPE_TRIANGLE_SHAPE

        public static final int TYPE_TRIANGLE_SHAPE
        The chart use only triangle shapes.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ItemShape

        public ItemShape()
        Creates a item shape with default type and size. This item shape is used by legend in the list of chart items and by items of chart plot, e.g. by line plot with markers.
        Since:
        8.0
        See Also:
        TYPE_DEFAULT_SHAPE, DEFAULT_SHAPE_SIZE
      • ItemShape

        public ItemShape​(int type,
                         double size)
        Creates a item shape. This item shape is used by legend in the list of chart items and by items of chart plot, e.g. by line plot with markers.
        Parameters:
        type - the shape type
        size - the shape size
        Throws:
        java.lang.IllegalArgumentException - by illegal shape type or negative shape size.
        Since:
        8.0
        See Also:
        TYPE_DEFAULT_SHAPE, DEFAULT_SHAPE_SIZE
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getShapeType

        public int getShapeType()
        Returns the shape form. This shape is used by legend and by items of the plot.
        Returns:
        the type
        Since:
        8.0
        See Also:
        setShapeType(int)
      • setShapeSize

        public void setShapeSize​(double shapeSize)
        Sets the shape size. The usefully range is 0..10.
        Parameters:
        shapeSize - the shape size to set
        Throws:
        java.lang.IllegalArgumentException - if shape size is less than zero.
        Since:
        8.0
        See Also:
        getShapeSize(), DEFAULT_SHAPE_SIZE
      • copy

        public ItemShape copy()
        Returns a copy of this item shape. Copies the shape size and type properties of this.
        Returns:
        the copy
        Since:
        8.0