com.ijchart.xychart.chartinfo
Class TitleShapeCollection

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

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

Title: IJChart

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

用于存储标题上的图形的集合类.

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
TitleShapeCollection()
          构造器.
 
Method Summary
 void addTitleShape(IChartShape shape)
          增加一个标题图形.
 void clearSelectedShapes()
          把所有的图形置为非选中状态.
 void clearShapesListener()
          清除所有的图形的监听器.
 void clearTitleShapes()
          删除所有的标题图形.
 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 getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
          返回图形的热点Area.
 java.util.List getTitleShapes()
          返回所有的标题图形的集合,此集合不可修改.
 int hashCode()
          覆盖hashCode方法.
 java.lang.String toString()
          覆盖toString方法.
 void translate(double x, double y)
          移动所有图形的原点到点(x,y).

Method Detail

addTitleShape

public void addTitleShape(IChartShape shape)
增加一个标题图形.

Parameters:
shape - IChartShape 标题图形 (可为null)

getTitleShapes

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

Returns:
IChartShape 标题图形集合(不为null),此集合不可修改.

clearTitleShapes

public void clearTitleShapes()
删除所有的标题图形.


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.