|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.chartinfo.AbstractShapeCollection
public abstract class AbstractShapeCollection
Title: IJChart
Description: a chart library for the Java(tm) platform.
提供图形集合的抽象实现.Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
protected int |
shapeIdSequence
图形的序列号,第一个为0. |
Constructor Summary | |
---|---|
AbstractShapeCollection()
构造器. |
Method Summary | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
void |
addChangeListener(IChartShapeChangeListener listener)
注册监听图形 IChartShape 对象变化的监听者对象.
|
||||||||||||||||
protected void |
addHotspotArea(java.util.List result,
IChartShape shape,
IAreaFragment fragment,
ChartShapeDrawType drawType)
计算图形的热点area. |
||||||||||||||||
protected void |
addHotspotArea(java.util.List result,
java.util.List shapes,
IAreaFragment fragment,
ChartShapeDrawType drawType)
计算图形的热点area. |
||||||||||||||||
void |
chartShapeChanged(ChartShapeChangeEvent event)
接收到图形对象变化的通知. |
||||||||||||||||
protected void |
clearSelectedShape(IChartShape shape)
清除图形的选中状态. |
||||||||||||||||
protected void |
clearSelectedShape(java.util.List shapes)
清除所有的图形的选中状态. |
||||||||||||||||
protected void |
clearShapesListener(java.util.List shapes)
清除所有的图形的监听器. |
||||||||||||||||
protected void |
clip(java.awt.Graphics2D g2)
设置剪切区域. |
||||||||||||||||
java.lang.Object |
clone()
覆盖clone方法. |
||||||||||||||||
protected void |
draw(java.awt.Graphics2D g2,
java.util.List shapes)
依次绘制集合中每一个图形. |
||||||||||||||||
boolean |
equals(java.lang.Object obj)
测试两个对象是否相等. |
||||||||||||||||
protected IChartShape |
findShape(java.util.List shapes,
java.awt.geom.Point2D point,
ChartShapeDrawType drawType)
在图形集合shapes里寻找包含point的图形. |
||||||||||||||||
protected void |
fireChartShapeChanged(IChartShape shape)
通过所有监听器图形发生了变化. |
||||||||||||||||
java.awt.geom.Rectangle2D |
getDrawArea()
返回图形集合所共同的区域. |
||||||||||||||||
java.util.List |
getHotspotAreas(java.util.List drawTypes,
IAreaFragment fragment)
返回图形的热点Area. |
||||||||||||||||
int |
hashCode()
覆盖hashCode方法. |
||||||||||||||||
boolean |
hasListener(IChartShapeChangeListener listener)
返回指定的listener是否存在,本方法主要用于单元测试. |
||||||||||||||||
protected void |
notifyListeners(ChartShapeChangeEvent event)
通知所有注册的监听器图形发生了变化. |
||||||||||||||||
void |
removeAllChangeListener()
清除所有的图形 IChartShape 对象变化监听者对象.
|
||||||||||||||||
void |
removeChangeListener(IChartShapeChangeListener listener)
删除注册的图形 IChartShape 对象变化监听者对象.
|
||||||||||||||||
protected void |
removeShapesListener(java.util.List shapes,
IChartShapeChangeListener listener)
清除所有的图形的监听器. |
||||||||||||||||
void |
resetShapeIdSequence()
重置图形序列号为0. |
||||||||||||||||
protected void |
restoreClip(java.awt.Graphics2D g2)
恢复clip区域. |
||||||||||||||||
void |
setDrawArea(java.awt.geom.Rectangle2D drawArea)
对于一个系列的图形,它们共同属于某个区域,通过记录这个区域,可以在处理鼠标事件的时候提供更快的速度,不需要 对所有的图形判断是否属于被鼠标选中,可选通过此区域来缩小寻找的范围. |
||||||||||||||||
java.lang.String |
toString()
覆盖toString方法. |
||||||||||||||||
void |
translate(double x,
double y)
移动所有图形(axisLine3DShape除外)的原点到点(x,y).
AbstractShapeCollectionpublic AbstractShapeCollection()
setDrawAreapublic void setDrawArea(java.awt.geom.Rectangle2D drawArea)
getDrawAreapublic java.awt.geom.Rectangle2D getDrawArea()
resetShapeIdSequencepublic void resetShapeIdSequence()
isDrawAreaContainspublic boolean isDrawAreaContains(java.awt.geom.Point2D point)
addChangeListenerpublic void addChangeListener(IChartShapeChangeListener listener)
removeChangeListenerpublic void removeChangeListener(IChartShapeChangeListener listener)
removeAllChangeListenerpublic void removeAllChangeListener()
hasListenerpublic boolean hasListener(IChartShapeChangeListener listener)
notifyListenersprotected void notifyListeners(ChartShapeChangeEvent event)
fireChartShapeChangedprotected void fireChartShapeChanged(IChartShape shape)
chartShapeChangedpublic void chartShapeChanged(ChartShapeChangeEvent event)
translatepublic void translate(double x, double y)
getHotspotAreaspublic java.util.List getHotspotAreas(java.util.List drawTypes, IAreaFragment fragment)
clipprotected void clip(java.awt.Graphics2D g2)
restoreClipprotected void restoreClip(java.awt.Graphics2D g2)
findShapeprotected IChartShape findShape(java.util.List shapes, java.awt.geom.Point2D point, ChartShapeDrawType drawType)
drawprotected void draw(java.awt.Graphics2D g2, java.util.List shapes)
translateprotected void translate(double x, double y, java.util.List shapes)
clearShapesListenerprotected void clearShapesListener(java.util.List shapes)
clearSelectedShapeprotected void clearSelectedShape(IChartShape shape)
clearSelectedShapeprotected void clearSelectedShape(java.util.List shapes)
removeShapesListenerprotected void removeShapesListener(java.util.List shapes, IChartShapeChangeListener listener)
addHotspotAreaprotected void addHotspotArea(java.util.List result, IChartShape shape, IAreaFragment fragment, ChartShapeDrawType drawType)
addHotspotAreaprotected void addHotspotArea(java.util.List result, java.util.List shapes, IAreaFragment fragment, ChartShapeDrawType drawType)
clonepublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
hashCodepublic int hashCode()
equalspublic boolean equals(java.lang.Object obj)
toStringpublic java.lang.String toString()
|