public abstract class AxisGlyph extends SpecialGlyph
限定符和类型 | 字段和说明 |
---|---|
protected double |
axisGridLength |
protected double |
axisLabelWidth |
protected double |
axisLength |
protected boolean |
axisReversed |
protected java.awt.geom.Rectangle2D |
bounds |
static int |
DEFAULT_SAMPLING_TIME |
static int |
DEFAULT_UNIT |
protected java.awt.geom.Dimension2D |
endLabelDim |
protected java.text.Format |
format
坐标轴的数据格式
|
protected boolean |
isArrowShow
是否显示箭头
|
protected boolean |
isCustomMaxValue
最大值
|
protected boolean |
isCustomMinValue
最小值
|
protected boolean |
isLabelWrap |
protected boolean |
isShowAxisLabel |
protected int |
labelNumber |
protected java.awt.Color |
lineColor
坐标轴线的颜色
|
protected int |
lineStyle
坐标轴线的样式
|
protected static int |
MAIN_TICK_LENGTH |
protected java.awt.Color |
mainGridColor |
protected int |
mainGridStyle
主网格线
|
protected java.math.BigDecimal |
mainUnit |
protected static double |
MAX_AXIS_LABEL_HEIGHT |
protected static double |
MAX_AXIS_LABEL_WIDTH |
protected double |
maxValue |
static double |
MIN_TICK_LENGTH |
protected double |
minValue |
protected java.awt.geom.Point2D |
originPoint |
protected static double |
PIE_ANGLE |
protected java.awt.geom.Rectangle2D |
plotLastBounds
保存最终的PlotBounds 以便于最后的比较相对坐标 警戒线的布局
|
protected java.awt.geom.Rectangle2D |
plotZeroBounds
保存原始的PlotBounds, 未经任何改变 警戒线的布局
|
protected int |
position
界面上无设置相关 *
设置包括两个地方:
坐标轴设置
其他属性设置旋转
|
protected static int |
SEC_TICK_LENGTH |
protected int |
secTickMarkType |
protected java.awt.geom.Dimension2D |
startLabelDim |
protected TextAttr |
textAttr
文本属性
|
protected Cubic |
threeDBase |
protected static float |
TICK_WIDTH |
protected int |
tickMarkType |
protected java.awt.geom.Dimension2D |
titleDim |
protected TextGlyph |
titleGlyph |
protected static int |
TOP_AND_DOWN_GAP |
protected double |
unitLength |
protected static int |
VERTICAL_ANGLE |
构造器和说明 |
---|
AxisGlyph() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
addAxisLabelJSON(JSONObject js,
Repository repo) |
protected void |
addMinMaxValue(JSONObject js,
Repository repo) |
protected void |
calBoundsWithMoreLabel4Cate(java.awt.geom.Rectangle2D plotBounds)
处理多层级的 标签高度计算.
|
void |
calculateAxisGlyph(java.awt.geom.Rectangle2D bounds)
用于计算AxisGlyph中所有和长度, 位置有关的信息
|
protected abstract void |
calculateAxisLengthUnit()
计算坐标轴长度等 属性.
|
void |
calculateBoundsWidthOrientationAndTitle(java.awt.geom.Rectangle2D plotBounds,
double cateLabelWidth,
java.awt.geom.Dimension2D titleDim)
预计算纵轴 标签高度 和 横轴标签宽度 对Plot高度 和宽度的 影响
|
protected int |
calculateLocationWithEllipsis(java.lang.String labelString,
int resolution,
double maxWidth) |
protected void |
calculateTitleDimesion(int resolution) |
protected java.awt.geom.Rectangle2D |
calculatorTitleBounds(int resolution)
计算坐标轴标题的Bounds 相对AxisGlyph的绝对位置.
|
protected java.lang.String |
changeAxisLabelStringWithLabelBounds(java.lang.String labelString,
java.awt.geom.Rectangle2D labelBounds,
int resolution) |
void |
dealPlotBoundsWithAxisLabel(java.awt.geom.Rectangle2D plotBounds,
int resolution)
kunsnat: 根据坐标轴的labelWidth, 坐标轴的标题, 调整plotBounds, 然后再去calculateAxisGlyph
ValueAxisGlyph的警戒线 (位置左或者右), 同边 , 不同边(另一个坐标轴 不用考虑.先剪掉边距)
axisUnitFont = 10; 刻度的显示单位 左右两侧的时候: 上部 bottom的时候 下侧.
|
void |
dealPlotBoundsWithAxisTitle(java.awt.geom.Rectangle2D plotBounds,
int resolution)
根据坐标轴标题调整plotBounds
|
void |
dealPlotBoundsWithLabel(java.awt.geom.Rectangle2D plotBounds,
int resolution)
根据坐标轴标签调整plotBounds
|
void |
dealPlotBoundsWithLabelInHorizontal(java.awt.geom.Rectangle2D lastPlotBounds)
处理和坐标轴方向水平的文本, 比如 横轴的 文本在宽度上是否影响 Plot的宽度, 纵轴的文本在高度上是否影响Plot的高度.
|
protected double |
dealWithPlotBounds() |
void |
draw(java.awt.Graphics g,
int resolution)
画出坐标轴的相关元素
|
void |
draw4ThreeD(java.awt.Graphics g,
int resolution) |
protected void |
drawAfterPlot4AlertValues(java.awt.Graphics2D g2d,
int resolution)
在绘图区之后 画警戒线
|
void |
drawArrow(java.awt.Graphics2D g2d,
java.awt.geom.Point2D p0,
java.awt.geom.Point2D p1)
画坐标轴箭头
|
abstract void |
drawAxisGrid(java.awt.Graphics g)
画坐标轴的网格线
|
protected abstract void |
drawAxisLine(java.awt.Graphics g,
int resolution)
画坐标轴 线
|
protected void |
drawAxisTitle(java.awt.Graphics g,
int resolution)
画坐标轴标题
|
protected void |
drawLabel(java.awt.Graphics g,
double value,
double offset,
java.lang.String labelString,
java.awt.geom.GeneralPath labelPath,
int resolution) |
protected void |
drawLabel(java.awt.Graphics g,
double value,
double offset,
java.lang.String labelString,
int resolution)
最终的坐标轴标签画法
|
protected void |
drawLabelWrapWhenNeed(java.awt.Graphics g,
double value,
double offset,
java.lang.String labelString,
int resolution)
显示方式换行(显示不下的时候换行)
|
protected void |
drawTickLine(java.awt.Graphics g,
java.awt.geom.Line2D line,
java.awt.BasicStroke stroke)
用于画刻度的刻度线
|
protected abstract void |
drawTicks(java.awt.Graphics g,
int resolution)
画出刻度相关.
|
void |
drawWithOutAlert(java.awt.Graphics g,
int resolution) |
boolean |
equals(java.lang.Object ob) |
double |
get2ValueLength(double start,
double end)
得到线上两点之间的距离.kunsnat: 用getPointInBounds 处理超过最大值的越界情况
|
abstract double |
getArrowValue()
获取坐标轴在箭头处,也即坐标尾部的值
|
protected double |
getAxisGridLength()
返回网格线的长度
|
protected java.awt.geom.Dimension2D |
getAxisLabelDim(java.lang.String label,
int resolution)
计算坐标轴标签的Dim
|
double |
getAxisLabelWidth()
返回坐标轴标签 + 主要Tick + Axis.LINE_LABEL_GAP的长度
|
protected double |
getAxisLabelWidth(java.lang.String label,
int resolution)
计算坐标轴的文字宽度(与走坐标轴的位置相关,如果在坐标轴位置为top或者bottom,那么返回标签的高度)
|
double |
getAxisLength()
获取坐标轴的长度
|
abstract java.lang.String |
getAxisName() |
java.lang.String |
getAxisType()
返回坐标轴类型 用于在界面操作时 识别不同的坐标轴
|
java.math.BigDecimal |
getBigDecimalMainUnit()
返回精度的主要刻度单位
|
protected java.awt.geom.Rectangle2D |
getBottomTitleBounds(java.awt.geom.Dimension2D titleDim,
int titlePosition) |
java.awt.geom.Rectangle2D |
getBounds()
返回坐标轴的边界
|
protected double |
getCateLabelWidth(java.awt.geom.Rectangle2D plotBounds,
int resolution) |
abstract double |
getCrossValue()
此坐标轴在zero点对应的值是多少,
|
double |
getCrossValueInPlot()
plot上 轴的交叉点的值.
|
Cubic |
getCubic()
返回三维格式
|
double |
getDivideUnit() |
java.text.Format |
getFormat()
返回标签数字格式
|
java.awt.geom.Line2D[] |
getGridLine(double value)
返回对应值的网格线数组
|
abstract java.lang.String |
getJSAxisType() |
protected java.awt.geom.Rectangle2D |
getLabelBounds(double value,
double offset,
java.lang.String labelString,
int resolution) |
protected java.awt.geom.Rectangle2D |
getLabelBounds4WrapWhenAxisLeftOrRight(double value,
double offset,
java.lang.String labelString,
int resolution) |
int |
getLabelNumber()
返回标签间隔数目
|
protected double |
getLeftRightY(int titlePosition) |
protected java.awt.geom.Rectangle2D |
getLeftTitleBounds(java.awt.geom.Dimension2D titleDim,
int titlePosition) |
java.awt.Color |
getLineColor()
返回坐标轴线的颜色
|
int |
getLineStyle()
返回坐标轴线型
|
java.awt.Color |
getMainGridColor()
返回主网格线的颜色
|
int |
getMainGridStyle()
返回主刻度线的类型
|
double |
getMainUnit()
返回主要刻度单位 (double类型)
|
protected abstract double |
getMaxLabelWidthAndInitStartEndLabelDim(int resolution)
得到坐标轴标签中 占用位置最大的标签的尺寸
|
double |
getMaxValue()
获取坐标轴的最大值
|
double |
getMinValue()
获取坐标轴的最小值
|
java.awt.geom.Point2D |
getOrigin()
获取坐标轴的原始位置
|
protected double |
getOtherPoint2ValueLength(java.awt.geom.Point2D startPoint,
java.awt.geom.Point2D endPoint) |
protected java.awt.geom.Line2D |
getOtherPositionGridLine(java.awt.geom.Point2D centerP) |
protected java.awt.geom.Rectangle2D |
getOtherPositionLabelBounds(java.awt.geom.Point2D centerP,
double width,
double height,
double margin) |
protected java.awt.geom.Line2D |
getOtherPositionTickLine(java.awt.geom.Point2D centerP,
java.awt.geom.Point2D bottomP,
java.awt.geom.Point2D leftP) |
protected java.awt.geom.Rectangle2D |
getOtherPositionTitleBounds(java.awt.geom.Dimension2D dim,
int titlePosition) |
java.awt.geom.Rectangle2D |
getPlotLastBounds() |
java.awt.geom.Rectangle2D |
getPlotZeroBounds() |
java.awt.geom.Point2D |
getPoint2D(double value)
得到坐标轴上值所对应的坐标轴点.
|
java.awt.geom.Point2D |
getPointInBounds(double value)
得到坐标轴上某个值所处的位置点
可以在这里设置指数坐标, ValueAxis
|
int |
getPosition()
返回坐标轴位置(界面上不提供设置)
|
abstract double |
getPreLeftWidth4DataSheet(int resolution)
返回左轴可能的预留宽度 标签 + 标题 + 警戒值
|
protected java.awt.geom.Rectangle2D |
getRightTitleBounds(java.awt.geom.Dimension2D titleDim,
int titlePosition) |
int |
getSecTickMarkType()
返回主刻度线的类型
|
double |
getSecUnit()
返回次要刻度单位
|
java.awt.Shape |
getShape()
返回坐标轴占据的Shape
|
AxisUnitType |
getShowUnit()
返回 刻度显示单位 (只有数字轴 NumberAxis 支持此功能)
|
TextAttr |
getTextAttr()
返回标签文本格式
|
Cubic |
getThreeDBase()
返回底座的cubic
|
int |
getTickIndex4Value(int value)
返回数值对应的 刻度序号.
|
protected double |
getTickLengthShow()
返回刻度 展示的长度
|
protected java.awt.geom.Line2D |
getTickLine(double value,
int tickLength,
int tickMarkType)
获取主要刻度线
|
protected java.awt.geom.Line2D |
getTickLineByCenterPoint(java.awt.geom.Point2D centerP,
int tickLength,
int tickMarkType) |
int |
getTickMarkType()
返回主刻度线的类型
|
int |
getTickSamplingTime() |
java.awt.geom.Dimension2D |
getTitleDim()
返回坐标轴标题的dim
|
protected double |
getTopBottomX(int titlePosition) |
protected java.awt.geom.Rectangle2D |
getTopTitleBounds(java.awt.geom.Dimension2D titleDim,
int titlePosition) |
double |
getUnitLen()
获取坐标轴单位的长度
|
java.lang.String |
getVanAxisStringType() |
boolean |
hasAxisReversed()
返回是否设置了坐标轴逆序
|
protected void |
init(java.awt.geom.Rectangle2D plotBounds)
初始化坐标轴的边界
|
abstract void |
initMinMaxValue(double autoMin,
double autoMax)
初始化坐标轴的最大值和最小值
|
boolean |
isArrowShow()
返回是否显示箭头
|
boolean |
isCustomMainUnit()
返回是否自定义主要刻度单位
|
protected boolean |
isCustomMaxValue()
获取坐标轴是否采用自定义最大值
|
protected boolean |
isCustomMinValue()
获取坐标轴是否采用的自定义最小值
|
protected boolean |
isCustomSecUnit()
获取是否自定义次要坐标轴的刻度单位
|
boolean |
isDrawBetweenTick()
返回是否将标签画在刻度中间 (界面上不提供设置, 只是通过图表类型来提前做出判断)
|
boolean |
isHorizontal() |
boolean |
isLog()
返回是否对数刻度 (只有数字轴NumberAxis支持功能)
|
boolean |
isPercentage()
返回是否百分比 (只有数字轴NumberAxis支持此功能)
|
protected boolean |
isRevertAndArrow() |
boolean |
isShowAxisLabel()
返回是否显示坐标轴标签
|
boolean |
isZoom()
坐标轴是否可以缩放
|
void |
notShowAllAttr()
特定情况下 不展示坐标轴标签 标题 刻度 , 目前只针对数据表显示时, 分类轴不显示.
|
void |
setArrowShow(boolean isArrowShow)
设置是否显示箭头
|
protected void |
setAttr(java.awt.geom.Rectangle2D bounds,
java.awt.geom.Point2D axisZero,
double axisLength,
double axisGridLength) |
protected void |
setAxisGridLength(double axisGridLength)
设置网格线的长度
|
void |
setAxisLabelWidth(double axisLabelWidth)
设置坐标轴标签 + 主要Tick + Axis.LINE_LABEL_GAP的长度
|
void |
setAxisLength(double len)
设置坐标轴的长度
|
void |
setAxisReversed(boolean reversed)
设置是否需要坐标轴逆序
|
void |
setAxisType(java.lang.String axisType)
设置坐标轴 类型 用于在界面操作时 识别不同的坐标轴
|
void |
setBounds(java.awt.geom.Rectangle2D bounds)
设置坐标轴的边界
|
void |
setCubic(Cubic cubic)
设置三维格式 坐标轴的三维格式 被用来当作背景
|
void |
setCustomMainUnit(boolean isCustomMainUnit)
设置是否自定义主要刻度单位
|
void |
setCustomMaxValue(boolean isCustomMaxValue)
设置坐标轴是否采用自定义最大值
|
void |
setCustomMinValue(boolean isCustomMinValue)
设置是否自定义坐标轴的最小值
|
void |
setCustomSecUnit(boolean isCustomSecUnit)
是否自定义次要坐标轴的刻度单位
|
void |
setDrawBetweenTick(boolean drawBetweenTick)
设置是否将标签画在刻度中间 (界面上不提供设置, 只是通过图表类型来提前做出判断)
|
void |
setFormat(java.text.Format format)
设置标签数字格式
|
void |
setLabelNumber(int labelNumber)
设置标签间隔数目
|
void |
setLabelWrap(boolean isLabelWrap) |
void |
setLineColor(java.awt.Color lineColor)
设置坐标轴线颜色
|
void |
setLineStyle(int lineStyle)
设置坐标轴线的线型
|
void |
setLog(boolean isLog)
设置是否对数刻度 (只有数字轴NumberAxis支持功能)
|
void |
setMainGridColor(java.awt.Color mainGridColor)
设置主网格线的颜色
|
void |
setMainGridStyle(int mainGridStyle)
设置主网格线的线型
|
void |
setMainUnit(java.math.BigDecimal tickLength)
设置主要刻度单位
|
void |
setMaxValue(double maxValue)
设置坐标轴的最大值
|
void |
setMinMaxValue(double minValue,
double maxValue)
同时设置最大最小值
|
void |
setMinValue(double minValue)
设置坐标轴的最小值
|
protected void |
setOrigin(java.awt.geom.Point2D zero)
记录坐标轴的原始位置
|
void |
setPlotZeroBounds(java.awt.geom.Rectangle2D plotZeroBounds)
设置坐标轴在压缩绘图区之前, 最初的绘图区边界.
|
void |
setPosition(int position)
设置坐标轴位置 (界面上不提供设置)
|
void |
setSecTickMarkType(int secTickMarkType)
设置次刻度线的类型
|
void |
setSecUnit(double smallTickLength)
设置次要刻度单位
|
void |
setShowAxisLabel(boolean isShowAxisLabel)
设置是否显示坐标轴标签
|
void |
setTextAttr(TextAttr textAttr)
设置标签文本格式
|
void |
setThreeDBase(Cubic base)
设置底座的cubic
|
void |
setTickMarkType(int tickMarkType)
设置主刻度线的类型
|
void |
setTitleGlyph(TextGlyph titleGlyph)
设置坐标轴的标题文本Glyph
|
void |
setUnitLen(double length)
设置坐标轴单位的长度
|
void |
setZoom(boolean isZoom)
设置坐标轴是否可以缩放
|
protected boolean |
shouldBeHeight()
根据坐标轴的方向是横着的还是竖着的
|
protected boolean |
shouldDrawTickLine(java.awt.geom.Line2D line) |
JSONObject |
toJSONObject(Repository repo)
转为json数据
|
JSONObject |
toVanJSONObject(Repository repo) |
protected java.lang.String |
value2String(double value)
用于得到坐标轴数值.数据格式后的string
|
clone, selectableChildren
public static final int DEFAULT_UNIT
protected static final double PIE_ANGLE
protected static final int VERTICAL_ANGLE
protected static final float TICK_WIDTH
protected static final int MAIN_TICK_LENGTH
protected static final int SEC_TICK_LENGTH
protected static final double MAX_AXIS_LABEL_HEIGHT
protected static final double MAX_AXIS_LABEL_WIDTH
protected static final int TOP_AND_DOWN_GAP
protected java.awt.geom.Dimension2D titleDim
protected transient java.awt.geom.Point2D originPoint
protected transient double unitLength
protected transient double axisLength
protected transient double axisGridLength
public static final double MIN_TICK_LENGTH
public static final int DEFAULT_SAMPLING_TIME
protected transient java.awt.geom.Rectangle2D plotZeroBounds
protected transient java.awt.geom.Rectangle2D plotLastBounds
protected transient java.awt.geom.Rectangle2D bounds
protected transient double axisLabelWidth
protected transient java.awt.geom.Dimension2D startLabelDim
protected transient java.awt.geom.Dimension2D endLabelDim
protected int tickMarkType
protected int secTickMarkType
protected int position
protected boolean axisReversed
protected int mainGridStyle
protected java.awt.Color mainGridColor
protected java.awt.Color lineColor
protected int lineStyle
protected TextAttr textAttr
protected java.text.Format format
protected int labelNumber
protected boolean isShowAxisLabel
protected boolean isArrowShow
protected boolean isCustomMinValue
protected double minValue
protected boolean isCustomMaxValue
protected double maxValue
protected java.math.BigDecimal mainUnit
protected TextGlyph titleGlyph
protected transient Cubic threeDBase
protected boolean isLabelWrap
public void notShowAllAttr()
public abstract void initMinMaxValue(double autoMin, double autoMax)
autoMin
- 最小值autoMax
- 最大值public abstract void drawAxisGrid(java.awt.Graphics g)
g
- Graphicsprotected void drawAfterPlot4AlertValues(java.awt.Graphics2D g2d, int resolution)
protected abstract void drawAxisLine(java.awt.Graphics g, int resolution)
protected abstract void calculateAxisLengthUnit()
protected abstract double getMaxLabelWidthAndInitStartEndLabelDim(int resolution)
resolution
- 分辨率protected abstract void drawTicks(java.awt.Graphics g, int resolution)
public abstract double getCrossValue()
public abstract double getArrowValue()
public abstract java.lang.String getJSAxisType()
public abstract java.lang.String getAxisName()
public java.lang.String getVanAxisStringType()
public void dealPlotBoundsWithAxisLabel(java.awt.geom.Rectangle2D plotBounds, int resolution)
plotBounds
- 绘图区Boundsresolution
- 分辨率public void dealPlotBoundsWithLabelInHorizontal(java.awt.geom.Rectangle2D lastPlotBounds)
lastPlotBounds
- 处理前的绘图区边界.public void dealPlotBoundsWithAxisTitle(java.awt.geom.Rectangle2D plotBounds, int resolution)
plotBounds
- 压缩前的plotBoundsresolution
- 分辨率public void dealPlotBoundsWithLabel(java.awt.geom.Rectangle2D plotBounds, int resolution)
plotBounds
- 压缩前的plotBoundsresolution
- 分辨率protected double getCateLabelWidth(java.awt.geom.Rectangle2D plotBounds, int resolution)
protected double getTickLengthShow()
protected void calculateTitleDimesion(int resolution)
protected void calBoundsWithMoreLabel4Cate(java.awt.geom.Rectangle2D plotBounds)
public void calculateBoundsWidthOrientationAndTitle(java.awt.geom.Rectangle2D plotBounds, double cateLabelWidth, java.awt.geom.Dimension2D titleDim)
plotBounds
- 边界cateLabelWidth
- 宽度titleDim
- 大小public void calculateAxisGlyph(java.awt.geom.Rectangle2D bounds)
bounds
- 绘图区边界protected double dealWithPlotBounds()
protected void init(java.awt.geom.Rectangle2D plotBounds)
protected void setAttr(java.awt.geom.Rectangle2D bounds, java.awt.geom.Point2D axisZero, double axisLength, double axisGridLength)
protected double getAxisLabelWidth(java.lang.String label, int resolution)
protected java.awt.geom.Dimension2D getAxisLabelDim(java.lang.String label, int resolution)
protected boolean shouldBeHeight()
protected java.lang.String value2String(double value)
public java.awt.geom.Point2D getOrigin()
protected void setOrigin(java.awt.geom.Point2D zero)
zero
- public double getCrossValueInPlot()
public double getAxisLength()
public void setAxisLength(double len)
len
- 长度public void setCustomSecUnit(boolean isCustomSecUnit)
isCustomSecUnit
- true则自定义刻度单位,false则使用默认的单位protected boolean isCustomSecUnit()
public double getUnitLen()
public void setUnitLen(double length)
length
- 刻度长度protected double getAxisGridLength()
protected void setAxisGridLength(double axisGridLength)
public void setTitleGlyph(TextGlyph titleGlyph)
titleGlyph
- 画标题的Glyphpublic abstract double getPreLeftWidth4DataSheet(int resolution)
public java.awt.geom.Rectangle2D getBounds()
public void setBounds(java.awt.geom.Rectangle2D bounds)
public void setPlotZeroBounds(java.awt.geom.Rectangle2D plotZeroBounds)
public java.awt.geom.Rectangle2D getPlotZeroBounds()
public java.awt.geom.Rectangle2D getPlotLastBounds()
public void setMinValue(double minValue)
minValue
- 最小值public double getMinValue()
public void setMinMaxValue(double minValue, double maxValue)
minValue
- 最小值maxValue
- 最大值public void setCustomMinValue(boolean isCustomMinValue)
isCustomMinValue
- true表示自定义坐标轴的最小值protected boolean isCustomMinValue()
public void setMaxValue(double maxValue)
maxValue
- 最大值public double getMaxValue()
public void setCustomMaxValue(boolean isCustomMaxValue)
isCustomMaxValue
- true表示采用自定义最大值protected boolean isCustomMaxValue()
public void setZoom(boolean isZoom)
isZoom
- true表示可以缩放public boolean isZoom()
public void setTickMarkType(int tickMarkType)
public int getTickMarkType()
public void setSecTickMarkType(int secTickMarkType)
public int getSecTickMarkType()
public void setMainGridStyle(int mainGridStyle)
public int getMainGridStyle()
public void setMainGridColor(java.awt.Color mainGridColor)
public java.awt.Color getMainGridColor()
public void setLineColor(java.awt.Color lineColor)
public java.awt.Color getLineColor()
public void setLineStyle(int lineStyle)
public int getLineStyle()
public void setTextAttr(TextAttr textAttr)
public TextAttr getTextAttr()
public void setFormat(java.text.Format format)
public java.text.Format getFormat()
public void setPosition(int position)
public int getPosition()
public boolean isHorizontal()
public boolean hasAxisReversed()
public void setAxisReversed(boolean reversed)
public void setLabelNumber(int labelNumber)
public int getLabelNumber()
public void setLabelWrap(boolean isLabelWrap)
public void setArrowShow(boolean isArrowShow)
public boolean isArrowShow()
public void setShowAxisLabel(boolean isShowAxisLabel)
public boolean isShowAxisLabel()
public boolean isLog()
public void setLog(boolean isLog)
public boolean isPercentage()
public void setAxisType(java.lang.String axisType)
public java.lang.String getAxisType()
public void setMainUnit(java.math.BigDecimal tickLength)
public double getMainUnit()
public java.math.BigDecimal getBigDecimalMainUnit()
public void setCustomMainUnit(boolean isCustomMainUnit)
public boolean isCustomMainUnit()
public java.awt.geom.Dimension2D getTitleDim()
public java.awt.geom.Point2D getPointInBounds(double value)
value
- 坐标轴上的值public double get2ValueLength(double start, double end)
protected double getOtherPoint2ValueLength(java.awt.geom.Point2D startPoint, java.awt.geom.Point2D endPoint)
public int getTickIndex4Value(int value)
public java.awt.geom.Point2D getPoint2D(double value)
protected java.awt.geom.Line2D getTickLine(double value, int tickLength, int tickMarkType)
value
- protected java.awt.geom.Line2D getTickLineByCenterPoint(java.awt.geom.Point2D centerP, int tickLength, int tickMarkType)
protected java.awt.geom.Line2D getOtherPositionTickLine(java.awt.geom.Point2D centerP, java.awt.geom.Point2D bottomP, java.awt.geom.Point2D leftP)
public void setDrawBetweenTick(boolean drawBetweenTick)
public boolean isDrawBetweenTick()
public void setCubic(Cubic cubic)
public Cubic getCubic()
public Cubic getThreeDBase()
public void setThreeDBase(Cubic base)
public void setSecUnit(double smallTickLength)
public double getSecUnit()
public AxisUnitType getShowUnit()
public double getDivideUnit()
protected void drawLabel(java.awt.Graphics g, double value, double offset, java.lang.String labelString, int resolution)
protected void drawLabelWrapWhenNeed(java.awt.Graphics g, double value, double offset, java.lang.String labelString, int resolution)
protected int calculateLocationWithEllipsis(java.lang.String labelString, int resolution, double maxWidth)
protected java.lang.String changeAxisLabelStringWithLabelBounds(java.lang.String labelString, java.awt.geom.Rectangle2D labelBounds, int resolution)
protected void drawLabel(java.awt.Graphics g, double value, double offset, java.lang.String labelString, java.awt.geom.GeneralPath labelPath, int resolution)
public int getTickSamplingTime()
protected java.awt.geom.Rectangle2D getLabelBounds4WrapWhenAxisLeftOrRight(double value, double offset, java.lang.String labelString, int resolution)
protected java.awt.geom.Rectangle2D getLabelBounds(double value, double offset, java.lang.String labelString, int resolution)
value
- 标签的位置offset
- 偏移量,标签画在刻度之间时为0.5,画在刻度下面时为0labelString
- 标签文本resolution
- 屏幕分辨率protected java.awt.geom.Rectangle2D getOtherPositionLabelBounds(java.awt.geom.Point2D centerP, double width, double height, double margin)
protected void drawTickLine(java.awt.Graphics g, java.awt.geom.Line2D line, java.awt.BasicStroke stroke)
protected boolean shouldDrawTickLine(java.awt.geom.Line2D line)
public void draw(java.awt.Graphics g, int resolution)
g
- 画布resolution
- 分辨率public void drawWithOutAlert(java.awt.Graphics g, int resolution)
public void draw4ThreeD(java.awt.Graphics g, int resolution)
protected void drawAxisTitle(java.awt.Graphics g, int resolution)
public void drawArrow(java.awt.Graphics2D g2d, java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
g2d
- 画笔.p0
- 起始点p1
- 终结点protected boolean isRevertAndArrow()
public java.awt.geom.Line2D[] getGridLine(double value)
protected java.awt.geom.Line2D getOtherPositionGridLine(java.awt.geom.Point2D centerP)
public java.awt.Shape getShape()
public void setAxisLabelWidth(double axisLabelWidth)
public double getAxisLabelWidth()
protected java.awt.geom.Rectangle2D calculatorTitleBounds(int resolution)
protected java.awt.geom.Rectangle2D getOtherPositionTitleBounds(java.awt.geom.Dimension2D dim, int titlePosition)
protected java.awt.geom.Rectangle2D getTopTitleBounds(java.awt.geom.Dimension2D titleDim, int titlePosition)
protected double getTopBottomX(int titlePosition)
protected java.awt.geom.Rectangle2D getBottomTitleBounds(java.awt.geom.Dimension2D titleDim, int titlePosition)
protected java.awt.geom.Rectangle2D getLeftTitleBounds(java.awt.geom.Dimension2D titleDim, int titlePosition)
protected double getLeftRightY(int titlePosition)
protected java.awt.geom.Rectangle2D getRightTitleBounds(java.awt.geom.Dimension2D titleDim, int titlePosition)
public boolean equals(java.lang.Object ob)
equals
在类中 java.lang.Object
public JSONObject toVanJSONObject(Repository repo) throws JSONException
JSONException
protected void addAxisLabelJSON(JSONObject js, Repository repo) throws JSONException
JSONException
protected void addMinMaxValue(JSONObject js, Repository repo) throws JSONException
JSONException
public JSONObject toJSONObject(Repository repo) throws JSONException
toJSONObject
在接口中 Glyph
toJSONObject
在类中 SpecialGlyph
repo
- 请求JSONException
- 抛错