org.jfree.chart.annotations
Class CategoryTextAnnotation
- CategoryAnnotation, Cloneable, Serializable
CategoryTextAnnotation(String text, Comparable category, double value) - Creates a new annotation to be displayed at the given location.
|
equals , getFont , getPaint , getRotationAnchor , getRotationAngle , getText , getTextAnchor , hashCode , setFont , setPaint , setRotationAnchor , setRotationAngle , setText , setTextAnchor |
CategoryTextAnnotation
public CategoryTextAnnotation(String text,
Comparable category,
double value)
Creates a new annotation to be displayed at the given location.
text
- the text (null
not permitted).category
- the category (null
not permitted).value
- the value.
clone
public Object clone()
throws CloneNotSupportedException
Returns a clone of the annotation.
draw
public void draw(Graphics2D g2,
CategoryPlot plot,
Rectangle2D dataArea,
CategoryAxis domainAxis,
ValueAxis rangeAxis)
Draws the annotation.
- draw in interface CategoryAnnotation
g2
- the graphics device.plot
- the plot.dataArea
- the data area.domainAxis
- the domain axis.rangeAxis
- the range axis.
equals
public boolean equals(Object obj)
Tests this object for equality with another.
- equals in interface TextAnnotation
obj
- the object (null
permitted).
getCategory
public Comparable getCategory()
Returns the category.
- The category (never
null
).
getValue
public double getValue()
Returns the value that the annotation attaches to.
setCategory
public void setCategory(Comparable category)
Sets the category that the annotation attaches to.
category
- the category (null
not permitted).
setValue
public void setValue(double value)
Sets the value.