| java.lang.Object org.jfree.chart.annotations.TextAnnotation org.jfree.chart.annotations.CategoryTextAnnotation org.jfree.chart.annotations.CategoryPointerAnnotation
CategoryPointerAnnotation | public class CategoryPointerAnnotation extends CategoryTextAnnotation implements Cloneable,PublicCloneable,Serializable(Code) | | 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.
since: 1.0.3 |
DEFAULT_ARROW_LENGTH | final public static double DEFAULT_ARROW_LENGTH(Code) | | The default arrow length (in Java2D units).
|
DEFAULT_ARROW_WIDTH | final public static double DEFAULT_ARROW_WIDTH(Code) | | The default arrow width (in Java2D units).
|
DEFAULT_BASE_RADIUS | final public static double DEFAULT_BASE_RADIUS(Code) | | The default base radius (in Java2D units).
|
DEFAULT_LABEL_OFFSET | final public static double DEFAULT_LABEL_OFFSET(Code) | | The default label offset (in Java2D units).
|
DEFAULT_TIP_RADIUS | final public static double DEFAULT_TIP_RADIUS(Code) | | The default tip radius (in Java2D units).
|
CategoryPointerAnnotation | public CategoryPointerAnnotation(String label, Comparable key, double value, double angle)(Code) | | Creates a new label and arrow annotation.
Parameters: label - the label (null permitted). Parameters: key - the category key. Parameters: value - the y-value (measured against the chart's range axis). Parameters: angle - the angle of the arrow's line (in radians). |
draw | public void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, CategoryAxis domainAxis, ValueAxis rangeAxis)(Code) | | Draws the annotation.
Parameters: g2 - the graphics device. Parameters: plot - the plot. Parameters: dataArea - the data area. Parameters: domainAxis - the domain axis. Parameters: rangeAxis - the range axis. |
equals | public boolean equals(Object obj)(Code) | | Tests this annotation for equality with an arbitrary object.
Parameters: obj - the object (null permitted). true or false . |
hashCode | public int hashCode()(Code) | | Returns a hash code for this instance.
A hash code. |
setLabelOffset | public void setLabelOffset(double offset)(Code) | | Sets the label offset (from the arrow base, continuing in a straight
line, in Java2D units).
Parameters: offset - the offset (in Java2D units). See Also: CategoryPointerAnnotation.getLabelOffset() |
|
|