com.ijchart.xychart.axis
Interface IAxis

All Known Implementing Classes:
AbstractAxis, AbstractNumberValueAxisWithType, AbstractValueAxis, BoxAndWhiskerValueAxis, CategoryAxis, CategoryAxis3D, DateValueAxis, ErrorValueAxis, GranttValueAxis, GroupCategoryAxis, GroupStackedNumberValueAxis, IntervalValueAxis, IntervalXNumberYBaseValueAxis, IntervalXYValueAxis, NumberValueAxis, NumberValueAxis3D, OHLCDateAxis, OHLCValueAxis, Stacked3DNumberValueAxis, StackedNumberValueAxis, StackedXYBarValueAxis, StackedXYValueAxis, StatisticalNumberValueAxis, SymbolValueAxis, WaterfallNumberValueAxis, WindValueAxis, XYNumberValueAxis, XYZNumberValueAxis, YIntervalValueAxis, ZNumberValueAxis

public interface IAxis

Title: IJChart

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

用于绘制图表中的X轴和Y轴的接口,各种类型的X轴或Y轴都需要实现此接口.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.

Method Summary
 double calculateAxisSpace(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D maxAxisArea, RectangleEdge edge)
          计算绘制坐标轴所需要的宽度或高度.
 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集合中.
 double getFixedAxisSpace()
          返回固定的坐标轴绘制宽度或高度.
 

Method Detail

draw

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集合中.

Parameters:
g2 - Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea - Rectangle2D 图表的plot区域.
axisArea - Rectangle2D 剩余的空白区域.
edge - RectangleEdge 坐标轴的位置.
shapeCollection - AxisShapeCollection 坐标轴图形集合.
alignEdge - boolean 本标志控制如果实际绘制区域小于坐标轴区域,是否自动靠边界.
Returns:
double 轴实际绘制的宽度或高度.

calculateAxisSpace

double calculateAxisSpace(java.awt.Graphics2D g2,
                          java.awt.geom.Rectangle2D plotArea,
                          java.awt.geom.Rectangle2D maxAxisArea,
                          RectangleEdge edge)
计算绘制坐标轴所需要的宽度或高度.

Parameters:
g2 - Graphics2D 图形设备(打印机或屏幕) (不可为null).
plotArea - Rectangle2D 图表的plot区域.
maxAxisArea - Rectangle2D 坐标轴的最大区域,肯定小于plotArea.
edge - RectangleEdge 坐标轴的位置.
Returns:
double 宽度或高度.

getFixedAxisSpace

double getFixedAxisSpace()
返回固定的坐标轴绘制宽度或高度.

Returns:
double 固定的坐标轴绘制区域 (可为null).