|
|||||||||
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
A text annotation that can be placed on aXYPlot
.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_LINE_PAINT
The default line paint. |
static java.awt.Stroke |
DEFAULT_LINE_STROKE
The default line stroke. |
Constructor Summary | |
---|---|
XYLineAnnotation(double startX,
double startY,
double endX,
double endY)
Draw a line from (startX,startY) to (endX,endY). |
|
XYLineAnnotation(double startX,
double startY,
double endX,
double endY,
java.awt.Paint paint,
java.awt.Stroke stroke)
Draw a line from (startX,startY) to (endX,endY). |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
drawAnnotation(AbstractValueAxis xAxis,
RectangleEdge xAxisEdge,
AbstractValueAxis yAxis,
RectangleEdge yAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
Draws the annotation. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object. |
double |
getEndX()
Returns the end x value. |
double |
getEndY()
Returns the end y value. |
java.awt.Paint |
getPaint()
Returns the line paint. |
double |
getStartX()
Returns the start x value. |
double |
getStartY()
Returns the start y value. |
java.awt.Stroke |
getStroke()
Returns the line stroke. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setEndX(double endX)
Sets the end x value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setEndY(double endY)
Sets the end y value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setPaint(java.awt.Paint paint)
Sets the line paint and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStartX(double startX)
Sets the start x value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStartY(double startY)
Sets the start y value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStroke(java.awt.Stroke stroke)
Sets the line stroke and sends an AnnotationChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
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
The start x value.startY
- double
The start y value.endX
- double
The end x value.endY
- double
The end y value.public XYLineAnnotation(double startX, double startY, double endX, double endY, java.awt.Paint paint, java.awt.Stroke stroke)
startX
- double
The start x value.startY
- double
The start y value.endX
- double
The end x value.endY
- double
The end y value.paint
- Paint
The line paint (null not permitted).stroke
- Stroke
The line stroke (null not permitted).Method Detail |
---|
public double getStartX()
public void setStartX(double startX)
AnnotationChangeEvent
to all registered listeners.
startX
- double
The start x value.public double getStartY()
public void setStartY(double startY)
AnnotationChangeEvent
to all registered listeners.
startY
- double
The start y value.public double getEndX()
public void setEndX(double endX)
AnnotationChangeEvent
to all registered listeners.
endX
- double
The end x value.public double getEndY()
public void setEndY(double endY)
AnnotationChangeEvent
to all registered listeners.
endY
- double
The end y value.public java.awt.Paint getPaint()
public void setPaint(java.awt.Paint paint)
AnnotationChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
AnnotationChangeEvent
to all registered listeners.
stroke
- Stroke
The line stroke (null not permitted).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
The x-axis (null not permitted).xAxisEdge
- RectangleEdge
The x-axis edge (null not permitted).yAxis
- AbstractValueAxis
The y-axis (null not permitted).yAxisEdge
- RectangleEdge
The y-axis edge (null not permitted).dataArea
- Rectangle2D
The chart data area (null not permitted).orientation
- ChartOrientation
The chart orientation (null not permitted).annotationShapes
- AnnotationShapeCollection
Collects information about the annotation (null not permitted).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 |