|
|||||||||
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.AbstractTextAnnotation
com.ijchart.xychart.annotation.XYTextAnnotation
com.ijchart.xychart.annotation.XYPointerAnnotation
public class XYPointerAnnotation
Title: IJChart
用于XYPlot
的箭头注解对象.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static double |
DEFAULT_ARROW_ANGLE
缺省的箭头的角度(单位是弧度). |
static double |
DEFAULT_ARROW_LENGTH
缺省的箭头的长度. |
static java.awt.Paint |
DEFAULT_ARROW_PAINT
缺省的绘制箭头的paint对象. |
static java.awt.Stroke |
DEFAULT_ARROW_STROKE
缺省的绘制箭头的stroke对象. |
static double |
DEFAULT_ARROW_WIDTH
缺省的每边箭头的宽度. |
static double |
DEFAULT_BASE_RADIUS
缺省的箭柄的长度. |
static double |
DEFAULT_LABEL_OFFSET
缺省的文本和箭柄的距离. |
Fields inherited from class com.ijchart.xychart.annotation.AbstractTextAnnotation |
---|
DEFAULT_FONT, DEFAULT_PAINT, DEFAULT_ROTATION_ANGLE, DEFAULT_TEXT_DIRECTION, DEFAULT_TEXT_HORIZONTAL_ALIGNMENT, DEFAULT_TEXT_POSITION, DEFAULT_TEXT_VERTICAL_ALIGNMENT |
Constructor Summary | |
---|---|
XYPointerAnnotation(java.lang.String text,
double x,
double y)
根据x和y值来确定显示注解的位置. |
|
XYPointerAnnotation(java.lang.String text,
double x,
double y,
double arrowAngle)
根据x和y值来确定显示注解的位置. |
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 |
getArrowAngle()
箭头的角度(单位是弧度). |
double |
getArrowLength()
返回箭头的长度. |
java.awt.Paint |
getArrowPaint()
返回绘制箭头的paint对象. |
java.awt.Stroke |
getArrowStroke()
返回绘制箭头的stroke对象. |
double |
getArrowWidth()
返回每边箭头的宽度. |
double |
getBaseRadius()
返回箭柄的长度. |
double |
getLabelOffset()
返回文本和箭柄的距离. |
int |
hashCode()
计算对象的hashcode值. |
void |
setArrowAngle(double angle)
设置箭头的角度,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setArrowLength(double length)
设置箭头的长度,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setArrowPaint(java.awt.Paint paint)
设置绘制箭头的paint对象,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setArrowStroke(java.awt.Stroke stroke)
设置绘制箭头的stroke对象,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setArrowWidth(double width)
设置每边箭头的宽度,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setBaseRadius(double radius)
设置箭柄的长度,并向所有监听器发送 AnnotationChangeEvent 事件.
|
void |
setLabelOffset(double offset)
设置文本和箭柄的距离,并向所有监听器发送 AnnotationChangeEvent 事件.
|
java.lang.String |
toString()
覆盖toString方法. |
Methods inherited from class com.ijchart.xychart.annotation.XYTextAnnotation |
---|
getX, getY, setX, setY |
Methods inherited from class com.ijchart.xychart.annotation.AbstractTextAnnotation |
---|
getRotationAngle, getText, getTextDirection, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, horizontalAlignToAnchor, setRotationAngle, setText, setTextDirection, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign |
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 double DEFAULT_ARROW_ANGLE
public static final double DEFAULT_BASE_RADIUS
public static final double DEFAULT_ARROW_LENGTH
public static final double DEFAULT_ARROW_WIDTH
public static final java.awt.Paint DEFAULT_ARROW_PAINT
public static final java.awt.Stroke DEFAULT_ARROW_STROKE
public static final double DEFAULT_LABEL_OFFSET
Constructor Detail |
---|
public XYPointerAnnotation(java.lang.String text, double x, double y)
text
- String 注解的文字 (不可为null).
x
- double x值.
y
- double y值.
public XYPointerAnnotation(java.lang.String text, double x, double y, double arrowAngle)
text
- String 注解的文字 (不可为null).
x
- double x值.
y
- double y值.
arrowAngle
- 箭头的角度(单位是弧度).
Method Detail |
---|
public double getArrowAngle()
public void setArrowAngle(double angle)
AnnotationChangeEvent
事件.
angle
- double 角度 (单位是弧度).
public double getBaseRadius()
public void setBaseRadius(double radius)
AnnotationChangeEvent
事件.
radius
- double 箭柄的长度.
public double getArrowLength()
public void setArrowLength(double length)
AnnotationChangeEvent
事件.
length
- double 箭头的长度.
public double getArrowWidth()
public void setArrowWidth(double width)
AnnotationChangeEvent
事件.
width
- double 箭头的宽度.
public double getLabelOffset()
public void setLabelOffset(double offset)
AnnotationChangeEvent
事件.
offset
- double 文本和箭柄的距离.
public java.awt.Paint getArrowPaint()
public void setArrowPaint(java.awt.Paint paint)
AnnotationChangeEvent
事件.
paint
- Paint paint对象 (不可为null).
public java.awt.Stroke getArrowStroke()
public void setArrowStroke(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
drawAnnotation
in class XYTextAnnotation
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 XYTextAnnotation
obj
- the object (null permitted).
public int hashCode()
hashCode
in class XYTextAnnotation
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class XYTextAnnotation
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 XYTextAnnotation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |