|
|||||||||
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.CategoryLineAnnotation
public class CategoryLineAnnotation
Title: IJChart
A line annotation that can be placed on aCategoryPlot
.
Description: a chart library for the Java(tm) platform.
Copyright: Copyright (c) 2013
Company:
Field Summary | |
---|---|
static java.awt.Paint |
DEFAULT_LINE_PAINT
The default line paint. |
static java.awt.Stroke |
DEFAULT_LINE_STROKE
The default line stroke. |
Constructor Summary | |
---|---|
CategoryLineAnnotation(java.lang.Object startCategory,
double startValue,
java.lang.Object endCategory,
double endValue)
Draw a line from (startCategory,startValue) to (endCategory,endValue). |
|
CategoryLineAnnotation(java.lang.Object startCategory,
double startValue,
java.lang.Object endCategory,
double endValue,
java.awt.Paint paint,
java.awt.Stroke stroke)
Draw a line from (startCategory,startValue) to (endCategory,endValue). |
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 |
getEndCategory()
Returns the category for the end of the line. |
double |
getEndValue()
Returns the end y value. |
java.awt.Paint |
getPaint()
Returns the line paint. |
java.lang.Object |
getStartCategory()
Returns the category for the start of the line. |
double |
getStartValue()
Returns the start y value. |
java.awt.Stroke |
getStroke()
Returns the line stroke. |
int |
hashCode()
Returns a hash code value for the object. |
void |
setEndCategory(java.lang.Object category)
Sets the category for the end of the line and sends an AnnotationChangeEvent to all registered listeners. |
void |
setEndValue(double value)
Sets the end y value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setPaint(java.awt.Paint paint)
Sets the line paint and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStartCategory(java.lang.Object category)
Sets the category for the start of the line and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStartValue(double value)
Sets the start y value and sends an AnnotationChangeEvent to all registered listeners. |
void |
setStroke(java.awt.Stroke stroke)
Sets the line stroke 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.AbstractAnnotation |
---|
addChangeListener, annotationChanged, fireAnnotationChanged, getTooltipText, hasListener, notifyListeners, removeAllChangeListener, removeChangeListener, setTooltipText |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.awt.Paint DEFAULT_LINE_PAINT
public static final java.awt.Stroke DEFAULT_LINE_STROKE
Constructor Detail |
---|
public CategoryLineAnnotation(java.lang.Object startCategory, double startValue, java.lang.Object endCategory, double endValue)
startCategory
- Objec
The category for the start of the line (null not permitted).startValue
- double
The start y value.endCategory
- Object
The category for the end of the line (null not permitted).endValue
- double
The end y value.public CategoryLineAnnotation(java.lang.Object startCategory, double startValue, java.lang.Object endCategory, double endValue, java.awt.Paint paint, java.awt.Stroke stroke)
startCategory
- Objec
The category for the start of the line (null not permitted).startValue
- double
The start y value.endCategory
- Object
The category for the end of the line (null not permitted).endValue
- double
The end y value.paint
- Paint
The line paint (null not permitted).stroke
- Stroke
The line stroke (null not permitted).Method Detail |
---|
public java.lang.Object getStartCategory()
public void setStartCategory(java.lang.Object category)
AnnotationChangeEvent
to all registered listeners.
category
- Object
The category (null not permitted).public double getStartValue()
public void setStartValue(double value)
AnnotationChangeEvent
to all registered listeners.
value
- double
The start value.public java.lang.Object getEndCategory()
public void setEndCategory(java.lang.Object category)
AnnotationChangeEvent
to all registered listeners.
category
- Object
The category (null not permitted).public double getEndValue()
public void setEndValue(double value)
AnnotationChangeEvent
to all registered listeners.
value
- double
The end value.public java.awt.Paint getPaint()
public void setPaint(java.awt.Paint paint)
AnnotationChangeEvent
to all registered listeners.
paint
- Paint
The paint (null not permitted).public java.awt.Stroke getStroke()
public void setStroke(java.awt.Stroke stroke)
AnnotationChangeEvent
to all registered listeners.
stroke
- Stroke
The line stroke (null not permitted).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 AbstractAnnotation
obj
- the object (null permitted).
public int hashCode()
hashCode
in class AbstractAnnotation
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class AbstractAnnotation
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 java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |