org.jfree.chart.plot
public class ContourPlot extends Plot implements ContourValuePlot, ValueAxisPlot, PropertyChangeListener, Serializable, Cloneable
Deprecated: This plot is no longer supported, please use XYPlot with an XYBlockRenderer.
A class for creating shaded contours.Field Summary | |
---|---|
protected static RectangleInsets | DEFAULT_INSETS The default insets. |
protected static ResourceBundle | localizationResources The resourceBundle for the localization. |
Constructor Summary | |
---|---|
ContourPlot()
Creates a new plot with no dataset or axes. | |
ContourPlot(ContourDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar)
Constructs a contour plot with the specified axes (other attributes take
default values).
|
Method Summary | |
---|---|
void | addAnnotation(XYAnnotation 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. |
Object | clone()
Extends plot cloning to this plot type |
void | contourRenderer(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, ContourPlot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis, ColorBar colorBar, ContourDataset data, CrosshairState crosshairState)
Fills the plot.
|
void | datasetChanged(DatasetChangeEvent event)
Receives notification of a change to the plot's dataset.
|
void | draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
Draws the plot on a Java 2D graphics device (such as the screen or a
printer).
|
void | drawDomainMarker(Graphics2D g2, ContourPlot plot, ValueAxis domainAxis, Marker marker, Rectangle2D dataArea)
Draws a vertical line on the chart to represent a 'range marker'.
|
protected void | drawHorizontalLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)
Utility method for drawing a crosshair on the chart (if required).
|
void | drawRangeMarker(Graphics2D g2, ContourPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea)
Draws a horizontal line across the chart to represent a 'range marker'.
|
protected void | drawVerticalLine(Graphics2D g2, Rectangle2D dataArea, double value, Stroke stroke, Paint paint)
Utility method for drawing a crosshair on the chart (if required).
|
ClipPath | getClipPath()
Returns the clipPath. |
ColorBar | getColorBar()
Returns the colorbar.
|
RectangleEdge | getColorBarLocation()
Returns the color bar location.
|
Range | getContourDataRange()
Returns the range for the Contours.
|
double | getDataAreaRatio()
Returns the data area ratio.
|
Range | getDataRange(ValueAxis axis)
Returns the range for an axis.
|
ContourDataset | getDataset()
Returns the primary dataset for the plot.
|
ValueAxis | getDomainAxis()
Returns the domain axis for the plot.
|
Paint | getDomainCrosshairPaint()
Returns the domain crosshair color.
|
Stroke | getDomainCrosshairStroke()
Returns the Stroke used to draw the crosshair (if visible).
|
double | getDomainCrosshairValue()
Returns the domain crosshair value.
|
Paint | getMissingPaint()
Returns the missingPaint. |
String | getPlotType()
Returns the plot type as a string.
|
double | getPtSizePct()
Returns the ptSizePct. |
ValueAxis | getRangeAxis()
Returns the range axis for the plot.
|
Paint | getRangeCrosshairPaint()
Returns the range crosshair color.
|
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.
|
void | handleClick(int x, int y, PlotRenderingInfo info)
Handles a 'click' on the plot by updating the anchor values...
|
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 | 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 | isDomainZoomable()
Returns false .
|
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 | isRangeZoomable()
Returns false .
|
boolean | isRenderAsPoints()
Returns the renderAsPoints. |
void | pointRenderer(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, ContourPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar, ContourDataset data, CrosshairState crosshairState)
Draws the visual representation of a single data item.
|
void | propertyChange(PropertyChangeEvent event)
Notifies all registered listeners of a property change.
|
void | render(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, CrosshairState crosshairState)
Draws a representation of the data within the dataArea region, using the
current renderer.
|
void | setClipPath(ClipPath clipPath)
Sets the clipPath. |
void | setColorBarAxis(ColorBar axis)
Sets the colorbar for the plot.
|
void | setColorBarLocation(RectangleEdge edge)
Sets the color bar location and sends a PlotChangeEvent to all
registered listeners.
|
void | setDataAreaRatio(double ratio)
Sets the data area ratio.
|
void | setDataset(ContourDataset dataset)
Sets the dataset for the plot, replacing the existing dataset if there
is one.
|
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(Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void | setDomainCrosshairStroke(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(Paint paint)
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(Paint paint)
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void | setRangeCrosshairStroke(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.
|
void | zoomDomainAxes(double x, double y, double factor)
Multiplies the range on the domain axis/axes by the specified factor
(to be implemented).
|
void | zoomDomainAxes(double x, double y, double lowerPercent, double upperPercent)
Zooms the domain axes (not yet implemented).
|
void | zoomRangeAxes(double x, double y, double factor)
Multiplies the range on the range axis/axes by the specified factor.
|
void | zoomRangeAxes(double x, double y, double lowerPercent, double upperPercent)
Zooms the range axes (not yet implemented).
|
Parameters: dataset The dataset. domainAxis The domain axis. rangeAxis The range axis. colorBar The z-axis axis.
Parameters: annotation the annotation.
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.
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.
Parameters: event information about the event.
See Also: clone
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. colorBar the color bar axis. data the dataset. crosshairState information about crosshairs on a plot.
The chart reacts by passing on a chart change event to all registered listeners.
Parameters: event Information about the event (not used here).
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.
Parameters: g2 the graphics device. area the area within which the plot (including axis labels)
should be drawn. anchor the anchor point (null
permitted). parentState the state from the parent plot, if there is one. info collects chart drawing information (null
permitted).
Parameters: g2 the graphics device. plot the plot. domainAxis the domain axis. marker the marker line. dataArea the axis data area.
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.
Parameters: g2 the graphics device. plot the plot. rangeAxis the range axis. marker the marker line. dataArea the axis data area.
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.
Returns: ClipPath
Returns: The colorbar.
Returns: The color bar location.
Returns: The range for the Contours (z-axis).
Returns: The ratio.
Parameters: axis the axis.
Returns: The range for an axis.
Returns: The primary dataset (possibly null
).
Returns: The domain axis.
Returns: The crosshair color.
Returns: The crosshair stroke.
Returns: The value.
Returns: Paint
Returns: A short string describing the type of plot.
Returns: double
Returns: The range axis.
Returns: The crosshair color.
Returns: The crosshair stroke.
Returns: The value.
Returns: The tool tip generator (possibly null).
Returns: The URL generator (possibly null).
Parameters: x x-coordinate, where the click occured. y y-coordinate, where the click occured. info An object for collection dimension information.
Parameters: axis The proposed axis.
Returns: true
if the axis is compatible with the plot.
Returns: The flag.
Returns: The flag.
false
.
Returns: A boolean.
Returns: The flag.
Returns: The flag.
false
.
Returns: A boolean.
Returns: boolean
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). domainAxis the domain (horizontal) axis. rangeAxis the range (vertical) axis. colorBar the color bar axis. data the dataset. crosshairState information about crosshairs on a plot.
One source of property change events is the plot's renderer.
Parameters: event Information about the property change.
The info
and crosshairState
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. crosshairState an optional object for collecting crosshair info.
Parameters: clipPath The clipPath to set
Parameters: axis The new axis (null permitted).
Parameters: edge the location.
Parameters: ratio the ratio.
Parameters: dataset the dataset (null
permitted).
Parameters: axis The new axis.
Parameters: flag the flag.
Parameters: paint the new crosshair paint.
Parameters: stroke the new crosshair stroke.
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
Parameters: value the new 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.
Parameters: flag the new value of the flag.
Parameters: paint the missingPaint to set.
Parameters: ptSizePct The ptSizePct to set
An exception is thrown if the new axis and the plot are not mutually compatible.
Parameters: axis The new axis (null permitted).
Parameters: flag the flag.
Parameters: paint the new crosshair paint.
Parameters: stroke the new crosshair stroke.
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
Parameters: value the new 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.
Parameters: flag the new value of the flag.
Parameters: renderAsPoints The renderAsPoints to set
Parameters: generator the tool tip generator (null permitted).
Parameters: urlGenerator the URL generator (null permitted).
Parameters: data the dataset. x the x range. y the y range.
Returns: The range.
Parameters: percent The amount of the zoom.
Parameters: x the x-coordinate (in Java2D space). y the y-coordinate (in Java2D space). factor the zoom factor.
Parameters: x the x-coordinate (in Java2D space). y the y-coordinate (in Java2D space). lowerPercent the new lower bound. upperPercent the new upper bound.
Parameters: x the x-coordinate (in Java2D space). y the y-coordinate (in Java2D space). factor the zoom factor.
Parameters: x the x-coordinate (in Java2D space). y the y-coordinate (in Java2D space). lowerPercent the new lower bound. upperPercent the new upper bound.