com.ijchart.xychart.chartinfo
Class AnnotationShapeCollection

java.lang.Object
  extended by com.ijchart.xychart.chartinfo.AbstractShapeCollection
      extended by com.ijchart.xychart.chartinfo.AnnotationShapeCollection
All Implemented Interfaces:
IShapeCollection, IChartShapeChangeListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener

public class AnnotationShapeCollection
extends AbstractShapeCollection
implements java.lang.Cloneable, java.io.Serializable

Title: IJChart

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

用于存储注释(Annotation)图形的集合类.

Copyright: Copyright (c) 2013

Company:

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

Field Summary
 
Fields inherited from class com.ijchart.xychart.chartinfo.AbstractShapeCollection
shapeIdSequence
 
Constructor Summary
AnnotationShapeCollection()
          构造器.
 
Method Summary
 void addAnnotationShape(IChartShape shape)
          增加一个标注(Annotation)图形.
 void clearAnnotationShapes()
          删除所有的标注(Annotation)图形.
 void clearSelectedShapes()
          把所有的图形置为非选中状态.
 void clearShapesListener()
          清除所有的图形的监听器.
 java.lang.Object clone()
          覆盖clone方法.
 void draw(java.awt.Graphics2D g2)
          依次绘制集合中每一个图形.
 boolean equals(java.lang.Object obj)
          测试两个对象是否相等.
 IChartShape findChartShape(java.awt.geom.Point2D point, ChartShapeDrawType drawType)
          返回包含此point点的图形.
 java.util.List getAnnotationShapes()
          返回所有的标注(Annotation)图形的集合,此集合不可修改.
 java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
          返回图形的热点Area.
 int hashCode()
          覆盖hashCode方法.
 java.lang.String toString()
          覆盖toString方法.
 void translate(double x, double y)
          移动所有图形的原点到点(x,y).

Method Detail

addAnnotationShape

public void addAnnotationShape(IChartShape shape)
增加一个标注(Annotation)图形.

Parameters:
shape - IChartShape 注释(Annotation)图形 (可为null)

getAnnotationShapes

public java.util.List getAnnotationShapes()
返回所有的标注(Annotation)图形的集合,此集合不可修改.

Returns:
IChartShape 注释(Annotation)图形集合(不为null),此集合不可修改.

clearAnnotationShapes

public void clearAnnotationShapes()
删除所有的标注(Annotation)图形.


draw

public void draw(java.awt.Graphics2D g2)
依次绘制集合中每一个图形.

Specified by:
draw in interface IShapeCollection
Parameters:
g2 - Graphics2D 图形设备(打印机或屏幕) (不可为null).

translate

public void translate(double x,
                      double y)
移动所有图形的原点到点(x,y).

Specified by:
translate in interface IShapeCollection
Overrides:
translate in class AbstractShapeCollection
Parameters:
x - double x坐标.
y - double y坐标.

clearShapesListener

public void clearShapesListener()
清除所有的图形的监听器.

Specified by:
clearShapesListener in interface IShapeCollection

clearSelectedShapes

public void clearSelectedShapes()
把所有的图形置为非选中状态.

Specified by:
clearSelectedShapes in interface IShapeCollection

findChartShape

public IChartShape findChartShape(java.awt.geom.Point2D point,
                                  ChartShapeDrawType drawType)
返回包含此point点的图形.

Specified by:
findChartShape in interface IShapeCollection
Parameters:
point - Point2D 要测试的点 (不可为null).
drawType - ChartShapeDrawType 图形的绘制类型 (可为null).
Returns:
IChartShape 图形 (可为null).

getHotspotAreas

public java.util.List getHotspotAreas(java.util.List drawTypes,
                                      IAreaFragment fragment)
返回图形的热点Area.

Specified by:
getHotspotAreas in interface IShapeCollection
Overrides:
getHotspotAreas in class AbstractShapeCollection
Parameters:
drawTypes - List 显示热点的图形类型.
fragment - IAreaFragment 实现接口IAreaFragment的对象,(可为null)
Returns:
List 图形的热点Area (不为null).

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
覆盖clone方法.

Overrides:
clone in class AbstractShapeCollection
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the axis does not support cloning.

hashCode

public int hashCode()
覆盖hashCode方法.

Overrides:
hashCode in class AbstractShapeCollection
Returns:
hashcode值.

equals

public boolean equals(java.lang.Object obj)
测试两个对象是否相等.

Overrides:
equals in class AbstractShapeCollection
Parameters:
obj - 要比较的对象
Returns:
true or false.

toString

public java.lang.String toString()
覆盖toString方法.

Overrides:
toString in class AbstractShapeCollection
Returns:
A string representation of the object.