Package com.inet.report.chart.plot
Class ItemShape
java.lang.Object
com.inet.report.chart.plot.ItemShape
- All Implemented Interfaces:
Serializable
This class defines the shapes which used in the chart.
- Since:
- 8.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final double
The default shape size.static final int
The chart use only circle shapes.static final int
The chart use a shapes sequence.static final int
The chart use only diamond shapes.static final int
The chart use only rectangle shapes.static final int
The chart use only triangle shapes. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns a copy of this item shape.boolean
double
Returns the shape size.int
Returns the shape form.int
hashCode()
void
setShapeSize
(double shapeSize) Sets the shape size.void
setShapeType
(int shapeType) Sets the shape form.
-
Field Details
-
DEFAULT_SHAPE_SIZE
public static final double DEFAULT_SHAPE_SIZEThe default shape size.- See Also:
-
TYPE_DEFAULT_SHAPE
public static final int TYPE_DEFAULT_SHAPEThe chart use a shapes sequence.- See Also:
-
TYPE_RECTANGLE_SHAPE
public static final int TYPE_RECTANGLE_SHAPEThe chart use only rectangle shapes.- See Also:
-
TYPE_CIRCLE_SHAPE
public static final int TYPE_CIRCLE_SHAPEThe chart use only circle shapes.- See Also:
-
TYPE_DIAMOND_SHAPE
public static final int TYPE_DIAMOND_SHAPEThe chart use only diamond shapes.- See Also:
-
TYPE_TRIANGLE_SHAPE
public static final int TYPE_TRIANGLE_SHAPEThe chart use only triangle shapes.- See Also:
-
-
Constructor Details
-
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:
-
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:
IllegalArgumentException
- by illegal shape type or negative shape size.- Since:
- 8.0
- See Also:
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
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
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:
IllegalArgumentException
- by unsupported shape type.- Since:
- 8.0
- See Also:
-
getShapeSize
public double getShapeSize()Returns the shape size. The usefully range is 0..10.- Returns:
- the shape size.
- Since:
- 8.0
- See Also:
-
setShapeSize
public void setShapeSize(double shapeSize) Sets the shape size. The usefully range is 0..10.- Parameters:
shapeSize
- the shape size to set- Throws:
IllegalArgumentException
- if shape size is less than zero.- Since:
- 8.0
- See Also:
-
copy
Returns a copy of this item shape. Copies the shape size and type properties of this.- Returns:
- the copy
- Since:
- 8.0
-