|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ijchart.xychart.annotation.AbstractAnnotation
com.ijchart.xychart.annotation.AbstractTextAnnotation
com.ijchart.xychart.annotation.CategoryTextAnnotation
public class CategoryTextAnnotation
Title: IJChart
A text annotation that can be placed on aCategoryPlot
.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary |
---|
Fields inherited from class com.ijchart.xychart.annotation.AbstractTextAnnotation |
---|
DEFAULT_FONT, DEFAULT_PAINT, DEFAULT_ROTATION_ANGLE, DEFAULT_TEXT_DIRECTION, DEFAULT_TEXT_HORIZONTAL_ALIGNMENT, DEFAULT_TEXT_POSITION, DEFAULT_TEXT_VERTICAL_ALIGNMENT |
Constructor Summary | |
---|---|
CategoryTextAnnotation(java.lang.String text,
java.lang.Object category,
double value)
Creates a new annotation to be displayed at the given location. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Creates and returns a copy of this object. |
void |
drawAnnotation(CategoryAxis categoryAxis,
AbstractValueAxis valueAxis,
RectangleEdge valueAxisEdge,
java.awt.geom.Rectangle2D dataArea,
ChartOrientation orientation,
AnnotationShapeCollection annotationShapes)
Draws the annotation. |
boolean |
equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object. |
java.lang.Object |
getCategory()
Returns the category. |
double |
getValue()
Returns the value. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setCategory(java.lang.Object category)
Sets the category and sends an AnnotationChangeEvent to all registered listeners. |
void |
setValue(double value)
Sets the value and sends an AnnotationChangeEvent to all registered listeners. |
java.lang.String |
toString()
Returns a string representation of the object. |
Methods inherited from class com.ijchart.xychart.annotation.AbstractTextAnnotation |
---|
getRotationAngle, getText, getTextDirection, getTextFont, getTextHorizontalAlign, getTextPaint, getTextPosition, getTextVerticalAlign, horizontalAlignToAnchor, setRotationAngle, setText, setTextDirection, setTextFont, setTextHorizontalAlign, setTextPaint, setTextPosition, setTextVerticalAlign |
Methods inherited from class com.ijchart.xychart.annotation.AbstractAnnotation |
---|
addChangeListener, annotationChanged, fireAnnotationChanged, getTooltipText, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener, setTooltipText |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CategoryTextAnnotation(java.lang.String text, java.lang.Object category, double value)
text
- String
The text (null not permitted).category
- Object
The category (null not permitted).value
- double
The value.Method Detail |
---|
public java.lang.Object getCategory()
public void setCategory(java.lang.Object category)
AnnotationChangeEvent
to all registered listeners.
category
- Object
The category (null not permitted).public double getValue()
public void setValue(double value)
AnnotationChangeEvent
to all registered listeners.
value
-
The value.public void drawAnnotation(CategoryAxis categoryAxis, AbstractValueAxis valueAxis, RectangleEdge valueAxisEdge, java.awt.geom.Rectangle2D dataArea, ChartOrientation orientation, AnnotationShapeCollection annotationShapes)
drawAnnotation
in interface ICategoryAnnotation
categoryAxis
- CategoryAxis
The category axis (null not permitted).valueAxis
- AbstractValueAxis
The value axis (null not permitted).valueAxisEdge
- RectangleEdge
The value axis edge (null not permitted).dataArea
- Rectangle2D
The chart data area (null not permitted).orientation
- ChartOrientation
The chart orientation (null not permitted).annotationShapes
- AnnotationShapeCollection
Collects information about the annotation (null not permitted).public boolean equals(java.lang.Object obj)
equals
in class AbstractTextAnnotation
obj
- the object (null permitted).
public int hashCode()
hashCode
in class AbstractTextAnnotation
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractTextAnnotation
java.lang.CloneNotSupportedException
- if the object's class does not
support the Cloneable interface. Subclasses
that override the clone method can also
throw this exception to indicate that an instance cannot
be cloned.public java.lang.String toString()
toString
in class AbstractTextAnnotation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |