|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.plot.AbstractPlot
com.ijchart.xychart.plot.AbstractAxisPlot
com.ijchart.xychart.plot.CategoryPlot
public class CategoryPlot
Title: IJChart
Description: a chart library for the Java(tm) platform.
用于显示两个坐标轴分别是CategoryAxis
,
AbstractValueAxis
的plot.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static boolean |
DEFAULT_CATEGORY_CROSSHAIR_LOCKED_ON_DATA
缺省控制十字线是否自动锁定数据点. |
static boolean |
DEFAULT_CATEGORY_CROSSHAIR_VISIBLE
缺省控制category轴方向的十字线是否可见. |
Constructor Summary | |
---|---|
CategoryPlot()
缺省的构造器. |
|
CategoryPlot(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
AbstractCategoryRender render)
构造一个新的对象. |
Method Summary | |
---|---|
java.lang.Object |
clone()
克隆本对象. |
void |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
ChartShapeCollection chartShapes)
绘制图表的plot区域,子类需要实现此方法. |
protected java.awt.geom.Rectangle2D |
drawAxes(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
PlotShapeCollection shapeCollection)
绘制所有的坐标轴. |
boolean |
equals(java.lang.Object obj)
测试两个对象是否相等. |
CategoryAxis |
getCategoryAxis()
返回第0个CategoryAxis对象. |
CategoryAxis |
getCategoryAxis(int index)
根据索引返回CategoryAxis对象. |
CategoryAxis |
getCategoryAxisByRenderIndex(int renderIndex)
根据索引返回category坐标轴对象. |
int |
getCategoryAxisCount()
返回category坐标轴的个数. |
RectangleEdge |
getCategoryAxisEdge()
计算第0个category坐标轴的边界位置. |
int |
getCategoryAxisIndex(CategoryAxis axis)
返回指定category坐标轴的索引. |
AxisLocation |
getCategoryAxisLocation()
返回索引值为0的category坐标轴的位置. |
AxisLocation |
getCategoryAxisLocation(int index)
返回指定索引的category坐标轴的位置. |
protected CategoryAxis |
getNotNullCategoryAxis(int index)
根据索引寻找不为null的Category坐标轴,寻找方法为从当前索引值开始先往前找,如果找不到则再往后寻找. |
protected AbstractValueAxis |
getNotNullValueAxis(int index)
根据索引寻找不为null的Value坐标轴,寻找方法为从当前索引值开始先往前找,如果找不到则再往后寻找. |
protected RectangleEdge |
getNotNullValueAxisEdge(int index)
根据索引寻找不为null的value坐标轴的边界,寻找方法为从当前索引值开始先往前找, 如果找不到则再往后寻找. |
PlotType |
getPlotType()
返回描述此plot的字符串. |
AbstractCategoryRender |
getRender()
返回第0个render. |
AbstractCategoryRender |
getRender(int index)
根据索引值获取render. |
int |
getRenderIndex(AbstractCategoryRender render)
返回指定render的索引,没有找到则返回-1. |
java.util.Collection |
getRenders()
返回render集合,此集合不可修改. |
int |
hashCode()
计算hashcode. |
boolean |
isDomainZoomable()
返回domain坐标轴是否可缩放. |
void |
setCategoryAxes(CategoryAxis[] axes)
设置plot的category坐标轴,已经存在的对象会被覆盖,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setCategoryAxes(CategoryAxis[] axes,
int startIndex)
设置plot的category坐标轴,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setCategoryAxis(CategoryAxis axis)
设置plot的category坐标轴,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setCategoryAxis(int index,
CategoryAxis axis)
设置category坐标轴,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setCategoryAxis(int index,
CategoryAxis axis,
boolean notify)
设置category坐标轴,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setCategoryAxisLocation(AxisLocation location)
设置category坐标轴的位置. |
void |
setCategoryAxisLocation(int index,
AxisLocation location)
设置索引为index的category坐标轴的位置. |
void |
setRender(AbstractCategoryRender render)
设置第0个render. |
void |
setRender(AbstractCategoryRender render,
boolean notify)
设置第0个render,如果需要会向所有监听器发送 PlotChangeEvent 事件.
|
void |
setRender(int index,
AbstractCategoryRender render)
设定指定索引值的render,并向所有监听器发送 PlotChangeEvent 事件.
|
void |
setRender(int index,
AbstractCategoryRender render,
boolean notify)
设定指定索引值的render,并向所有监听器发送 PlotChangeEvent 事件.
|
java.lang.String |
toString()
覆盖toString()方法. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.listener.IRenderChangeListener |
---|
renderChanged |
Field Detail |
---|
public static final boolean DEFAULT_CATEGORY_CROSSHAIR_VISIBLE
public static final boolean DEFAULT_CATEGORY_CROSSHAIR_LOCKED_ON_DATA
Constructor Detail |
---|
public CategoryPlot()
public CategoryPlot(CategoryAxis categoryAxis, AbstractValueAxis valueAxis, AbstractCategoryRender render)
categoryAxis
- CategoryAxis category坐标轴 (可为null).
valueAxis
- AbstractValueAxis value坐标轴 (可为null).
render
- AbstractCategoryRender 绘制数据区的类 (可为null).
Method Detail |
---|
public int getCategoryAxisCount()
public CategoryAxis getCategoryAxis()
public CategoryAxis getCategoryAxis(int index)
index
- 索引值.
public void setCategoryAxis(CategoryAxis axis)
PlotChangeEvent
事件.
axis
- CategoryAxis category坐标轴对象 (不可为null).
public CategoryAxis getCategoryAxisByRenderIndex(int renderIndex)
renderIndex
- render的索引值.
public void setCategoryAxis(int index, CategoryAxis axis)
PlotChangeEvent
事件.
index
- int 索引值,必须大于等于0.
axis
- CategoryAxis category坐标轴 (不可为null).
public void setCategoryAxis(int index, CategoryAxis axis, boolean notify)
PlotChangeEvent
事件.
index
- int 索引值,必须大于等于0.
axis
- CategoryAxis category坐标轴 (不可为null).
notify
- boolean 是否通知监听器.
public void setCategoryAxes(CategoryAxis[] axes)
PlotChangeEvent
事件.
axes
- CategoryAxis[] category坐标轴数组 (不可为null).
public void setCategoryAxes(CategoryAxis[] axes, int startIndex)
PlotChangeEvent
事件.
axes
- CategoryAxis[] category坐标轴数组 (不可为null).
startIndex
- int 索引的开始值,startIndex之前的对象不会被覆盖,必须大于等于0.
public int getCategoryAxisIndex(CategoryAxis axis)
axis
- category坐标轴对象 (不可为null).
public AbstractCategoryRender getRender()
public AbstractCategoryRender getRender(int index)
index
- 索引值,必须大于等于0.
public java.util.Collection getRenders()
getRenders
in class AbstractPlot
public void setRender(AbstractCategoryRender render)
render
- AbstractCategoryRender render (不可为null).
public void setRender(AbstractCategoryRender render, boolean notify)
PlotChangeEvent
事件.
render
- AbstractCategoryRender render (不可为null).
notify
- boolean 是否通知监听器.
public void setRender(int index, AbstractCategoryRender render)
PlotChangeEvent
事件.
index
- int 索引值,必须大于等于0.
render
- AbstractCategoryRender render (不可为null).
public void setRender(int index, AbstractCategoryRender render, boolean notify)
PlotChangeEvent
事件.
index
- int 索引值,必须大于等于0.
render
- AbstractCategoryRender render (不可为null).
notify
- boolean 是否通知监听器.
public void setRenders(AbstractCategoryRender[] renders, int startIndex)
PlotChangeEvent
事件.
renders
- AbstractCategoryRender[] render数组 (不可为null).
startIndex
- int 索引的开始值,startIndex之前的对象不会被覆盖,必须大于等于0.
public int getRenderIndex(AbstractCategoryRender render)
render
- AbstractCategoryRender render (不可为null).
public AxisLocation getCategoryAxisLocation()
public AxisLocation getCategoryAxisLocation(int index)
index
- 索引值,必须大于等于0.
public void setCategoryAxisLocation(AxisLocation location)
location
- 坐标轴的位置 (不可为null).
public void setCategoryAxisLocation(int index, AxisLocation location)
index
- 索引,必须大于等于0.
location
- 坐标轴位置 (不可为null).
public RectangleEdge getCategoryAxisEdge()
public RectangleEdge getCategoryAxisEdge(int index)
index
- 坐标轴的索引值,必须大于等于0.
public boolean isDomainZoomable()
isDomainZoomable
in interface IZoomable
isDomainZoomable
in class AbstractPlot
public void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartShapeCollection chartShapes)
draw
in class AbstractPlot
g2
- Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea
- Rectangle2D plot绘制区域 (不可为null).
chartShapes
- ChartShapeCollection chart区域图形集合 (不可为null).
protected java.awt.geom.Rectangle2D drawAxes(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, PlotShapeCollection shapeCollection)
g2
- 图形设备(打印机或屏幕) (不可为null).
plotArea
- plot绘制区域 (不可为null).
shapeCollection
- PlotShapeCollection plot区域图形集合 (不可为null).
protected CategoryAxis getNotNullCategoryAxis(int index)
index
- int 索引值.
protected AbstractValueAxis getNotNullValueAxis(int index)
index
- int 索引值.
protected RectangleEdge getNotNullValueAxisEdge(int index)
index
- int 索引值.
public PlotType getPlotType()
getPlotType
in class AbstractPlot
public boolean equals(java.lang.Object obj)
equals
in class AbstractAxisPlot
obj
- 要比较的对象 (可为null).
public int hashCode()
hashCode
in class AbstractAxisPlot
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractAxisPlot
java.lang.CloneNotSupportedException
- if the cloning is not supported.public java.lang.String toString()
toString
in class AbstractAxisPlot
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |