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
ConstructorsConstructorDescriptionXYDataRangeAnnotation(Range minimumDomainRange, Range minimumRangeRange) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoiddraw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) Draws the annotation.booleanTests this annotation for equality with an arbitrary object.booleanReturns 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.inthashCode()Returns a hash code for this instance.Methods inherited from class org.jfree.chart.annotations.AbstractXYAnnotation
addEntity, canEqual, getToolTipText, getURL, setToolTipText, setURLMethods inherited from class org.jfree.chart.annotations.AbstractAnnotation
addChangeListener, clone, fireAnnotationChanged, getNotify, hasListener, notifyListeners, removeChangeListener, setNotifyMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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 (nullpermitted).minimumRangeRange- the range to ensure on the range axis (nullpermitted).
-
-
Method Details
-
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
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
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(Graphics2D g2, XYPlot plot, 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
Description copied from class:AbstractXYAnnotationReturns a hash code for this instance.- Overrides:
hashCodein classAbstractXYAnnotation- Returns:
- A hash code.
-
equals
Description copied from class:AbstractXYAnnotationTests this annotation for equality with an arbitrary object.- Overrides:
equalsin classAbstractXYAnnotation- Parameters:
obj- the object (nullpermitted).- Returns:
- A boolean.
-