| java.lang.Object org.jfree.chart.annotations.AbstractXYAnnotation org.jfree.chart.annotations.XYTextAnnotation
All known Subclasses: org.jfree.chart.annotations.XYPointerAnnotation,
Constructor Summary | |
public | XYTextAnnotation(String text, double x, double y) Creates a new annotation to be displayed at the given coordinates. |
Method Summary | |
public Object | clone() Returns a clone of the annotation. | public void | draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) Draws the annotation. | public boolean | equals(Object obj) Tests this annotation for equality with an arbitrary object.
Parameters: obj - the object (null permitted). | public Font | getFont() Returns the font for the annotation. | public Paint | getPaint() Returns the paint for the annotation. | public TextAnchor | getRotationAnchor() Returns the rotation anchor. | public double | getRotationAngle() Returns the rotation angle. | public String | getText() Returns the text for the annotation. | public TextAnchor | getTextAnchor() Returns the text anchor. | public double | getX() Returns the x coordinate for the text anchor point (measured against the
domain axis). | public double | getY() Returns the y coordinate for the text anchor point (measured against the
range axis). | public int | hashCode() Returns a hash code for the object. | public void | setFont(Font font) Sets the font for the annotation. | public void | setPaint(Paint paint) Sets the paint for the annotation. | public void | setRotationAnchor(TextAnchor anchor) Sets the rotation anchor point. | public void | setRotationAngle(double angle) Sets the rotation angle. | public void | setText(String text) Sets the text for the annotation. | public void | setTextAnchor(TextAnchor anchor) Sets the text anchor (the point on the text bounding rectangle that is
aligned to the (x, y) coordinate of the annotation). | public void | setX(double x) Sets the x coordinate for the text anchor point (measured against the
domain axis). | public void | setY(double y) Sets the y coordinate for the text anchor point (measured against the
range axis). |
DEFAULT_FONT | final public static Font DEFAULT_FONT(Code) | | The default font.
|
DEFAULT_PAINT | final public static Paint DEFAULT_PAINT(Code) | | The default paint.
|
DEFAULT_ROTATION_ANCHOR | final public static TextAnchor DEFAULT_ROTATION_ANCHOR(Code) | | The default rotation anchor.
|
DEFAULT_ROTATION_ANGLE | final public static double DEFAULT_ROTATION_ANGLE(Code) | | The default rotation angle.
|
DEFAULT_TEXT_ANCHOR | final public static TextAnchor DEFAULT_TEXT_ANCHOR(Code) | | The default text anchor.
|
XYTextAnnotation | public XYTextAnnotation(String text, double x, double y)(Code) | | Creates a new annotation to be displayed at the given coordinates. The
coordinates are specified in data space (they will be converted to
Java2D space for display).
Parameters: text - the text (null not permitted). Parameters: x - the x-coordinate (in data space). Parameters: y - the y-coordinate (in data space). |
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 - an optional info object that will be populated withentity information. |
equals | public boolean equals(Object obj)(Code) | | Tests this annotation for equality with an arbitrary object.
Parameters: obj - the object (null permitted). A boolean. |
getX | public double getX()(Code) | | Returns the x coordinate for the text anchor point (measured against the
domain axis).
The x coordinate (in data space). See Also: XYTextAnnotation.setX(double) |
getY | public double getY()(Code) | | Returns the y coordinate for the text anchor point (measured against the
range axis).
The y coordinate (in data space). See Also: XYTextAnnotation.setY(double) |
hashCode | public int hashCode()(Code) | | Returns a hash code for the object.
A hash code. |
setRotationAngle | public void setRotationAngle(double angle)(Code) | | Sets the rotation angle. The angle is measured clockwise in radians.
Parameters: angle - the angle (in radians). See Also: XYTextAnnotation.getRotationAngle() |
setTextAnchor | public void setTextAnchor(TextAnchor anchor)(Code) | | Sets the text anchor (the point on the text bounding rectangle that is
aligned to the (x, y) coordinate of the annotation).
Parameters: anchor - the anchor point (null not permitted). See Also: XYTextAnnotation.getTextAnchor() |
setX | public void setX(double x)(Code) | | Sets the x coordinate for the text anchor point (measured against the
domain axis).
Parameters: x - the x coordinate (in data space). See Also: XYTextAnnotation.getX() |
setY | public void setY(double y)(Code) | | Sets the y coordinate for the text anchor point (measured against the
range axis).
Parameters: y - the y coordinate. See Also: XYTextAnnotation.getY() |
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)
|
|
|