Package org.jfree.chart.annotations
Class XYDataRangeAnnotation
- java.lang.Object
-
- org.jfree.chart.annotations.AbstractAnnotation
-
- org.jfree.chart.annotations.AbstractXYAnnotation
-
- org.jfree.chart.annotations.XYDataRangeAnnotation
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,Annotation,XYAnnotation,XYAnnotationBoundsInfo
public class XYDataRangeAnnotation extends AbstractXYAnnotation implements XYAnnotationBoundsInfo
This annotation can be put on anXYPlotto ensure a visible data range. The range values should be specified w.r.t. to the first (index 0) domain or range axis.
-
-
Field Summary
Fields Modifier and Type Field Description private RangeminimumDomainRangeprivate RangeminimumRangeRangeprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description XYDataRangeAnnotation(Range minimumDomainRange, Range minimumRangeRange)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddraw(java.awt.Graphics2D g2, XYPlot plot, java.awt.geom.Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)Draws the annotation.booleanequals(java.lang.Object obj)Tests this annotation for equality with an arbitrary object.booleangetIncludeInDataBounds()Returns a flag that determines whether or not the annotation's bounds should be taken into account for auto-range calculations on the axes that the annotation is plotted against.RangegetXRange()Returns the range of x-values (in data space) that the annotation uses.RangegetYRange()Returns the range of y-values (in data space) that the annotation uses.inthashCode()Returns a hash code for this instance.-
Methods inherited from class org.jfree.chart.annotations.AbstractXYAnnotation
addEntity, canEqual, getToolTipText, getURL, setToolTipText, setURL
-
Methods inherited from class org.jfree.chart.annotations.AbstractAnnotation
addChangeListener, clone, fireAnnotationChanged, getNotify, hasListener, notifyListeners, removeChangeListener, setNotify
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jfree.chart.annotations.Annotation
addChangeListener, removeChangeListener
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
minimumDomainRange
private final Range minimumDomainRange
-
minimumRangeRange
private final Range minimumRangeRange
-
-
Method Detail
-
getIncludeInDataBounds
public boolean getIncludeInDataBounds()
Description copied from interface:XYAnnotationBoundsInfoReturns a flag that determines whether or not the annotation's bounds should be taken into account for auto-range calculations on the axes that the annotation is plotted against.- Specified by:
getIncludeInDataBoundsin interfaceXYAnnotationBoundsInfo- Returns:
- A boolean.
-
getXRange
public Range getXRange()
Description copied from interface:XYAnnotationBoundsInfoReturns the range of x-values (in data space) that the annotation uses.- Specified by:
getXRangein interfaceXYAnnotationBoundsInfo- Returns:
- The x-range.
-
getYRange
public Range getYRange()
Description copied from interface:XYAnnotationBoundsInfoReturns the range of y-values (in data space) that the annotation uses.- Specified by:
getYRangein interfaceXYAnnotationBoundsInfo- Returns:
- The y-range.
-
draw
public void draw(java.awt.Graphics2D g2, XYPlot plot, java.awt.geom.Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info)Description copied from class:AbstractXYAnnotationDraws the annotation.- Specified by:
drawin interfaceXYAnnotation- Specified by:
drawin classAbstractXYAnnotation- Parameters:
g2- the graphics device.plot- the plot.dataArea- the data area.domainAxis- the domain axis.rangeAxis- the range axis.rendererIndex- the renderer index.info- if supplied, this info object will be populated with entity information.
-
hashCode
public int hashCode()
Description copied from class:AbstractXYAnnotationReturns a hash code for this instance.- Overrides:
hashCodein classAbstractXYAnnotation- Returns:
- A hash code.
-
equals
public boolean equals(java.lang.Object obj)
Description copied from class:AbstractXYAnnotationTests this annotation for equality with an arbitrary object.- Overrides:
equalsin classAbstractXYAnnotation- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-
-