org.jfree.chart.annotations
public class CategoryTextAnnotation extends TextAnnotation implements CategoryAnnotation, Cloneable, PublicCloneable, Serializable
Constructor Summary | |
---|---|
CategoryTextAnnotation(String text, Comparable category, double value)
Creates a new annotation to be displayed at the given location.
|
Method Summary | |
---|---|
Object | clone()
Returns a clone of the annotation.
|
void | draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea, CategoryAxis domainAxis, ValueAxis rangeAxis)
Draws the annotation.
|
boolean | equals(Object obj)
Tests this object for equality with another.
|
Comparable | getCategory()
Returns the category.
|
CategoryAnchor | getCategoryAnchor()
Returns the category anchor point.
|
double | getValue()
Returns the value that the annotation attaches to.
|
int | hashCode()
Returns a hash code for this instance.
|
void | setCategory(Comparable category)
Sets the category that the annotation attaches to.
|
void | setCategoryAnchor(CategoryAnchor anchor)
Sets the category anchor point.
|
void | setValue(double value)
Sets the value.
|
Parameters: text the text (null
not permitted). category the category (null
not permitted). value the value.
Returns: A clone.
Throws: CloneNotSupportedException this class will not throw this exception, but subclasses (if any) might.
Parameters: g2 the graphics device. plot the plot. dataArea the data area. domainAxis the domain axis. rangeAxis the range axis.
Parameters: obj the object (null
permitted).
Returns: true
or false
.
Returns: The category (never null
).
See Also: setCategory
Returns: The category anchor point.
See Also: setCategoryAnchor
Returns: The value.
See Also: CategoryTextAnnotation
Returns: A hash code.
Parameters: category the category (null
not permitted).
See Also: getCategory
Parameters: anchor the anchor point (null
not permitted).
See Also: getCategoryAnchor
Parameters: value the value.
See Also: getValue