com.ijchart.xychart.chartinfo
Class PlotShapeCollection

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

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

Title: IJChart

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

用于存储plot区域的图形集合.

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
PlotShapeCollection()
          无参数构造器.
 
Method Summary
 void addAnnotationShape(AnnotationShapeCollection annotationShapes)
          增加一个annotation类图形.
 void addRenderShape(RenderShapeCollection renderShapes)
          增加一个render类图形.
 void addXAxisShape(AxisShapeCollection xAxisShape)
          增加X轴的图形集合.
 void addYAxisShape(AxisShapeCollection yAxisShape)
          增加Y轴的图形集合.
 void clearAnnotationShapes()
          删除所有的annotation类的图形.
 void clearRenderShapes()
          删除所有的render类的图形.
 void clearSelectedShapes()
          把所有的图形置为非选中状态.
 void clearShapesListener()
          清除所有的图形的监听器.
 void clearXAxisShape()
          删除所有的X轴图形集合.
 void clearYAxisShape()
          删除所有的Y轴包含的图形.
 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 getAllRenderShapes()
          返回render类的图形集合,此集合不可修改.
 java.util.List getAnnotationShapes()
          返回annotation类的图形集合,此集合不可修改.
 IChartShape getBackgroundImageShape()
          返回背景图片图形.
 IChartShape getBackgroundShape()
          返回背景图片图形.
 IChartShape getBorderShape()
          设置边框图形.
 java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
          返回图形的热点Area.
 IChartShape getNoDataMessageShape()
          返回没有数据时的消息图形.
 RenderShapeCollection getRenderShapes()
          返回第0个render图形集合.
 RenderShapeCollection getRenderShapes(int index)
          返回指定索引的render图形集合.
 AxisShapeCollection getXAxisShape()
          返回第0个X轴的图形集合.
 AxisShapeCollection getXAxisShape(int index)
          返回指定索引值的X轴的图形集合.
 java.util.List getXAxisShapeList()
          返回X轴图形集合.此集合不可修改.
 IChartShape getXCrossShape()
          返回x方向的十字线.
 AxisShapeCollection getYAxisShape()
          返回第0个Y轴的图形集合.
 AxisShapeCollection getYAxisShape(int index)
          返回指定索引值的Y轴的图形集合.
 java.util.List getYAxisShapeList()
          返回Y轴图形集合.此集合不可修改.
 IChartShape getYCrossShape()
          返回y方向的十字线.
 IChartShape getZeroDomainBaseline()
          返回domain坐标轴0值线.
 IChartShape getZeroValueBaseline()
          返回value坐标轴0值线.
 int hashCode()
          覆盖hashCode方法.
 void setBackgroundImageShape(IChartShape shape)
          设置背景图片图形.
 void setBackgroundShape(IChartShape shape)
          设置背景图片图形.
 void setBorderShape(IChartShape borderShape)
          设置边框图形.
 void setNoDataMessageShape(IChartShape shape)
          设置没有数据时的消息图形.
 void setXCrossShape(IChartShape shape)
          设置x方向的十字线.
 void setYCrossShape(IChartShape shape)
          设置y方向的十字线.
 void setZeroDomainBaseline(IChartShape shape)
          设置domain坐标轴0值线.
 void setZeroValueBaseline(IChartShape shape)
          设置value坐标轴0值线.
 java.lang.String toString()
          覆盖toString方法.
 void translate(double x, double y)
          移动所有图形的原点到点(x,y).

Method Detail

getBackgroundShape

public IChartShape getBackgroundShape()
返回背景图片图形.

Returns:
IChartShape 背景图片图形(可能为null).

setBackgroundShape

public void setBackgroundShape(IChartShape shape)
设置背景图片图形.

Parameters:
shape - IChartShape 背景图片图形(可为null).

getBackgroundImageShape

public IChartShape getBackgroundImageShape()
返回背景图片图形.

Returns:
IChartShape 背景图片图形(可能为null).

setBackgroundImageShape

public void setBackgroundImageShape(IChartShape shape)
设置背景图片图形.

Parameters:
shape - IChartShape 背景图片图形(可为null).

getNoDataMessageShape

public IChartShape getNoDataMessageShape()
返回没有数据时的消息图形.

Returns:
IChartShape 背景图片图形(可能为null).

setNoDataMessageShape

public void setNoDataMessageShape(IChartShape shape)
设置没有数据时的消息图形.

Parameters:
shape - IChartShape 背景图片图形(可为null).

setBorderShape

public void setBorderShape(IChartShape borderShape)
设置边框图形.

Parameters:
borderShape - IChartShape 边框图形 (可为null).

getBorderShape

public IChartShape getBorderShape()
设置边框图形.

Returns:
IChartShape 边框图形 (可能为null).

addXAxisShape

public void addXAxisShape(AxisShapeCollection xAxisShape)
增加X轴的图形集合.

Parameters:
xAxisShape - AxisShapeCollection X轴的图形集合.

clearXAxisShape

public void clearXAxisShape()
删除所有的X轴图形集合.


getXAxisShape

public AxisShapeCollection getXAxisShape()
返回第0个X轴的图形集合.

Returns:
AxisShapeCollection x轴的图形集合.

getXAxisShape

public AxisShapeCollection getXAxisShape(int index)
返回指定索引值的X轴的图形集合.

Parameters:
index - int 索引值.
Returns:
AxisShapeCollection

getXAxisShapeList

public java.util.List getXAxisShapeList()
返回X轴图形集合.此集合不可修改.

Returns:
List 所有的X轴图形集合

addYAxisShape

public void addYAxisShape(AxisShapeCollection yAxisShape)
增加Y轴的图形集合.

Parameters:
yAxisShape - AxisShapeCollection Y轴的所有图形集合.

clearYAxisShape

public void clearYAxisShape()
删除所有的Y轴包含的图形.


getYAxisShape

public AxisShapeCollection getYAxisShape()
返回第0个Y轴的图形集合.

Returns:
AxisShapeCollection y轴的图形集合.

getYAxisShape

public AxisShapeCollection getYAxisShape(int index)
返回指定索引值的Y轴的图形集合.

Parameters:
index - int 索引值.
Returns:
AxisShapeCollection

getYAxisShapeList

public java.util.List getYAxisShapeList()
返回Y轴图形集合.此集合不可修改.

Returns:
List Y轴图形集合

addRenderShape

public void addRenderShape(RenderShapeCollection renderShapes)
增加一个render类图形.

Parameters:
renderShapes - RenderShapeCollection render类的图形集合.

getRenderShapes

public RenderShapeCollection getRenderShapes()
返回第0个render图形集合.

Returns:
RenderShapeCollection render图形集合.

getRenderShapes

public RenderShapeCollection getRenderShapes(int index)
返回指定索引的render图形集合.

Parameters:
index - int 索引值.
Returns:
RenderShapeCollection render图形集合.

getAllRenderShapes

public java.util.List getAllRenderShapes()
返回render类的图形集合,此集合不可修改.

Returns:
List render类的图形集合(不为null),此集合不可修改.

clearRenderShapes

public void clearRenderShapes()
删除所有的render类的图形.


addAnnotationShape

public void addAnnotationShape(AnnotationShapeCollection annotationShapes)
增加一个annotation类图形.

Parameters:
annotationShapes - AnnotationShapeCollection annotation类的图形集合.

getAnnotationShapes

public java.util.List getAnnotationShapes()
返回annotation类的图形集合,此集合不可修改.

Returns:
List annotation类的图形集合(不为null),此集合不可修改.

clearAnnotationShapes

public void clearAnnotationShapes()
删除所有的annotation类的图形.


getXCrossShape

public IChartShape getXCrossShape()
返回x方向的十字线.

Returns:
IChartShape x方向的十字线 (可为null).

setXCrossShape

public void setXCrossShape(IChartShape shape)
设置x方向的十字线.

Parameters:
shape - IChartShape x方向的十字线 (可为null).

getYCrossShape

public IChartShape getYCrossShape()
返回y方向的十字线.

Returns:
IChartShape y方向的十字线 (可为null).

setYCrossShape

public void setYCrossShape(IChartShape shape)
设置y方向的十字线.

Parameters:
shape - IChartShape y方向的十字线 (可为null).

getZeroDomainBaseline

public IChartShape getZeroDomainBaseline()
返回domain坐标轴0值线.

Returns:
IChartShape domain坐标轴0值线 (可为null).

setZeroDomainBaseline

public void setZeroDomainBaseline(IChartShape shape)
设置domain坐标轴0值线.

Parameters:
shape - IChartShape domain坐标轴0值线 (可为null).

getZeroValueBaseline

public IChartShape getZeroValueBaseline()
返回value坐标轴0值线.

Returns:
IChartShape value坐标轴0值线 (可为null).

setZeroValueBaseline

public void setZeroValueBaseline(IChartShape shape)
设置value坐标轴0值线.

Parameters:
shape - IChartShape value坐标轴0值线 (可为null).

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.