public class CategoryLineAnnotation extends AbstractAnnotation implements CategoryAnnotation, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
CategoryPlot.| Constructor and Description |
|---|
CategoryLineAnnotation(java.lang.Comparable category1,
double value1,
java.lang.Comparable category2,
double value2,
java.awt.Paint paint,
java.awt.Stroke stroke)
Creates a new annotation that draws a line between (category1, value1)
and (category2, value2).
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Returns a clone of the annotation.
|
void |
draw(java.awt.Graphics2D g2,
CategoryPlot plot,
java.awt.geom.Rectangle2D dataArea,
CategoryAxis domainAxis,
ValueAxis rangeAxis)
Draws the annotation.
|
boolean |
equals(java.lang.Object obj)
Tests this object for equality with another.
|
java.lang.Comparable |
getCategory1()
Returns the category for the start of the line.
|
java.lang.Comparable |
getCategory2()
Returns the category for the end of the line.
|
java.awt.Paint |
getPaint()
Returns the paint used to draw the connecting line.
|
java.awt.Stroke |
getStroke()
Returns the stroke used to draw the connecting line.
|
double |
getValue1()
Returns the y-value for the start of the line.
|
double |
getValue2()
Returns the y-value for the end of the line.
|
int |
hashCode()
Returns a hash code for this instance.
|
void |
setCategory1(java.lang.Comparable category)
Sets the category for the start of the line and sends an
AnnotationChangeEvent to all registered listeners. |
void |
setCategory2(java.lang.Comparable category)
Sets the category for the end of the line and sends an
AnnotationChangeEvent to all registered listeners. |
void |
setPaint(java.awt.Paint paint)
Sets the paint used to draw the connecting line and sends an
AnnotationChangeEvent to all registered listeners. |
void |
setStroke(java.awt.Stroke stroke)
Sets the stroke used to draw the connecting line and sends an
AnnotationChangeEvent to all registered listeners. |
void |
setValue1(double value)
Sets the y-value for the start of the line and sends an
AnnotationChangeEvent to all registered listeners. |
void |
setValue2(double value)
Sets the y-value for the end of the line and sends an
AnnotationChangeEvent to all registered listeners. |
addChangeListener, fireAnnotationChanged, getNotify, hasListener, notifyListeners, removeChangeListener, setNotifyfinalize, getClass, notify, notifyAll, toString, wait, wait, waitaddChangeListener, removeChangeListenerpublic CategoryLineAnnotation(java.lang.Comparable category1, double value1, java.lang.Comparable category2, double value2, java.awt.Paint paint, java.awt.Stroke stroke)
category1 - the category (null not permitted).value1 - the value.category2 - the category (null not permitted).value2 - the value.paint - the line color (null not permitted).stroke - the line stroke (null not permitted).public java.lang.Comparable getCategory1()
null).setCategory1(Comparable)public void setCategory1(java.lang.Comparable category)
AnnotationChangeEvent to all registered listeners.category - the category (null not permitted).getCategory1()public double getValue1()
setValue1(double)public void setValue1(double value)
AnnotationChangeEvent to all registered listeners.value - the value.getValue1()public java.lang.Comparable getCategory2()
null).setCategory2(Comparable)public void setCategory2(java.lang.Comparable category)
AnnotationChangeEvent to all registered listeners.category - the category (null not permitted).getCategory2()public double getValue2()
setValue2(double)public void setValue2(double value)
AnnotationChangeEvent to all registered listeners.value - the value.getValue2()public java.awt.Paint getPaint()
null).setPaint(Paint)public void setPaint(java.awt.Paint paint)
AnnotationChangeEvent to all registered listeners.paint - the paint (null not permitted).getPaint()public java.awt.Stroke getStroke()
null).setStroke(Stroke)public void setStroke(java.awt.Stroke stroke)
AnnotationChangeEvent to all registered listeners.stroke - the stroke (null not permitted).getStroke()public void draw(java.awt.Graphics2D g2, CategoryPlot plot, java.awt.geom.Rectangle2D dataArea, CategoryAxis domainAxis, ValueAxis rangeAxis)
draw in interface CategoryAnnotationg2 - the graphics device.plot - the plot.dataArea - the data area.domainAxis - the domain axis.rangeAxis - the range axis.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the object (null permitted).true or false.public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone in interface org.jfree.util.PublicCloneableclone in class AbstractAnnotationjava.lang.CloneNotSupportedException - this class will not throw this
exception, but subclasses (if any) might.