Package com.inet.report.chart.plot
Class ItemShape
- java.lang.Object
-
- com.inet.report.chart.plot.ItemShape
-
- All Implemented Interfaces:
java.io.Serializable
public class ItemShape extends java.lang.Object implements java.io.SerializableThis class defines the shapes which used in the chart.- Since:
- 8.0
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static doubleDEFAULT_SHAPE_SIZEThe default shape size.static intTYPE_CIRCLE_SHAPEThe chart use only circle shapes.static intTYPE_DEFAULT_SHAPEThe chart use a shapes sequence.static intTYPE_DIAMOND_SHAPEThe chart use only diamond shapes.static intTYPE_RECTANGLE_SHAPEThe chart use only rectangle shapes.static intTYPE_TRIANGLE_SHAPEThe chart use only triangle shapes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemShapecopy()Returns a copy of this item shape.booleanequals(java.lang.Object obj)doublegetShapeSize()Returns the shape size.intgetShapeType()Returns the shape form.inthashCode()voidsetShapeSize(double shapeSize)Sets the shape size.voidsetShapeType(int shapeType)Sets the shape 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 typesize- 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.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)
-
setShapeType
public void setShapeType(int shapeType)
Sets the shape form. This shape is used by legend and by items of the plot.- Parameters:
shapeType- the type- Throws:
java.lang.IllegalArgumentException- by unsupported shape type.- Since:
- 8.0
- See Also:
getShapeType(),TYPE_DEFAULT_SHAPE,TYPE_CIRCLE_SHAPE,TYPE_DIAMOND_SHAPE,TYPE_RECTANGLE_SHAPE,TYPE_TRIANGLE_SHAPE
-
getShapeSize
public double getShapeSize()
Returns the shape size. The usefully range is 0..10.- Returns:
- the shape size.
- Since:
- 8.0
- See Also:
setShapeSize(double),DEFAULT_SHAPE_SIZE
-
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
-
-