org.jfree.chart.plot
Class ContourPlot

java.lang.Object
  |
  +--org.jfree.chart.plot.Plot
        |
        +--org.jfree.chart.plot.ContourPlot
All Implemented Interfaces:
AxisChangeListener, AxisConstants, ContourValuePlot, DatasetChangeListener, java.util.EventListener, HorizontalValuePlot, java.beans.PropertyChangeListener, java.io.Serializable, VerticalValuePlot

public class ContourPlot
extends Plot
implements HorizontalValuePlot, VerticalValuePlot, ContourValuePlot, java.beans.PropertyChangeListener, java.io.Serializable

A class for creating shaded contours.

Author:
David M. O'Donnell
See Also:
Serialized Form

Field Summary
protected static java.awt.Insets DEFAULT_INSETS
          The default insets.
 
Fields inherited from class org.jfree.chart.plot.Plot
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
 
Fields inherited from interface org.jfree.chart.axis.AxisConstants
BOTTOM, DEFAULT_AXIS_LABEL_FONT, DEFAULT_AXIS_LABEL_INSETS, DEFAULT_AXIS_LABEL_PAINT, DEFAULT_AXIS_VISIBLE, DEFAULT_TICK_LABEL_FONT, DEFAULT_TICK_LABEL_INSETS, DEFAULT_TICK_LABEL_PAINT, DEFAULT_TICK_LABELS_VISIBLE, DEFAULT_TICK_MARK_INSIDE_LENGTH, DEFAULT_TICK_MARK_OUTSIDE_LENGTH, DEFAULT_TICK_MARK_PAINT, DEFAULT_TICK_MARK_STROKE, DEFAULT_TICK_MARKS_VISIBLE, LEFT, RIGHT, TOP
 
Constructor Summary
ContourPlot(ContourDataset data, ValueAxis domainAxis, ValueAxis rangeAxis, NumberAxis colorBar)
          Constructs a Contour Plot with the specified axes (other attributes take default values).
 
Method Summary
 void addAnnotation(Annotation annotation)
          Adds an annotation to the plot.
 void addDomainMarker(Marker marker)
          Adds a marker for the domain axis.
 void addRangeMarker(Marker marker)
          Adds a marker for the range axis.
 void axisChanged(AxisChangeEvent event)
          Receives notification of a change to one of the plot's axes.
 void clearAnnotations()
          Clears all the annotations.
 void clearDomainMarkers()
          Clears all the domain markers.
 void clearRangeMarkers()
          Clears all the range markers.
 void contourRenderer(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, ContourPlot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis, ColorBarAxis colorBarAxis, ContourDataset data, CrosshairInfo crosshairInfo)
          Fills the plot.
 void datasetChanged(DatasetChangeEvent event)
          Receives notification of a change to the plot's dataset.
 void draw(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D plotArea, ChartRenderingInfo info)
          Draws the plot on a Java 2D graphics device (such as the screen or a printer).
 void drawDomainMarker(java.awt.Graphics2D g2, ContourPlot plot, ValueAxis domainAxis, Marker marker, java.awt.geom.Rectangle2D dataArea)
          Draws a vertical line on the chart to represent a 'range marker'.
protected  void drawHorizontalLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
          Utility method for drawing a crosshair on the chart (if required).
 void drawRangeMarker(java.awt.Graphics2D g2, ContourPlot plot, ValueAxis rangeAxis, Marker marker, java.awt.geom.Rectangle2D dataArea)
          Draws a horizontal line across the chart to represent a 'range marker'.
protected  void drawVerticalLine(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, double value, java.awt.Stroke stroke, java.awt.Paint paint)
          Utility method for drawing a crosshair on the chart (if required).
 ClipPath getClipPath()
          Returns the clipPath.
 ValueAxis getColorBarValueAxis()
          Returns the colorbar axis.
 Range getContourDataRange()
          Returns the range for the Contours.
 ContourDataset getContourDataset()
          A convenience method that returns the dataset for the plot, cast as a ContourDataset.
 ValueAxis getDomainAxis()
          Returns the domain axis for the plot.
 java.awt.Paint getDomainCrosshairPaint()
          Returns the domain crosshair color.
 java.awt.Stroke getDomainCrosshairStroke()
          Returns the Stroke used to draw the crosshair (if visible).
 double getDomainCrosshairValue()
          Returns the domain crosshair value.
 HorizontalAxis getHorizontalAxis()
          Returns the horizontal axis.
 Range getHorizontalDataRange(ValueAxis axis)
          Returns the range for the horizontal axis.
 ValueAxis getHorizontalValueAxis()
          Returns the horizontal axis.
 java.awt.Paint getMissingPaint()
          Returns the missingPaint.
 java.lang.String getPlotType()
          Returns the plot type as a string.
 double getPtSizePct()
          Returns the ptSizePct.
 ValueAxis getRangeAxis()
          Returns the range axis for the plot.
 java.awt.Paint getRangeCrosshairPaint()
          Returns the range crosshair color.
 java.awt.Stroke getRangeCrosshairStroke()
          Returns the Stroke used to draw the crosshair (if visible).
 double getRangeCrosshairValue()
          Returns the range crosshair value.
 ContourToolTipGenerator getToolTipGenerator()
          Returns the tool tip generator.
 XYURLGenerator getURLGenerator()
          Returns the URL generator for HTML image maps.
 VerticalAxis getVerticalAxis()
          Returns the vertical axis.
 Range getVerticalDataRange(ValueAxis axis)
          Returns the range for the vertical axis.
 ValueAxis getVerticalValueAxis()
          Returns the vertical axis.
 void handleClick(int x, int y, ChartRenderingInfo info)
          Handles a 'click' on the plot by updating the anchor values...
 boolean isCompatibleColorBarAxis(NumberAxis axis)
          Checks the compatibility of a colorbar axis, returning true if the axis is compatible with the plot, and false otherwise.
 boolean isCompatibleDomainAxis(ValueAxis axis)
          Checks the compatibility of a domain axis, returning true if the axis is compatible with the plot, and false otherwise.
 boolean isCompatibleRangeAxis(ValueAxis axis)
          Checks the compatibility of a range axis, returning true if the axis is compatible with the plot, and false otherwise.
 boolean isDomainCrosshairLockedOnData()
          Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
 boolean isDomainCrosshairVisible()
          Returns a flag indicating whether or not the domain crosshair is visible.
 boolean isRangeCrosshairLockedOnData()
          Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.
 boolean isRangeCrosshairVisible()
          Returns a flag indicating whether or not the range crosshair is visible.
 boolean isRenderAsPoints()
          Returns the renderAsPoints.
 void pointRenderer(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, ContourPlot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis, ColorBarAxis colorBar, ContourDataset data, CrosshairInfo crosshairInfo)
          Draws the visual representation of a single data item.
 void propertyChange(java.beans.PropertyChangeEvent event)
          Notifies all registered listeners of a property change.
 void render(java.awt.Graphics2D g2, java.awt.geom.Rectangle2D dataArea, ChartRenderingInfo info, CrosshairInfo crosshairInfo)
          Draws a representation of the data within the dataArea region, using the current renderer.
 void setClipPath(ClipPath clipPath)
          Sets the clipPath.
 void setColorBarAxis(NumberAxis axis)
          Sets the colorbar axis for the plot.
 void setDomainAxis(ValueAxis axis)
          Sets the domain axis for the plot (this must be compatible with the plot type or an exception is thrown).
 void setDomainCrosshairLockedOnData(boolean flag)
          Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.
 void setDomainCrosshairPaint(java.awt.Paint paint)
          Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
 void setDomainCrosshairStroke(java.awt.Stroke stroke)
          Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
 void setDomainCrosshairValue(double value)
          Sets the domain crosshair value.
 void setDomainCrosshairValue(double value, boolean notify)
          Sets the domain crosshair value.
 void setDomainCrosshairVisible(boolean flag)
          Sets the flag indicating whether or not the domain crosshair is visible.
 void setMissingPaint(java.awt.Paint missingPaint)
          Sets the missingPaint.
 void setPtSizePct(double ptSizePct)
          Sets the ptSizePct.
 void setRangeAxis(ValueAxis axis)
          Sets the range axis for the plot.
 void setRangeCrosshairLockedOnData(boolean flag)
          Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.
 void setRangeCrosshairPaint(java.awt.Paint paint)
          Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
 void setRangeCrosshairStroke(java.awt.Stroke stroke)
          Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.
 void setRangeCrosshairValue(double value)
          Sets the domain crosshair value.
 void setRangeCrosshairValue(double value, boolean notify)
          Sets the range crosshair value.
 void setRangeCrosshairVisible(boolean flag)
          Sets the flag indicating whether or not the range crosshair is visible.
 void setRenderAsPoints(boolean renderAsPoints)
          Sets the renderAsPoints.
 void setToolTipGenerator(ContourToolTipGenerator generator)
          Sets the tool tip generator.
 void setURLGenerator(XYURLGenerator urlGenerator)
          Sets the URL generator for HTML image maps.
 Range visibleRange(ContourDataset data, Range x, Range y)
          Returns the visible z-range.
 void zoom(double percent)
          Zooms the axis ranges by the specified percentage about the anchor point.
 
Methods inherited from class org.jfree.chart.plot.Plot
addChangeListener, drawBackground, drawNoDataMessage, drawOutline, equals, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundPaint, getDataAreaRatio, getDataset, getDatasetGroup, getForegroundAlpha, getInsets, getLegendItems, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOppositeAxisLocation, getOutlinePaint, getOutlineStroke, getParent, getRectX, getRectY, getRootPlot, getSecondaryDataset, isSubplot, notifyListeners, removeChangeListener, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundPaint, setDataAreaRatio, setDataset, setDatasetGroup, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setOutlinePaint, setOutlineStroke, setParent, setSecondaryDataset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INSETS

protected static final java.awt.Insets DEFAULT_INSETS
The default insets.

Constructor Detail

ContourPlot

public ContourPlot(ContourDataset data,
                   ValueAxis domainAxis,
                   ValueAxis rangeAxis,
                   NumberAxis colorBar)
Constructs a Contour Plot with the specified axes (other attributes take default values).

Parameters:
data - The dataset.
domainAxis - The domain axis.
rangeAxis - The range axis.
colorBar - The z-axis axis.
Method Detail

getContourDataset

public ContourDataset getContourDataset()
A convenience method that returns the dataset for the plot, cast as a ContourDataset.

Returns:
The dataset for the plot, cast as an ContourDataset.

getDomainAxis

public ValueAxis getDomainAxis()
Returns the domain axis for the plot.

Returns:
The domain axis.

setDomainAxis

public void setDomainAxis(ValueAxis axis)
                   throws AxisNotCompatibleException
Sets the domain axis for the plot (this must be compatible with the plot type or an exception is thrown).

Parameters:
axis - The new axis.
Throws:
AxisNotCompatibleException - if the axis is not compatible.

getRangeAxis

public ValueAxis getRangeAxis()
Returns the range axis for the plot.

Returns:
The range axis.

setRangeAxis

public void setRangeAxis(ValueAxis axis)
                  throws AxisNotCompatibleException
Sets the range axis for the plot.

An exception is thrown if the new axis and the plot are not mutually compatible.

Parameters:
axis - The new axis (null permitted).
Throws:
AxisNotCompatibleException - if the axis is not compatible.

setColorBarAxis

public void setColorBarAxis(NumberAxis axis)
                     throws AxisNotCompatibleException
Sets the colorbar axis for the plot.

An exception is thrown if the new axis and the plot are not mutually compatible.

Parameters:
axis - The new axis (null permitted).
Throws:
AxisNotCompatibleException - if the axis is not compatible.

addDomainMarker

public void addDomainMarker(Marker marker)
Adds a marker for the domain axis.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters:
marker - the marker.

clearDomainMarkers

public void clearDomainMarkers()
Clears all the domain markers.


addRangeMarker

public void addRangeMarker(Marker marker)
Adds a marker for the range axis.

Typically a marker will be drawn by the renderer as a line perpendicular to the range axis, however this is entirely up to the renderer.

Parameters:
marker - The marker.

clearRangeMarkers

public void clearRangeMarkers()
Clears all the range markers.


addAnnotation

public void addAnnotation(Annotation annotation)
Adds an annotation to the plot.

Parameters:
annotation - the annotation.

clearAnnotations

public void clearAnnotations()
Clears all the annotations.


isCompatibleDomainAxis

public boolean isCompatibleDomainAxis(ValueAxis axis)
Checks the compatibility of a domain axis, returning true if the axis is compatible with the plot, and false otherwise.

Parameters:
axis - The proposed axis.
Returns:
true if the axis is compatible with the plot.

isCompatibleRangeAxis

public boolean isCompatibleRangeAxis(ValueAxis axis)
Checks the compatibility of a range axis, returning true if the axis is compatible with the plot, and false otherwise.

Parameters:
axis - The proposed axis.
Returns:
true if the axis is compatible with the plot.

isCompatibleColorBarAxis

public boolean isCompatibleColorBarAxis(NumberAxis axis)
Checks the compatibility of a colorbar axis, returning true if the axis is compatible with the plot, and false otherwise.

Parameters:
axis - The proposed axis.
Returns:
true if the axis is compatible with the plot.

draw

public void draw(java.awt.Graphics2D g2,
                 java.awt.geom.Rectangle2D plotArea,
                 ChartRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a printer).

The optional info argument collects information about the rendering of the plot (dimensions, tooltip information etc). Just pass in null if you do not need this information.

Specified by:
draw in class Plot
Parameters:
g2 - the graphics device.
plotArea - the area within which the plot (including axis labels) should be drawn.
info - collects chart drawing information (null permitted).

render

public void render(java.awt.Graphics2D g2,
                   java.awt.geom.Rectangle2D dataArea,
                   ChartRenderingInfo info,
                   CrosshairInfo crosshairInfo)
Draws a representation of the data within the dataArea region, using the current renderer.

The info and crosshairInfo arguments may be null.

Parameters:
g2 - the graphics device.
dataArea - the region in which the data is to be drawn.
info - an optional object for collection dimension information.
crosshairInfo - an optional object for collecting crosshair info.

contourRenderer

public void contourRenderer(java.awt.Graphics2D g2,
                            java.awt.geom.Rectangle2D dataArea,
                            ChartRenderingInfo info,
                            ContourPlot plot,
                            ValueAxis horizontalAxis,
                            ValueAxis verticalAxis,
                            ColorBarAxis colorBarAxis,
                            ContourDataset data,
                            CrosshairInfo crosshairInfo)
Fills the plot.

Parameters:
g2 - the graphics device.
dataArea - the area within which the data is being drawn.
info - collects information about the drawing.
plot - the plot (can be used to obtain standard color information etc).
horizontalAxis - the domain (horizontal) axis.
verticalAxis - the range (vertical) axis.
colorBarAxis - the color bar axis.
data - the dataset.
crosshairInfo - information about crosshairs on a plot.

pointRenderer

public void pointRenderer(java.awt.Graphics2D g2,
                          java.awt.geom.Rectangle2D dataArea,
                          ChartRenderingInfo info,
                          ContourPlot plot,
                          ValueAxis horizontalAxis,
                          ValueAxis verticalAxis,
                          ColorBarAxis colorBar,
                          ContourDataset data,
                          CrosshairInfo crosshairInfo)
Draws the visual representation of a single data item.

Parameters:
g2 - the graphics device.
dataArea - the area within which the data is being drawn.
info - collects information about the drawing.
plot - the plot (can be used to obtain standard color information etc).
data - the dataset.
crosshairInfo - information about crosshairs on a plot.

drawVerticalLine

protected void drawVerticalLine(java.awt.Graphics2D g2,
                                java.awt.geom.Rectangle2D dataArea,
                                double value,
                                java.awt.Stroke stroke,
                                java.awt.Paint paint)
Utility method for drawing a crosshair on the chart (if required).

Parameters:
g2 - The graphics device.
dataArea - The data area.
value - The coordinate, where to draw the line.
stroke - The stroke to use.
paint - The paint to use.

drawHorizontalLine

protected void drawHorizontalLine(java.awt.Graphics2D g2,
                                  java.awt.geom.Rectangle2D dataArea,
                                  double value,
                                  java.awt.Stroke stroke,
                                  java.awt.Paint paint)
Utility method for drawing a crosshair on the chart (if required).

Parameters:
g2 - The graphics device.
dataArea - The data area.
value - The coordinate, where to draw the line.
stroke - The stroke to use.
paint - The paint to use.

handleClick

public void handleClick(int x,
                        int y,
                        ChartRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values...

Overrides:
handleClick in class Plot
Parameters:
x - x-coordinate, where the click occured.
y - y-coordinate, where the click occured.
info - An object for collection dimension information.

zoom

public void zoom(double percent)
Zooms the axis ranges by the specified percentage about the anchor point.

Overrides:
zoom in class Plot
Parameters:
percent - The amount of the zoom.

getPlotType

public java.lang.String getPlotType()
Returns the plot type as a string.

Specified by:
getPlotType in class Plot
Returns:
A short string describing the type of plot.

getHorizontalDataRange

public Range getHorizontalDataRange(ValueAxis axis)
Returns the range for the horizontal axis.

Specified by:
getHorizontalDataRange in interface HorizontalValuePlot
Parameters:
axis - the axis.
Returns:
The range for the horizontal axis.

getVerticalDataRange

public Range getVerticalDataRange(ValueAxis axis)
Returns the range for the vertical axis.

Specified by:
getVerticalDataRange in interface VerticalValuePlot
Parameters:
axis - the axis.
Returns:
The range for the vertical axis.

getContourDataRange

public Range getContourDataRange()
Returns the range for the Contours.

Specified by:
getContourDataRange in interface ContourValuePlot
Returns:
The range for the Contours (z-axis).

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Notifies all registered listeners of a property change.

One source of property change events is the plot's renderer.

Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Parameters:
event - Information about the property change.

datasetChanged

public void datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.

The chart reacts by passing on a chart change event to all registered listeners.

Specified by:
datasetChanged in interface DatasetChangeListener
Overrides:
datasetChanged in class Plot
Parameters:
event - Information about the event (not used here).

getHorizontalAxis

public HorizontalAxis getHorizontalAxis()
Returns the horizontal axis.

Returns:
The horizontal axis.

getHorizontalValueAxis

public ValueAxis getHorizontalValueAxis()
Returns the horizontal axis.

This method is part of the HorizontalValuePlot interface.

Specified by:
getHorizontalValueAxis in interface HorizontalValuePlot
Returns:
The horizontal axis.

getVerticalAxis

public VerticalAxis getVerticalAxis()
Returns the vertical axis.

Returns:
The vertical axis.

getColorBarValueAxis

public ValueAxis getColorBarValueAxis()
Returns the colorbar axis.

Specified by:
getColorBarValueAxis in interface ContourValuePlot
Returns:
The colorbar axis.

getVerticalValueAxis

public ValueAxis getVerticalValueAxis()
Returns the vertical axis.

This method is part of the VerticalValuePlot interface.

Specified by:
getVerticalValueAxis in interface VerticalValuePlot
Returns:
The vertical axis.

isDomainCrosshairVisible

public boolean isDomainCrosshairVisible()
Returns a flag indicating whether or not the domain crosshair is visible.

Returns:
the flag.

setDomainCrosshairVisible

public void setDomainCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the domain crosshair is visible.

Parameters:
flag - the new value of the flag.

isDomainCrosshairLockedOnData

public boolean isDomainCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.

Returns:
the flag.

setDomainCrosshairLockedOnData

public void setDomainCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the domain crosshair should "lock-on" to actual data values.

Parameters:
flag - the flag.

getDomainCrosshairValue

public double getDomainCrosshairValue()
Returns the domain crosshair value.

Returns:
The value.

setDomainCrosshairValue

public void setDomainCrosshairValue(double value)
Sets the domain crosshair value.

Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.

Parameters:
value - the new value.

setDomainCrosshairValue

public void setDomainCrosshairValue(double value,
                                    boolean notify)
Sets the domain crosshair value.

Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.

Parameters:
value - the new value.
notify - a flag that controls whether or not listeners are notified.

getDomainCrosshairStroke

public java.awt.Stroke getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).

Returns:
the crosshair stroke.

setDomainCrosshairStroke

public void setDomainCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.

Parameters:
stroke - the new crosshair stroke.

getDomainCrosshairPaint

public java.awt.Paint getDomainCrosshairPaint()
Returns the domain crosshair color.

Returns:
the crosshair color.

setDomainCrosshairPaint

public void setDomainCrosshairPaint(java.awt.Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.

Parameters:
paint - the new crosshair paint.

isRangeCrosshairVisible

public boolean isRangeCrosshairVisible()
Returns a flag indicating whether or not the range crosshair is visible.

Returns:
the flag.

setRangeCrosshairVisible

public void setRangeCrosshairVisible(boolean flag)
Sets the flag indicating whether or not the range crosshair is visible.

Parameters:
flag - the new value of the flag.

isRangeCrosshairLockedOnData

public boolean isRangeCrosshairLockedOnData()
Returns a flag indicating whether or not the crosshair should "lock-on" to actual data values.

Returns:
the flag.

setRangeCrosshairLockedOnData

public void setRangeCrosshairLockedOnData(boolean flag)
Sets the flag indicating whether or not the range crosshair should "lock-on" to actual data values.

Parameters:
flag - the flag.

getRangeCrosshairValue

public double getRangeCrosshairValue()
Returns the range crosshair value.

Returns:
The value.

setRangeCrosshairValue

public void setRangeCrosshairValue(double value)
Sets the domain crosshair value.

Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.

Parameters:
value - the new value.

setRangeCrosshairValue

public void setRangeCrosshairValue(double value,
                                   boolean notify)
Sets the range crosshair value.

Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.

Parameters:
value - the new value.
notify - a flag that controls whether or not listeners are notified.

getRangeCrosshairStroke

public java.awt.Stroke getRangeCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).

Returns:
the crosshair stroke.

setRangeCrosshairStroke

public void setRangeCrosshairStroke(java.awt.Stroke stroke)
Sets the Stroke used to draw the crosshairs (if visible) and notifies registered listeners that the axis has been modified.

Parameters:
stroke - the new crosshair stroke.

getRangeCrosshairPaint

public java.awt.Paint getRangeCrosshairPaint()
Returns the range crosshair color.

Returns:
the crosshair color.

setRangeCrosshairPaint

public void setRangeCrosshairPaint(java.awt.Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies registered listeners that the axis has been modified.

Parameters:
paint - the new crosshair paint.

getToolTipGenerator

public ContourToolTipGenerator getToolTipGenerator()
Returns the tool tip generator.

Returns:
the tool tip generator (possibly null).

setToolTipGenerator

public void setToolTipGenerator(ContourToolTipGenerator generator)
Sets the tool tip generator.

Parameters:
generator - the tool tip generator (null permitted).

getURLGenerator

public XYURLGenerator getURLGenerator()
Returns the URL generator for HTML image maps.

Returns:
the URL generator (possibly null).

setURLGenerator

public void setURLGenerator(XYURLGenerator urlGenerator)
Sets the URL generator for HTML image maps.

Parameters:
urlGenerator - the URL generator (null permitted).

drawDomainMarker

public void drawDomainMarker(java.awt.Graphics2D g2,
                             ContourPlot plot,
                             ValueAxis domainAxis,
                             Marker marker,
                             java.awt.geom.Rectangle2D dataArea)
Draws a vertical line on the chart to represent a 'range marker'.

Parameters:
g2 - the graphics device.
plot - the plot.
domainAxis - the domain axis.
marker - the marker line.
dataArea - the axis data area.

drawRangeMarker

public void drawRangeMarker(java.awt.Graphics2D g2,
                            ContourPlot plot,
                            ValueAxis rangeAxis,
                            Marker marker,
                            java.awt.geom.Rectangle2D dataArea)
Draws a horizontal line across the chart to represent a 'range marker'.

Parameters:
g2 - the graphics device.
plot - the plot.
rangeAxis - the range axis.
marker - the marker line.
dataArea - the axis data area.

getClipPath

public ClipPath getClipPath()
Returns the clipPath.

Returns:
ClipPath

setClipPath

public void setClipPath(ClipPath clipPath)
Sets the clipPath.

Parameters:
clipPath - The clipPath to set

getPtSizePct

public double getPtSizePct()
Returns the ptSizePct.

Returns:
double

isRenderAsPoints

public boolean isRenderAsPoints()
Returns the renderAsPoints.

Returns:
boolean

setPtSizePct

public void setPtSizePct(double ptSizePct)
Sets the ptSizePct.

Parameters:
ptSizePct - The ptSizePct to set

setRenderAsPoints

public void setRenderAsPoints(boolean renderAsPoints)
Sets the renderAsPoints.

Parameters:
renderAsPoints - The renderAsPoints to set

axisChanged

public void axisChanged(AxisChangeEvent event)
Receives notification of a change to one of the plot's axes.

Specified by:
axisChanged in interface AxisChangeListener
Overrides:
axisChanged in class Plot
Parameters:
event - information about the event.

visibleRange

public Range visibleRange(ContourDataset data,
                          Range x,
                          Range y)
Returns the visible z-range.

Parameters:
data - the dataset.
x - the x range.
y - the y range.
Returns:
The range.

getMissingPaint

public java.awt.Paint getMissingPaint()
Returns the missingPaint.

Returns:
Paint

setMissingPaint

public void setMissingPaint(java.awt.Paint missingPaint)
Sets the missingPaint.

Parameters:
missingPaint - The missingPaint to set