java.lang.Object | |||
↳ | org.jfree.chart.annotations.TextAnnotation | ||
↳ | org.jfree.chart.annotations.CategoryTextAnnotation | ||
↳ | org.jfree.chart.annotations.CategoryPointerAnnotation |
An arrow and label that can be placed on a CategoryPlot
. The arrow
is drawn at a user-definable angle so that it points towards the (category,
value) location for the annotation.
The arrow length (and its offset from the (category, value) location) is controlled by the tip radius and the base radius attributes. Imagine two circles around the (category, value) coordinate: the inner circle defined by the tip radius, and the outer circle defined by the base radius. Now, draw the arrow starting at some point on the outer circle (the point is determined by the angle), with the arrow tip being drawn at a corresponding point on the inner circle.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
double | DEFAULT_ARROW_LENGTH | The default arrow length (in Java2D units). | |||||||||
double | DEFAULT_ARROW_WIDTH | The default arrow width (in Java2D units). | |||||||||
double | DEFAULT_BASE_RADIUS | The default base radius (in Java2D units). | |||||||||
double | DEFAULT_LABEL_OFFSET | The default label offset (in Java2D units). | |||||||||
double | DEFAULT_TIP_RADIUS | The default tip radius (in Java2D units). |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new label and arrow annotation.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns a clone of the annotation.
| |||||||||||
Draws the annotation.
| |||||||||||
Tests this annotation for equality with an arbitrary object.
| |||||||||||
Returns the angle of the arrow.
| |||||||||||
Returns the arrow length.
| |||||||||||
Returns the paint used for the arrow.
| |||||||||||
Returns the stroke used to draw the arrow line.
| |||||||||||
Returns the arrow width.
| |||||||||||
Returns the base radius.
| |||||||||||
Returns the label offset.
| |||||||||||
Returns the tip radius.
| |||||||||||
Returns a hash code for this instance.
| |||||||||||
Sets the angle of the arrow.
| |||||||||||
Sets the arrow length.
| |||||||||||
Sets the paint used for the arrow.
| |||||||||||
Sets the stroke used to draw the arrow line.
| |||||||||||
Sets the arrow width.
| |||||||||||
Sets the base radius.
| |||||||||||
Sets the label offset (from the arrow base, continuing in a straight
line, in Java2D units).
| |||||||||||
Sets the tip radius.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
The default arrow length (in Java2D units).
The default arrow width (in Java2D units).
The default base radius (in Java2D units).
The default label offset (in Java2D units).
The default tip radius (in Java2D units).
Creates a new label and arrow annotation.
label | the label (null permitted). |
---|---|
key | the category key. |
value | the y-value (measured against the chart's range axis). |
angle | the angle of the arrow's line (in radians). |
Returns a clone of the annotation.
CloneNotSupportedException | if the annotation can't be cloned. |
---|
Draws the annotation.
g2 | the graphics device. |
---|---|
plot | the plot. |
dataArea | the data area. |
domainAxis | the domain axis. |
rangeAxis | the range axis. |
Tests this annotation for equality with an arbitrary object.
obj | the object (null permitted). |
---|
true
or false
.
Returns the paint used for the arrow.
null
).Returns the stroke used to draw the arrow line.
null
).Returns the label offset.
Returns a hash code for this instance.
Sets the paint used for the arrow.
paint | the arrow paint (null not permitted). |
---|
Sets the stroke used to draw the arrow line.
stroke | the stroke (null not permitted). |
---|
Sets the label offset (from the arrow base, continuing in a straight line, in Java2D units).
offset | the offset (in Java2D units). |
---|