i-net Clear Reports

com.inet.report.chart.plot
Class ItemShape

java.lang.Object
  extended by com.inet.report.chart.plot.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 Summary
static double DEFAULT_SHAPE_SIZE
          The default shape size.
static int TYPE_CIRCLE_SHAPE
          The chart use only circle shapes.
static int TYPE_DEFAULT_SHAPE
          The chart use a shapes sequence.
static int TYPE_DIAMOND_SHAPE
          The chart use only diamond shapes.
static int TYPE_RECTANGLE_SHAPE
          The chart use only rectangle shapes.
static int TYPE_TRIANGLE_SHAPE
          The chart use only triangle shapes.
 
Constructor Summary
ItemShape()
          Creates a item shape with default type and size.
ItemShape(int type, double size)
          Creates a item shape.
 
Method Summary
 ItemShape copy()
          Returns a copy of this item shape.
 boolean equals(java.lang.Object obj)
          
 double getShapeSize()
          Returns the shape size.
 int getShapeType()
          Returns the shape form.
 int hashCode()
          
 void setShapeSize(double shapeSize)
          Sets the shape size.
 void setShapeType(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 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)

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

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH