| java.lang.Object org.jfree.chart.annotations.AbstractXYAnnotation org.jfree.chart.annotations.XYTextAnnotation org.jfree.chart.annotations.XYPointerAnnotation
XYPointerAnnotation | public class XYPointerAnnotation extends XYTextAnnotation implements Cloneable,PublicCloneable,Serializable(Code) | | An arrow and label that can be placed on an
org.jfree.chart.plot.XYPlot . The arrow is drawn at a user-definable
angle so that it points towards the (x, y) location for the annotation.
The arrow length (and its offset from the (x, y) location) is controlled by
the tip radius and the base radius attributes. Imagine two circles around
the (x, y) 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.
|
Constructor Summary | |
public | XYPointerAnnotation(String label, double x, double y, double angle) Creates a new label and arrow annotation. |
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).
|
XYPointerAnnotation | public XYPointerAnnotation(String label, double x, double y, double angle)(Code) | | Creates a new label and arrow annotation.
Parameters: label - the label (null permitted). Parameters: x - the x-coordinate (measured against the chart's domain axis). Parameters: y - the y-coordinate (measured against the chart's range axis). Parameters: angle - the angle of the arrow's line (in radians). |
draw | public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)(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. Parameters: rendererIndex - the renderer index. Parameters: info - the plot rendering info. |
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: XYPointerAnnotation.getLabelOffset() |
Methods inherited from org.jfree.chart.annotations.AbstractXYAnnotation | protected void addEntity(PlotRenderingInfo info, Shape hotspot, int rendererIndex, String toolTipText, String urlText)(Code)(Java Doc) abstract public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)(Code)(Java Doc) public boolean equals(Object obj)(Code)(Java Doc) public String getToolTipText()(Code)(Java Doc) public String getURL()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void setToolTipText(String text)(Code)(Java Doc) public void setURL(String url)(Code)(Java Doc)
|
|
|