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:
Serializable
,Cloneable
,Annotation
,XYAnnotation
,XYAnnotationBoundsInfo
This annotation can be put on an
XYPlot
to ensure a visible data
range. The range values should be specified w.r.t. to the first (index 0)
domain or range axis.-
Constructor Summary
ConstructorDescriptionXYDataRangeAnnotation
(Range minimumDomainRange, Range minimumRangeRange) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
draw
(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) Draws the annotation.boolean
Tests this annotation for equality with an arbitrary object.boolean
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.Returns the range of x-values (in data space) that the annotation uses.Returns the range of y-values (in data space) that the annotation uses.int
hashCode()
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
-
Constructor Details
-
XYDataRangeAnnotation
Creates a new instance.- Parameters:
minimumDomainRange
- the range to ensure on the domain axis (null
permitted).minimumRangeRange
- the range to ensure on the range axis (null
permitted).
-
-
Method Details
-
getIncludeInDataBounds
Description copied from interface:XYAnnotationBoundsInfo
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.- Specified by:
getIncludeInDataBounds
in interfaceXYAnnotationBoundsInfo
- Returns:
- A boolean.
-
getXRange
Description copied from interface:XYAnnotationBoundsInfo
Returns the range of x-values (in data space) that the annotation uses.- Specified by:
getXRange
in interfaceXYAnnotationBoundsInfo
- Returns:
- The x-range.
-
getYRange
Description copied from interface:XYAnnotationBoundsInfo
Returns the range of y-values (in data space) that the annotation uses.- Specified by:
getYRange
in interfaceXYAnnotationBoundsInfo
- Returns:
- The y-range.
-
draw
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) Description copied from class:AbstractXYAnnotation
Draws the annotation.- Specified by:
draw
in interfaceXYAnnotation
- Specified by:
draw
in 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
Description copied from class:AbstractXYAnnotation
Returns a hash code for this instance.- Overrides:
hashCode
in classAbstractXYAnnotation
- Returns:
- A hash code.
-
equals
Description copied from class:AbstractXYAnnotation
Tests this annotation for equality with an arbitrary object.- Overrides:
equals
in classAbstractXYAnnotation
- Parameters:
obj
- the object (null
permitted).- Returns:
- A boolean.
-