com.ijchart.xychart.shape
Class AbstractChartShape

java.lang.Object
  extended by com.ijchart.xychart.shape.AbstractChartShape
All Implemented Interfaces:
IChartShapeChangeListener, IChartShape, java.io.Serializable, java.lang.Cloneable, java.util.EventListener
Direct Known Subclasses:
AbstractImageChartShape, AbstractTextChartShape, ErrorCrossChartShape, IShapedChartShape, LegendItemChartShape, LineChartShape, MeterArcChartShape, MinMaxChartShape, PaintScaleLegendChartShape

public abstract class AbstractChartShape
extends java.lang.Object
implements IChartShape, java.lang.Cloneable, java.io.Serializable, IChartShapeChangeListener

Title: IJChart

Description: a chart library for the Java(tm) platform.

A base class for handling the drawing of IChartShape.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
static ChartShapeDrawType DEFAULT_DRAW_TYPE
           The default chart shape draw type.
static int DEFAULT_SHAPE_ID
           The default shape id.
static boolean DEFAULT_VISIBLE
           A default flag controls whether or not the ChartShape can be selected.
protected  java.awt.Shape transformedShape
           The transformed shape for calculate whether or not contains a point.
 
Fields inherited from interface com.ijchart.xychart.shape.IChartShape
DEFAULT_BORDER_PAINT, DEFAULT_BORDER_STROKE, DEFAULT_CONTENT_PAINT, DEFAULT_DRAW_BORDER, DEFAULT_FILL_ALPHA, DEFAULT_FILL_PAINT, DEFAULT_FILL_SHAPE, DEFAULT_GRADIENT_PAINT_TRANSFORM_TYPE, DEFAULT_MARGIN, DEFAULT_SELECT_FILL_PAINT, DEFAULT_SELECT_RECT_ALPHA, DEFAULT_SELECT_RECT_WIDTH, DEFAULT_SELECTED, DEFAULT_TEXT_FONT, DEFAULT_TOOLTIP_SHAPE_WIDTH, HOTSPOT_TYPE_CIRCLE, HOTSPOT_TYPE_POLYGON, HOTSPOT_TYPE_RECTANGLE
 
Constructor Summary
protected AbstractChartShape()
           No argument constructor.
 
Method Summary
 void addChangeListener(IChartShapeChangeListener listener)
           Registers an object for notification of changes to the IChartShape.
protected  void afterDraw(java.awt.Graphics2D g2)
           Call the afterDraw method of class IShapeChange.
protected  void beforeDraw(java.awt.Graphics2D g2)
           Call the beforeDraw method of class IShapeChange.
protected abstract  void calculateTransformedShape()
           Calculate the transformed shape.
 void chartShapeChanged(ChartShapeChangeEvent event)
           Receives notification of an IChartShape change event.
 java.lang.Object clone()
           Creates and returns a copy of this object.
 boolean contains(double x, double y)
           Tests if a specified Point2D is inside the boundary of the ChartShape.
 boolean contains(java.awt.geom.Point2D point)
           Tests if a specified Point2D is inside the boundary of the ChartShape.
protected  void drawAnchorByPoints(java.awt.Graphics2D g2, double translateX, double translateY, java.awt.geom.Point2D.Double[] points)
           Draw anchor by the coordinates of points.
protected  void drawBackground(java.awt.Graphics2D g2, java.awt.Shape drawArea)
           Draw background color.
protected  void drawBorder(java.awt.Graphics2D g2, java.awt.Shape drawArea)
           Draw border.
protected abstract  void drawSelect(java.awt.Graphics2D g2)
           Draw the selected ChartShape on a Java 2d graphics device(such as the screen or the printer).
protected  void drawShapeBorder(java.awt.Graphics2D g2, java.awt.Shape shape)
           Outline this shape.
 boolean equals(java.lang.Object obj)
           Indicates if some other object is "equal to" this one.
protected  void fillShape(java.awt.Graphics2D g2, java.awt.Paint fillPaint, java.awt.Shape shape)
           Fill this shape.
protected  void fireChartShapeChanged()
           Notifies all registered listeners that the chart shape has changed.
 void forceChartShapeChanged()
           If the data object of IChartShape changed and no event triggered,set IChartShape changed by this method.
 java.awt.Paint getBorderPaint()
           Get the ChartShape border Paint.
 java.awt.Stroke getBorderStroke()
           Get the ChartShape border Stroke.
 java.awt.geom.Rectangle2D getBound()
           Returns a Rectangle2D that completely encloses the Shape.
 IChartData getData()
           Returns the IChartData object.
 float getFillAlpha()
           Returns the alpha value for fill background.
 java.awt.Paint getFillPaint()
           Get the ChartShape fill paint.
 GradientPaintTransformType getGradientPaintTransformType()
           Get the ChartShape GradientPaintTransformType type.
 java.lang.String getHotspotPolyCoords(java.awt.Shape parentClipArea)
           Returns a string containing the coordinates for a given shape.This string is intended for use in an image map.
protected abstract  java.awt.Shape getHotspotShape()
           Returns the hotspot shape.
 java.lang.String getHotspotType()
           Returns the shape type of hotspot.
protected  java.lang.String getHotspotType(java.awt.Shape shape)
           Returns the shape type of hotspot.
 int getId()
           Returns the ID.
 java.awt.geom.Point2D getLockPoint()
           Returns the lock coordinates of this shape.
 RectangleInsets getMargin()
           Returns the margin around the inside of the block.
 java.awt.Shape getOriginTooltipShape()
           Returns the original tooltip shape.
 double getRotate()
           Return the angle of rotation in radians.
 java.awt.Paint getSelectAnchorPaint()
           Returns the anchor Paint of selected ChartShape.
 float getSelectRectAlpha()
           Returns the anchor rectangle alpha value of selected ChartShape.
 double getSelectRectWidth()
           Returns the anchor rectangle width of selected ChartShape.
 IShapeChange getShapeChange()
           Returns the IShapeChange object.
 ChartShapeDrawType getShapeDrawType()
           Returns the chart shape draw type.
 java.awt.Shape getTooltipShape()
           Returns the tooltip shape.
protected  double getTooltipShapeRotate()
           Returns the angle of rotation of the tooltip shape.
protected  java.awt.geom.Point2D getTooltipShapeTranslatePoint()
           Returns the translate point of tooltip shape.
 java.lang.String getTooltipText()
           Returns the tooltip text.
 java.lang.String getURL()
           Returns the URL text.
 int hashCode()
           Returns a hash code value for the object.
 boolean hasListener(IChartShapeChangeListener listener)
           Returns true if the specified object is registered with the IChartShape as a listener.
 boolean isDrawBorder()
           A flag that controls whether or not the shape border is visible.
 boolean isFillShape()
           A flag that controls whether or not the shape is filled.
 boolean isSelected()
           Returns whether or not this shape is selected.
 boolean isVisible()
           Returns whether or not the shape is visible.
protected  void notifyListeners(ChartShapeChangeEvent event)
           Notifies all registered listeners that the chart shape has changed.
 void removeAllChangeListener()
           Deregisters all object for notification of changes to the IChartShape.
 void removeChangeListener(IChartShapeChangeListener listener)
           Deregisters an object for notification of changes to the IChartShape.
 void setBorderPaint(java.awt.Paint paint)
           Sets the shape border Paint and sends a ChartShapeChangeEvent to all registered listeners.
 void setBorderStroke(java.awt.Stroke stroke)
           Sets the shape border Stroke and sends a ChartShapeChangeEvent to all registered listeners.
 void setData(IChartData data)
           Sets the IChartData object and sends a ChartShapeChangeEvent to all registered listeners.
 void setDrawBorder(boolean flag)
           Sets a flag that controls whether or not the shape border is visible and sends a ChartShapeChangeEvent to all registered listeners.
 void setFillAlpha(float alpha)
           The alpha value for fill background and sends a ChartShapeChangeEvent to all registered listeners.
 void setFillPaint(java.awt.Paint paint)
           Sets the shape fill Paint and sends a ChartShapeChangeEvent to all registered listeners.
 void setFillShape(boolean bFillShape)
           Sets a flag that controls whether or not the shape is filled,and sends a ChartShapeChangeEvent to all registered listeners.
 void setGradientPaintTransformType(GradientPaintTransformType transformType)
           Sets the ChartShape GradientPaintTransformType type,use only when fill Paint is GradientPaint,and sends a ChartShapeChangeEvent to all registered listeners.
 void setId(int shapeId)
           Sets an ID for this shape,the shape ID is unique and continuous in a chart.
 void setMargin(RectangleInsets margin)
           Sets the margin around the inside of the block,and sends a ChartShapeChangeEvent to all registered listeners.
 void setOriginTooltipShape(java.awt.Shape shape)
           Sets the original tooltip shape.
 void setRotate(double theta)
           Sets the anchor Paint of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.
 void setSelected(boolean flag)
           Sets a flag controls whether or not the shape is selected,and sends a ChartShapeChangeEvent to all registered listeners.
 void setSelectRectAlpha(float selectRectAlpha)
           Sets the anchor rectangle alpha value of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.
 void setSelectRectWidth(double width)
           Sets the anchor rectangle width of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.
 void setShapeChange(IShapeChange change)
           Sets the IShapeChange object.
 void setShapeDrawType(ChartShapeDrawType drawType)
           Sets the chart shape draw type and sends a ChartShapeChangeEvent to all registered listeners.
 void setTooltipText(java.lang.String tooltip)
           Sets the tooltip text.
 void setURL(java.lang.String url)
           Sets the URL text.
 void setVisible(boolean flag)
           Sets whether or not the shape is visible and sends a ChartShapeChangeEvent to all registered listeners.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ijchart.xychart.shape.IChartShape
draw, getShapeType, getTopLeftPoint, translate
 

Field Detail

DEFAULT_SHAPE_ID

public static final int DEFAULT_SHAPE_ID
The default shape id.

See Also:
Constant Field Values

DEFAULT_DRAW_TYPE

public static final ChartShapeDrawType DEFAULT_DRAW_TYPE
The default chart shape draw type.


DEFAULT_VISIBLE

public static final boolean DEFAULT_VISIBLE
A default flag controls whether or not the ChartShape can be selected.

See Also:
Constant Field Values

transformedShape

protected transient java.awt.Shape transformedShape
The transformed shape for calculate whether or not contains a point.

Constructor Detail

AbstractChartShape

protected AbstractChartShape()
No argument constructor.

Method Detail

setId

public void setId(int shapeId)
Sets an ID for this shape,the shape ID is unique and continuous in a chart.

Specified by:
setId in interface IChartShape
Parameters:
shapeId - int

getId

public int getId()
Returns the ID.

Specified by:
getId in interface IChartShape
Returns:
int The shape ID.

getFillPaint

public java.awt.Paint getFillPaint()
Get the ChartShape fill paint.

Specified by:
getFillPaint in interface IChartShape
Returns:
Paint The ChartShape fill paint.

getGradientPaintTransformType

public GradientPaintTransformType getGradientPaintTransformType()
Get the ChartShape GradientPaintTransformType type.

Specified by:
getGradientPaintTransformType in interface IChartShape
Returns:
GradientPaintTransformType

getBorderPaint

public java.awt.Paint getBorderPaint()
Get the ChartShape border Paint.

Specified by:
getBorderPaint in interface IChartShape
Returns:
Paint The border Paint.

getBorderStroke

public java.awt.Stroke getBorderStroke()
Get the ChartShape border Stroke.

Specified by:
getBorderStroke in interface IChartShape
Returns:
Stroke The border Stroke.

isDrawBorder

public boolean isDrawBorder()
A flag that controls whether or not the shape border is visible.

Specified by:
isDrawBorder in interface IChartShape
Returns:
boolean A boolean flag.

isFillShape

public boolean isFillShape()
A flag that controls whether or not the shape is filled.

Specified by:
isFillShape in interface IChartShape
Returns:
boolean A boolean flag.

setDrawBorder

public void setDrawBorder(boolean flag)
Sets a flag that controls whether or not the shape border is visible and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setDrawBorder in interface IChartShape
Parameters:
flag - boolean true,draw the border of the shape;false otherwise.

setFillPaint

public void setFillPaint(java.awt.Paint paint)
Sets the shape fill Paint and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setFillPaint in interface IChartShape
Parameters:
paint - Paint The ChartShape fill Paint(null not permitted).

setFillShape

public void setFillShape(boolean bFillShape)
Sets a flag that controls whether or not the shape is filled,and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setFillShape in interface IChartShape
Parameters:
bFillShape - boolean true,fill the shape;false otherwise.

setGradientPaintTransformType

public void setGradientPaintTransformType(GradientPaintTransformType transformType)
Sets the ChartShape GradientPaintTransformType type,use only when fill Paint is GradientPaint,and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setGradientPaintTransformType in interface IChartShape
Parameters:
transformType - GradientPaintTransformType The gradient paint transform type (null permitted).

setBorderPaint

public void setBorderPaint(java.awt.Paint paint)
Sets the shape border Paint and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setBorderPaint in interface IChartShape
Parameters:
paint - Paint The ChartShape border Paint(null not permitted).

setBorderStroke

public void setBorderStroke(java.awt.Stroke stroke)
Sets the shape border Stroke and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setBorderStroke in interface IChartShape
Parameters:
stroke - Stroke The ChartShape border Stroke(null not permitted).

setRotate

public void setRotate(double theta)
Concatenates the current Graphics2D Transform with a rotation transform,and sends a ChartShapeChangeEvent to all registered listeners. Subsequent rendering is rotated by the specified radians relative to the previous origin.This is equivalent to calling transform(R), where R is an AffineTransform represented by the following matrix:
                [   cos(theta)    -sin(theta)    0   ]
                [   sin(theta)     cos(theta)    0   ]
                [       0              0         1   ]
 
Rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis.

Specified by:
setRotate in interface IChartShape
Parameters:
theta - the angle of rotation in radians.

setSelected

public void setSelected(boolean flag)
Sets a flag controls whether or not the shape is selected,and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setSelected in interface IChartShape
Parameters:
flag - boolean A boolean.

getRotate

public double getRotate()
Return the angle of rotation in radians.

Specified by:
getRotate in interface IChartShape
Returns:
double The angle of rotation in radians.

isSelected

public boolean isSelected()
Returns whether or not this shape is selected.

Specified by:
isSelected in interface IChartShape
Returns:
boolean A boolean.

getOriginTooltipShape

public java.awt.Shape getOriginTooltipShape()
Returns the original tooltip shape.

Specified by:
getOriginTooltipShape in interface IChartShape
Returns:
Shape A shape (null permitted).

setOriginTooltipShape

public void setOriginTooltipShape(java.awt.Shape shape)
Sets the original tooltip shape.

Specified by:
setOriginTooltipShape in interface IChartShape
Parameters:
shape - Shape A shape (null permitted).

getTooltipShape

public java.awt.Shape getTooltipShape()
Returns the tooltip shape.

Specified by:
getTooltipShape in interface IChartShape
Returns:
Shape A shape (null permitted).

getTooltipShapeTranslatePoint

protected java.awt.geom.Point2D getTooltipShapeTranslatePoint()
Returns the translate point of tooltip shape.

Returns:
Point2D The translate point (null permitted).

getTooltipShapeRotate

protected double getTooltipShapeRotate()
Returns the angle of rotation of the tooltip shape.

Returns:
double The angle of rotation (in radians).

setSelectRectWidth

public void setSelectRectWidth(double width)
Sets the anchor rectangle width of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
width - double The width,must greater than 0.

setSelectAnchorPaint

public void setSelectAnchorPaint(java.awt.Paint selectAnchorPaint)
Sets the anchor Paint of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
selectAnchorPaint - Paint null not permitted.

getSelectRectWidth

public double getSelectRectWidth()
Returns the anchor rectangle width of selected ChartShape.

Returns:
double The width,must greater than 0.

getSelectAnchorPaint

public java.awt.Paint getSelectAnchorPaint()
Returns the anchor Paint of selected ChartShape.

Returns:
Paint

contains

public boolean contains(java.awt.geom.Point2D point)
Tests if a specified Point2D is inside the boundary of the ChartShape.

Specified by:
contains in interface IChartShape
Parameters:
point - Point2D The position,maybe a mouse point (null not permitted).
Returns:
boolean Returns true if this shape contains point(x,y),otherwise return false.

contains

public boolean contains(double x,
                        double y)
Tests if a specified Point2D is inside the boundary of the ChartShape.

Specified by:
contains in interface IChartShape
Parameters:
x - double the x position.
y - double the y position.
Returns:
boolean Returns true if this shape contains point(x,y),otherwise return false.

calculateTransformedShape

protected abstract void calculateTransformedShape()
Calculate the transformed shape.


setMargin

public void setMargin(RectangleInsets margin)
Sets the margin around the inside of the block,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
margin - RectangleInsets The margin around the inside of the block (null permitted).

getMargin

public RectangleInsets getMargin()
Returns the margin around the inside of the block.

Returns:
RectangleInsets The margin around the inside of the block.

setSelectRectAlpha

public void setSelectRectAlpha(float selectRectAlpha)
Sets the anchor rectangle alpha value of selected ChartShape,and sends a ChartShapeChangeEvent to all registered listeners.

Parameters:
selectRectAlpha - float The alpha value,must be a floating point number in the inclusive range [0.0,1.0].

getSelectRectAlpha

public float getSelectRectAlpha()
Returns the anchor rectangle alpha value of selected ChartShape.

Returns:
float The alpha valuea floating point number in the inclusive range [0.0,1.0].

setFillAlpha

public void setFillAlpha(float alpha)
The alpha value for fill background and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setFillAlpha in interface IChartShape
Parameters:
alpha - float The alpha transparency (in the range 0.0f to 1.0f, where 0.0f is fully transparent, and 1.0f is fully opaque).

getFillAlpha

public float getFillAlpha()
Returns the alpha value for fill background.

Specified by:
getFillAlpha in interface IChartShape
Returns:
float The alpha value.

setTooltipText

public void setTooltipText(java.lang.String tooltip)
Sets the tooltip text.

Specified by:
setTooltipText in interface IChartShape
Parameters:
tooltip - String The tooltip text (null permitted).

getTooltipText

public java.lang.String getTooltipText()
Returns the tooltip text.

Specified by:
getTooltipText in interface IChartShape
Returns:
String The tooltip text (maybe null).

setURL

public void setURL(java.lang.String url)
Sets the URL text.

Specified by:
setURL in interface IChartShape
Parameters:
url - String The URL text (null permitted).

getURL

public java.lang.String getURL()
Returns the URL text.

Specified by:
getURL in interface IChartShape
Returns:
String The URL text (maybe null).

getBound

public java.awt.geom.Rectangle2D getBound()
Returns a Rectangle2D that completely encloses the Shape.

Specified by:
getBound in interface IChartShape
Returns:
Rectangle2D A Rectangle2D that completely encloses the Shape.

drawBackground

protected void drawBackground(java.awt.Graphics2D g2,
                              java.awt.Shape drawArea)
Draw background color.

Parameters:
g2 - Graphics2D The specified Graphics context.
drawArea - Shape The draw area.

drawBorder

protected void drawBorder(java.awt.Graphics2D g2,
                          java.awt.Shape drawArea)
Draw border.

Parameters:
g2 - Graphics2D The specified Graphics context.
drawArea - Shape The draw area.

getLockPoint

public java.awt.geom.Point2D getLockPoint()
Returns the lock coordinates of this shape.

Specified by:
getLockPoint in interface IChartShape
Returns:
Point2D The coordinate.

getData

public IChartData getData()
Returns the IChartData object.

Specified by:
getData in interface IChartShape
Returns:
IChartData (maybe null).

setData

public void setData(IChartData data)
Sets the IChartData object and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setData in interface IChartShape
Parameters:
data - IChartData (null permitted).

isVisible

public boolean isVisible()
Returns whether or not the shape is visible.

Specified by:
isVisible in interface IChartShape
Returns:
boolean A boolean.

setVisible

public void setVisible(boolean flag)
Sets whether or not the shape is visible and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setVisible in interface IChartShape
Parameters:
flag - boolean A boolean.

getShapeDrawType

public ChartShapeDrawType getShapeDrawType()
Returns the chart shape draw type.

Specified by:
getShapeDrawType in interface IChartShape
Returns:
ChartShapeDrawType (never null).

setShapeDrawType

public void setShapeDrawType(ChartShapeDrawType drawType)
Sets the chart shape draw type and sends a ChartShapeChangeEvent to all registered listeners.

Specified by:
setShapeDrawType in interface IChartShape
Parameters:
drawType - ChartShapeDrawType (null not permitted).

addChangeListener

public void addChangeListener(IChartShapeChangeListener listener)
Registers an object for notification of changes to the IChartShape.

Specified by:
addChangeListener in interface IChartShape
Parameters:
listener - the object to register.

removeChangeListener

public void removeChangeListener(IChartShapeChangeListener listener)
Deregisters an object for notification of changes to the IChartShape.

Specified by:
removeChangeListener in interface IChartShape
Parameters:
listener - the object to deregister.

removeAllChangeListener

public void removeAllChangeListener()
Deregisters all object for notification of changes to the IChartShape.

Specified by:
removeAllChangeListener in interface IChartShape

hasListener

public boolean hasListener(IChartShapeChangeListener listener)
Returns true if the specified object is registered with the IChartShape as a listener. Most applications won't need to call this method, it exists mainly for use by unit testing code.

Parameters:
listener - the listener.
Returns:
A boolean.

forceChartShapeChanged

public void forceChartShapeChanged()
If the data object of IChartShape changed and no event triggered,set IChartShape changed by this method.

Specified by:
forceChartShapeChanged in interface IChartShape

chartShapeChanged

public void chartShapeChanged(ChartShapeChangeEvent event)
Receives notification of an IChartShape change event.

Specified by:
chartShapeChanged in interface IChartShapeChangeListener
Parameters:
event - Information about the event.

setShapeChange

public void setShapeChange(IShapeChange change)
Sets the IShapeChange object.

Specified by:
setShapeChange in interface IChartShape
Parameters:
change - IShapeChange IShapeChange object (null permitted).

getHotspotPolyCoords

public java.lang.String getHotspotPolyCoords(java.awt.Shape parentClipArea)
Returns a string containing the coordinates for a given shape.This string is intended for use in an image map.

Specified by:
getHotspotPolyCoords in interface IChartShape
Parameters:
parentClipArea - Shape The clip area.
Returns:
String The coordinates of hotspot (maybe null).

getHotspotType

public java.lang.String getHotspotType()
Returns the shape type of hotspot.

Specified by:
getHotspotType in interface IChartShape
Returns:
String The shape type of hotspot,the value can be poly or rect.

getHotspotShape

protected abstract java.awt.Shape getHotspotShape()
Returns the hotspot shape.

Returns:
Shape The hotspot shape (maybe null).

getShapeChange

public IShapeChange getShapeChange()
Returns the IShapeChange object.

Specified by:
getShapeChange in interface IChartShape
Returns:
IShapeChange IShapeChange object (maybe null).

drawSelect

protected abstract void drawSelect(java.awt.Graphics2D g2)
Draw the selected ChartShape on a Java 2d graphics device(such as the screen or the printer).

Parameters:
g2 - Graphics2D the graphics device (such as the screen or the printer) (null not permitted).

fireChartShapeChanged

protected void fireChartShapeChanged()
Notifies all registered listeners that the chart shape has changed.


notifyListeners

protected void notifyListeners(ChartShapeChangeEvent event)
Notifies all registered listeners that the chart shape has changed.

Parameters:
event - contains information about the event that triggered the notification.

drawAnchorByPoints

protected void drawAnchorByPoints(java.awt.Graphics2D g2,
                                  double translateX,
                                  double translateY,
                                  java.awt.geom.Point2D.Double[] points)
Draw anchor by the coordinates of points.

Parameters:
g2 - Graphics2D the graphics device (such as the screen or the printer) (null not permitted).
translateX - double The x offset value, the other point coordinates are relative to this coordinate.
translateY - double The y offset value, the other point coordinates are relative to this coordinate.
points - Double[] The coordinates of draw anchor.

fillShape

protected void fillShape(java.awt.Graphics2D g2,
                         java.awt.Paint fillPaint,
                         java.awt.Shape shape)
Fill this shape.

Parameters:
g2 - Graphics2D the graphics device (such as the screen or the printer) (null not permitted).
fillPaint - Paint The fill paint (null not permitted).
shape - Shape The fill shape (null not permitted).

drawShapeBorder

protected void drawShapeBorder(java.awt.Graphics2D g2,
                               java.awt.Shape shape)
Outline this shape.

Parameters:
g2 - Graphics2D the graphics device (such as the screen or the printer) (null not permitted).
shape - Shape The fill shape (null not permitted).

beforeDraw

protected void beforeDraw(java.awt.Graphics2D g2)
Call the beforeDraw method of class IShapeChange.

Parameters:
g2 - Graphics2D The graphics device (such as the screen or the printer) (null not permitted).

afterDraw

protected void afterDraw(java.awt.Graphics2D g2)
Call the afterDraw method of class IShapeChange.

Parameters:
g2 - Graphics2D The graphics device (such as the screen or the printer) (null not permitted).

getHotspotType

protected java.lang.String getHotspotType(java.awt.Shape shape)
Returns the shape type of hotspot.

Parameters:
shape - Shape The shape (null permitted).
Returns:
String The shape type of hotspot,the value can be circ or poly or rect.

equals

public boolean equals(java.lang.Object obj)
Indicates if some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
object a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.