|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.annotation.AbstractAnnotation
com.ijchart.xychart.annotation.XYLineAnnotation
public class XYLineAnnotation
Title: IJChart
用于XYPlot
的文本注解(annotation)对象.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_LINE_PAINT
绘制直线使用的缺省的paint对象. |
static java.awt.Stroke |
DEFAULT_LINE_STROKE
绘制直线使用的缺省的stroke对象. |
Constructor Summary | |
---|---|
XYLineAnnotation(double startX,
double startY,
double endX,
double endY)
绘制从起点(startX,startY)至终点(endX,endY)的直线. |
|
XYLineAnnotation(double startX,
double startY,
double endX,
double endY,
java.awt.Paint paint,
java.awt.Stroke stroke)
绘制从起点(startX,startY)至终点(endX,endY)的直线. |
Method Summary | |
---|---|
java.lang.Object |
clone()
返回克隆的对象. |
void |
drawAnnotation(AbstractValueAxis xAxis,
RectangleEdge xAxisEdge,
AbstractValueAxis yAxis,
RectangleEdge yAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
绘制注解(annotation)图形. |
boolean |
equals(java.lang.Object obj)
测试两个对象是否相等. |
double |
getEndX()
返回终点的x值. |
double |
getEndY()
返回终点的y值. |
java.awt.Paint |
getPaint()
返回绘制直线使用的paint对象. |
double |
getStartX()
返回起点的x值. |
double |
getStartY()
返回起点的y值. |
java.awt.Stroke |
getStroke()
返回绘制直线使用的stroke对象. |
int |
hashCode()
计算对象的hashcode值. |
void |
setEndX(double endX)
设置终点的x值,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setEndY(double endY)
设置终点的y值,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setPaint(java.awt.Paint paint)
设置绘制直线使用的paint对象,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setStartX(double startX)
设置起点的x值,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setStartY(double startY)
设置起点的y值,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setStroke(java.awt.Stroke stroke)
设置绘制直线使用的stroke对象,并向所有监听器发送 AnnotationChangeEvent 事件.
|
java.lang.String |
toString()
覆盖toString方法. |
Methods inherited from class com.ijchart.xychart.annotation.AbstractAnnotation |
---|
addChangeListener, annotationChanged, fireAnnotationChanged, getTooltipText, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener, setTooltipText |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Paint DEFAULT_LINE_PAINT
public static final java.awt.Stroke DEFAULT_LINE_STROKE
Constructor Detail |
---|
public XYLineAnnotation(double startX, double startY, double endX, double endY)
startX
- double 起点的x值.
startY
- double 起点的y值.
endX
- double 结点x值.
endY
- double 终点y值.
public XYLineAnnotation(double startX, double startY, double endX, double endY, java.awt.Paint paint, java.awt.Stroke stroke)
startX
- double 起点的x值.
startY
- double 起点的y值.
endX
- double 结点x值.
endY
- double 终点y值.
paint
- Paint 绘制直线使用的paint对象 (不可为null).
stroke
- Stroke 绘制直线使用的stroke对象 (不可为null).
Method Detail |
---|
public double getStartX()
public void setStartX(double startX)
AnnotationChangeEvent
事件.
startX
- double 起点x值.
public double getStartY()
public void setStartY(double startY)
AnnotationChangeEvent
事件.
startY
- double 起点y值.
public double getEndX()
public void setEndX(double endX)
AnnotationChangeEvent
事件.
endX
- double 终点x值.
public double getEndY()
public void setEndY(double endY)
AnnotationChangeEvent
事件.
endY
- double 终点y值.
public java.awt.Paint getPaint()
public void setPaint(java.awt.Paint paint)
AnnotationChangeEvent
事件.
paint
- Paint Paint对象 (不可为null).
public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
AnnotationChangeEvent
事件.
stroke
- Stroke Stroke对象 (不可为null).
public void drawAnnotation(AbstractValueAxis xAxis, RectangleEdge xAxisEdge, AbstractValueAxis yAxis, RectangleEdge yAxisEdge, java.awt.geom.Rectangle2D dataArea, ChartOrientation orientation, AnnotationShapeCollection annotationShapes)
drawAnnotation
in interface IXYAnnotation
xAxis
- AbstractValueAxis x坐标轴 (不可为null).
xAxisEdge
- RectangleEdge x坐标轴位置 (不可为null).
yAxis
- AbstractValueAxis y坐标轴 (不可为null).
yAxisEdge
- RectangleEdge y坐标轴位置 (不可为null).
dataArea
- Rectangle2D 数据区域 (不可为null).
orientation
- ChartOrientation 图表的方向 (不可为null).
annotationShapes
- AnnotationShapeCollection 注解(annotation)图形集合 (不可为null).
public boolean equals(java.lang.Object obj)
equals
in class AbstractAnnotation
obj
- the object (null permitted).
public int hashCode()
hashCode
in class AbstractAnnotation
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractAnnotation
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |