com.ijchart.xychart.chartinfo
Class AxisShapeCollection

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

public class AxisShapeCollection
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
AxisShapeCollection()
          无参数构造器.
 
Method Summary
 void addAxisLabelShape(IChartShape axisLabelShape)
          增加一个坐标轴标签图形.
 void addAxisLine3DShape(IChartShape line3DShape)
          增加一个3D类型的坐标轴线区域.
 void addAxisLineShape(IChartShape axisLineShape)
          增加一个坐标轴轴线图形.
 void addTickLabelShape(IChartShape labelShape)
          增加一个坐标轴刻度标签图形.
 void addTickMarkShape(IChartShape markShape)
          增加一个坐标轴刻度值图形.
 void clearAxisLabelShapes()
          删除所有的坐标轴标签图形.
 void clearAxisLine3DShapes()
          删除所有的3D类型的坐标轴线区域图形.
 void clearAxisLineShapes()
          删除所有的坐标轴轴线图形.
 void clearSelectedShapes()
          把所有的图形置为非选中状态.
 void clearShapesListener()
          清除所有的图形的监听器.
 void clearTickMarkShapes()
          删除所有的坐标轴刻度值图形.
 java.lang.Object clone()
          覆盖clone方法.
 void copyShapes(AxisShapeCollection axisShapes)
          增加一个坐标轴的所有图形到本对象.
 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 getAxisLabelShapes()
          返回坐标轴标签图形集合,此集合不可修改.
 java.util.List getAxisLine3DShapes()
          返回3D类型的坐标轴线区域图形集合,此集合不可修改.
 java.util.List getAxisLineShapes()
          返回坐标轴轴线图形集合,此集合不可修改.
 RectangleEdge getEdge()
          返回坐标轴的位置.
 java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
          返回图形的热点Area.
 java.util.List getTickLabelShapes()
          返回坐标轴刻度标签图形集合,此集合不可修改.
 java.util.List getTickMarkShapes()
          返回坐标轴刻度值图形集合,此集合不可修改.
 int hashCode()
          覆盖hashCode方法.
 void setEdge(RectangleEdge edge)
          设置坐标轴位置.
 java.lang.String toString()
          覆盖toString方法.
 void translate(double x, double y)
          移动所有图形(axisLine3DShape除外)的原点到点(x,y).

Method Detail

getEdge

public RectangleEdge getEdge()
返回坐标轴的位置.

Returns:
RectangleEdge 坐标轴位置.

setEdge

public void setEdge(RectangleEdge edge)
设置坐标轴位置.

Parameters:
edge - RectangleEdge 坐标轴位置.

getAxisLabelShapes

public java.util.List getAxisLabelShapes()
返回坐标轴标签图形集合,此集合不可修改.

Returns:
List 坐标轴标签图形集合(不为null).

clearAxisLabelShapes

public void clearAxisLabelShapes()
删除所有的坐标轴标签图形.


addAxisLabelShape

public void addAxisLabelShape(IChartShape axisLabelShape)
增加一个坐标轴标签图形.

Parameters:
axisLabelShape - IChartShape 坐标轴标签图形(可为null).

addAxisLineShape

public void addAxisLineShape(IChartShape axisLineShape)
增加一个坐标轴轴线图形.

Parameters:
axisLineShape - IChartShape 坐标轴轴线图形(可为null).

getAxisLineShapes

public java.util.List getAxisLineShapes()
返回坐标轴轴线图形集合,此集合不可修改.

Returns:
List 坐标轴轴线图形集合(不为null).

clearAxisLineShapes

public void clearAxisLineShapes()
删除所有的坐标轴轴线图形.


addAxisLine3DShape

public void addAxisLine3DShape(IChartShape line3DShape)
增加一个3D类型的坐标轴线区域.

Parameters:
line3DShape - IChartShape 3D类型的坐标轴线区域 (可为null).

getAxisLine3DShapes

public java.util.List getAxisLine3DShapes()
返回3D类型的坐标轴线区域图形集合,此集合不可修改.

Returns:
List 3D类型的坐标轴线区域图形集合 (不为null).

clearAxisLine3DShapes

public void clearAxisLine3DShapes()
删除所有的3D类型的坐标轴线区域图形.


addTickLabelShape

public void addTickLabelShape(IChartShape labelShape)
增加一个坐标轴刻度标签图形.

Parameters:
labelShape - IChartShape 坐标轴刻度标签图形 (可为null).

getTickLabelShapes

public java.util.List getTickLabelShapes()
返回坐标轴刻度标签图形集合,此集合不可修改.

Returns:
IChartShape 坐标轴刻度标签图形集合(不为null),此集合不可修改.

addTickMarkShape

public void addTickMarkShape(IChartShape markShape)
增加一个坐标轴刻度值图形.

Parameters:
markShape - IChartShape 坐标轴刻度值图形 (可为null).

getTickMarkShapes

public java.util.List getTickMarkShapes()
返回坐标轴刻度值图形集合,此集合不可修改.

Returns:
IChartShape 坐标轴刻度值图形集合(不为null),此集合不可修改.

clearTickMarkShapes

public void clearTickMarkShapes()
删除所有的坐标轴刻度值图形.


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)
移动所有图形(axisLine3DShape除外)的原点到点(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

copyShapes

public void copyShapes(AxisShapeCollection axisShapes)
增加一个坐标轴的所有图形到本对象.

Parameters:
axisShapes - AxisShapeCollection 坐标轴图形集合 (可为null).

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.