|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.axis.AbstractAxis
com.ijchart.xychart.axis.category.CategoryAxis
com.ijchart.xychart.axis.category.GroupCategoryAxis
public class GroupCategoryAxis
Title: IJChart
Description: a chart library for the Java(tm) platform.
以分组形式显示分类值的坐标值.Copyright: Copyright (c) 2013
Company:
Field Summary |
---|
Fields inherited from class com.ijchart.xychart.axis.category.CategoryAxis |
---|
acategoryWidth, categoryLabelPosition, DEFAULT_CATEGORY_MARGIN, DEFAULT_HORIZONTAL_ALIGNMENT, DEFAULT_MAX_CATEGORY_LABEL_LINE |
Constructor Summary | |
---|---|
GroupCategoryAxis(AbstractCategoryRender categoryRender,
IMatrixDataset dataset)
由数据集构造对象. |
|
GroupCategoryAxis(AbstractCategoryRender categoryRender,
java.lang.String label,
IMatrixDataset dataset)
由坐标轴标签和数据集构造对象. |
Method Summary | |
---|---|
void |
addSubCategoryAxis(CategoryAxis categoryAxis)
增加一个子坐标轴,并向所有监听器发送 AxisChangeEvent 事件.
|
double |
calculateAxisSpace(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
计算绘制坐标轴所需要的宽度或高度. |
java.lang.Object |
clone()
克隆本对象. |
double |
draw(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
boolean alignEdge)
在图表的plot区域(plotArea)绘制X轴或Y轴.图表中的所有图形存放在shapeCollection集合中. |
protected double |
drawTickLabel(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D plotArea,
java.awt.geom.Rectangle2D axisArea,
RectangleEdge edge,
AxisShapeCollection shapeCollection,
double cursor)
绘制坐标轴上的刻度值的标签. |
boolean |
equals(java.lang.Object obj)
测试本对象是否和另一个对象相等. |
AbstractCategoryRender |
getCategoryRender()
返回分类类型的绘制器. |
protected java.lang.String[] |
getFormatedTickLabels(java.awt.Graphics2D g2,
java.awt.geom.Rectangle2D maxAxisArea,
RectangleEdge edge)
返回格式化后的在坐标轴上显示的刻度值. |
java.util.List |
getSubCategoryAxes()
返回子分类坐标轴的集合,此集合不可修改. |
int |
getSubCategoryAxisCount()
返回子分类坐标轴的个数. |
int |
hashCode()
计算hashcode. |
void |
removeAllSubCategoryAxes()
删除所有的子分类坐标轴. |
CategoryAxis |
removeSubCategoryAxis(int index)
根据索引删除指定的子分类坐标轴,并向所有监听器发送 AxisChangeEvent 事件.
|
void |
setCategoryRender(AbstractCategoryRender categoryRender)
设置分类类型的绘制器,并向所有监听器发送 AxisChangeEvent
事件.
|
Methods inherited from class com.ijchart.xychart.axis.category.CategoryAxis |
---|
addCategoryMarker, categoryToJava2D, clearCategoryMarkers, createChartShape, drawGridLine, drawTickMark, getCategoryLabelHorizontalAlignment, getCategoryMargin, getCategoryMarkers, getLabelMaxDrawWidth, getMaximumCategoryLabelLines, markerChanged, removeCategoryMarker, setCategoryLabelHorizontalAlignment, setCategoryMargin, setMaximumCategoryLabelLines |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.ijchart.xychart.listener.IMarkerChangeListener |
---|
markerChanged |
Constructor Detail |
---|
public GroupCategoryAxis(AbstractCategoryRender categoryRender, IMatrixDataset dataset)
categoryRender
- AbstractCategoryRender 分类类型的绘制器 (不可为null).
dataset
- IMatrixDataset 二维矩阵数据集 (不可为null).
public GroupCategoryAxis(AbstractCategoryRender categoryRender, java.lang.String label, IMatrixDataset dataset)
categoryRender
- AbstractCategoryRender 分类类型的绘制器 (不可为null).
label
- 坐标轴标签.
dataset
- IMatrixDataset 二维矩阵数据集 (不可为null).
Method Detail |
---|
public void addSubCategoryAxis(CategoryAxis categoryAxis)
AxisChangeEvent
事件.
categoryAxis
- CategoryAxis 子坐标轴 (可为null).
public int getSubCategoryAxisCount()
public java.util.List getSubCategoryAxes()
public CategoryAxis removeSubCategoryAxis(int index)
AxisChangeEvent
事件.
index
- int 索引值.
public void removeAllSubCategoryAxes()
public AbstractCategoryRender getCategoryRender()
public void setCategoryRender(AbstractCategoryRender categoryRender)
AxisChangeEvent
事件.
categoryRender
- AbstractCategoryRenderpublic double calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D maxAxisArea, RectangleEdge edge)
calculateAxisSpace
in interface IAxis
calculateAxisSpace
in class AbstractAxis
g2
- Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea
- Rectangle2D 图表的plot区域.
maxAxisArea
- Rectangle2D 坐标轴的最大区域,肯定小于plotArea.
edge
- RectangleEdge 坐标轴的位置.
public double draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D axisArea, RectangleEdge edge, AxisShapeCollection shapeCollection, boolean alignEdge)
draw
in interface IAxis
draw
in class AbstractAxis
g2
- Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea
- Rectangle2D 图表的plot区域.
axisArea
- Rectangle2D 剩余的空白区域.
edge
- RectangleEdge 坐标轴的位置.
shapeCollection
- AxisShapeCollection 坐标轴图形集合.
alignEdge
- boolean 本标志控制如果实际绘制区域小于坐标轴区域,是否自动靠边界.
protected double drawTickLabel(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D axisArea, RectangleEdge edge, AxisShapeCollection shapeCollection, double cursor)
drawTickLabel
in class CategoryAxis
g2
- Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea
- Rectangle2D 图表的plot区域.
axisArea
- Rectangle2D 剩余的空白区域.
edge
- RectangleEdge 坐标轴的位置.
shapeCollection
- AxisShapeCollection 坐标轴图形集合.
cursor
- 光标的位置.
protected java.lang.String[] getFormatedTickLabels(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D maxAxisArea, RectangleEdge edge)
getFormatedTickLabels
in class CategoryAxis
g2
- Graphics2D 图形设备(打印机或屏幕),可为null.
maxAxisArea
- Rectangle2D 坐标轴的最大区域,肯定小于plotArea (可为null).
edge
- RectangleEdge 坐标轴的位置 (可为null).
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class CategoryAxis
java.lang.CloneNotSupportedException
- if some component of the axis does
not support cloning.public boolean equals(java.lang.Object obj)
equals
in class CategoryAxis
obj
- 要测试的对象 (可为null).
public int hashCode()
hashCode
in class CategoryAxis
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |