XYPlot
with
an XYBlockRenderer
.public class ContourPlot extends Plot implements ContourValuePlot, ValueAxisPlot, PropertyChangeListener, Serializable, Cloneable
DEFAULT_BACKGROUND_ALPHA, DEFAULT_BACKGROUND_PAINT, DEFAULT_FOREGROUND_ALPHA, DEFAULT_LEGEND_ITEM_BOX, DEFAULT_LEGEND_ITEM_CIRCLE, DEFAULT_OUTLINE_PAINT, DEFAULT_OUTLINE_STROKE, MINIMUM_HEIGHT_TO_DRAW, MINIMUM_WIDTH_TO_DRAW, ZERO
Constructor and Description |
---|
ContourPlot()
Deprecated.
Creates a new plot with no dataset or axes.
|
ContourPlot(ContourDataset dataset,
ValueAxis domainAxis,
ValueAxis rangeAxis,
ColorBar colorBar)
Deprecated.
Constructs a contour plot with the specified axes (other attributes take
default values).
|
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(XYAnnotation annotation)
Deprecated.
Adds an annotation to the plot.
|
void |
addDomainMarker(Marker marker)
Deprecated.
Adds a marker for the domain axis.
|
void |
addRangeMarker(Marker marker)
Deprecated.
Adds a marker for the range axis.
|
void |
axisChanged(AxisChangeEvent event)
Deprecated.
Receives notification of a change to one of the plot's axes.
|
void |
clearAnnotations()
Deprecated.
Clears all the annotations.
|
void |
clearDomainMarkers()
Deprecated.
Clears all the domain markers.
|
void |
clearRangeMarkers()
Deprecated.
Clears all the range markers.
|
Object |
clone()
Deprecated.
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)
Deprecated.
Fills the plot.
|
void |
datasetChanged(DatasetChangeEvent event)
Deprecated.
Receives notification of a change to the plot's dataset.
|
void |
draw(Graphics2D g2,
Rectangle2D area,
Point2D anchor,
PlotState parentState,
PlotRenderingInfo info)
Deprecated.
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)
Deprecated.
Draws a vertical line on the chart to represent a 'range marker'.
|
void |
drawRangeMarker(Graphics2D g2,
ContourPlot plot,
ValueAxis rangeAxis,
Marker marker,
Rectangle2D dataArea)
Deprecated.
Draws a horizontal line across the chart to represent a 'range marker'.
|
ClipPath |
getClipPath()
Deprecated.
Returns the clipPath.
|
ColorBar |
getColorBar()
Deprecated.
Returns the colorbar.
|
org.jfree.ui.RectangleEdge |
getColorBarLocation()
Deprecated.
Returns the color bar location.
|
Range |
getContourDataRange()
Deprecated.
Returns the range for the Contours.
|
double |
getDataAreaRatio()
Deprecated.
Returns the data area ratio.
|
Range |
getDataRange(ValueAxis axis)
Deprecated.
Returns the range for an axis.
|
ContourDataset |
getDataset()
Deprecated.
Returns the primary dataset for the plot.
|
ValueAxis |
getDomainAxis()
Deprecated.
Returns the domain axis for the plot.
|
Paint |
getDomainCrosshairPaint()
Deprecated.
Returns the domain crosshair color.
|
Stroke |
getDomainCrosshairStroke()
Deprecated.
Returns the Stroke used to draw the crosshair (if visible).
|
double |
getDomainCrosshairValue()
Deprecated.
Returns the domain crosshair value.
|
Paint |
getMissingPaint()
Deprecated.
Returns the missingPaint.
|
String |
getPlotType()
Deprecated.
Returns the plot type as a string.
|
double |
getPtSizePct()
Deprecated.
Returns the ptSizePct.
|
ValueAxis |
getRangeAxis()
Deprecated.
Returns the range axis for the plot.
|
Paint |
getRangeCrosshairPaint()
Deprecated.
Returns the range crosshair color.
|
Stroke |
getRangeCrosshairStroke()
Deprecated.
Returns the Stroke used to draw the crosshair (if visible).
|
double |
getRangeCrosshairValue()
Deprecated.
Returns the range crosshair value.
|
ContourToolTipGenerator |
getToolTipGenerator()
Deprecated.
Returns the tool tip generator.
|
XYURLGenerator |
getURLGenerator()
Deprecated.
Returns the URL generator for HTML image maps.
|
void |
handleClick(int x,
int y,
PlotRenderingInfo info)
Deprecated.
Handles a 'click' on the plot by updating the anchor values...
|
boolean |
isCompatibleDomainAxis(ValueAxis axis)
Deprecated.
Checks the compatibility of a domain axis, returning true if the axis is
compatible with the plot, and false otherwise.
|
boolean |
isDomainCrosshairLockedOnData()
Deprecated.
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
|
boolean |
isDomainCrosshairVisible()
Deprecated.
Returns a flag indicating whether or not the domain crosshair is visible.
|
boolean |
isDomainZoomable()
Deprecated.
Returns
false . |
boolean |
isRangeCrosshairLockedOnData()
Deprecated.
Returns a flag indicating whether or not the crosshair should "lock-on"
to actual data values.
|
boolean |
isRangeCrosshairVisible()
Deprecated.
Returns a flag indicating whether or not the range crosshair is visible.
|
boolean |
isRangeZoomable()
Deprecated.
Returns
false . |
boolean |
isRenderAsPoints()
Deprecated.
Returns the renderAsPoints.
|
void |
pointRenderer(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info,
ContourPlot plot,
ValueAxis domainAxis,
ValueAxis rangeAxis,
ColorBar colorBar,
ContourDataset data,
CrosshairState crosshairState)
Deprecated.
Draws the visual representation of a single data item.
|
void |
propertyChange(PropertyChangeEvent event)
Deprecated.
Notifies all registered listeners of a property change.
|
void |
render(Graphics2D g2,
Rectangle2D dataArea,
PlotRenderingInfo info,
CrosshairState crosshairState)
Deprecated.
Draws a representation of the data within the dataArea region, using the
current renderer.
|
void |
setClipPath(ClipPath clipPath)
Deprecated.
Sets the clipPath.
|
void |
setColorBarAxis(ColorBar axis)
Deprecated.
Sets the colorbar for the plot.
|
void |
setColorBarLocation(org.jfree.ui.RectangleEdge edge)
Deprecated.
Sets the color bar location and sends a
PlotChangeEvent to all
registered listeners. |
void |
setDataAreaRatio(double ratio)
Deprecated.
Sets the data area ratio.
|
void |
setDataset(ContourDataset dataset)
Deprecated.
Sets the dataset for the plot, replacing the existing dataset if there
is one.
|
void |
setDomainAxis(ValueAxis axis)
Deprecated.
Sets the domain axis for the plot (this must be compatible with the plot
type or an exception is thrown).
|
void |
setDomainCrosshairLockedOnData(boolean flag)
Deprecated.
Sets the flag indicating whether or not the domain crosshair should
"lock-on" to actual data values.
|
void |
setDomainCrosshairPaint(Paint paint)
Deprecated.
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setDomainCrosshairStroke(Stroke stroke)
Deprecated.
Sets the Stroke used to draw the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setDomainCrosshairValue(double value)
Deprecated.
Sets the domain crosshair value.
|
void |
setDomainCrosshairValue(double value,
boolean notify)
Deprecated.
Sets the domain crosshair value.
|
void |
setDomainCrosshairVisible(boolean flag)
Deprecated.
Sets the flag indicating whether or not the domain crosshair is visible.
|
void |
setMissingPaint(Paint paint)
Deprecated.
Sets the missingPaint.
|
void |
setPtSizePct(double ptSizePct)
Deprecated.
Sets the ptSizePct.
|
void |
setRangeAxis(ValueAxis axis)
Deprecated.
Sets the range axis for the plot.
|
void |
setRangeCrosshairLockedOnData(boolean flag)
Deprecated.
Sets the flag indicating whether or not the range crosshair should
"lock-on" to actual data values.
|
void |
setRangeCrosshairPaint(Paint paint)
Deprecated.
Sets the Paint used to color the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setRangeCrosshairStroke(Stroke stroke)
Deprecated.
Sets the Stroke used to draw the crosshairs (if visible) and notifies
registered listeners that the axis has been modified.
|
void |
setRangeCrosshairValue(double value)
Deprecated.
Sets the domain crosshair value.
|
void |
setRangeCrosshairValue(double value,
boolean notify)
Deprecated.
Sets the range crosshair value.
|
void |
setRangeCrosshairVisible(boolean flag)
Deprecated.
Sets the flag indicating whether or not the range crosshair is visible.
|
void |
setRenderAsPoints(boolean renderAsPoints)
Deprecated.
Sets the renderAsPoints.
|
void |
setToolTipGenerator(ContourToolTipGenerator generator)
Deprecated.
Sets the tool tip generator.
|
void |
setURLGenerator(XYURLGenerator urlGenerator)
Deprecated.
Sets the URL generator for HTML image maps.
|
Range |
visibleRange(ContourDataset data,
Range x,
Range y)
Deprecated.
Returns the visible z-range.
|
void |
zoom(double percent)
Deprecated.
Zooms the axis ranges by the specified percentage about the anchor point.
|
void |
zoomDomainAxes(double x,
double y,
double factor)
Deprecated.
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)
Deprecated.
Zooms the domain axes (not yet implemented).
|
void |
zoomRangeAxes(double x,
double y,
double factor)
Deprecated.
Multiplies the range on the range axis/axes by the specified factor.
|
void |
zoomRangeAxes(double x,
double y,
double lowerPercent,
double upperPercent)
Deprecated.
Zooms the range axes (not yet implemented).
|
addChangeListener, annotationChanged, drawBackground, drawBackgroundImage, drawOutline, equals, getBackgroundAlpha, getBackgroundImage, getBackgroundImageAlignment, getBackgroundImageAlpha, getBackgroundPaint, getDatasetGroup, getDrawingSupplier, getForegroundAlpha, getInsets, getLegendItems, getNoDataMessage, getNoDataMessageFont, getNoDataMessagePaint, getOutlinePaint, getOutlineStroke, getParent, getRootPlot, isNotify, isOutlineVisible, isSubplot, markerChanged, notifyListeners, removeChangeListener, resolveDomainAxisLocation, resolveRangeAxisLocation, setBackgroundAlpha, setBackgroundImage, setBackgroundImageAlignment, setBackgroundImageAlpha, setBackgroundPaint, setDrawingSupplier, setDrawingSupplier, setForegroundAlpha, setInsets, setInsets, setNoDataMessage, setNoDataMessageFont, setNoDataMessagePaint, setNotify, setOutlinePaint, setOutlineStroke, setOutlineVisible, setParent
public ContourPlot()
public ContourPlot(ContourDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar)
dataset
- The dataset.domainAxis
- The domain axis.rangeAxis
- The range axis.colorBar
- The z-axis axis.public org.jfree.ui.RectangleEdge getColorBarLocation()
public void setColorBarLocation(org.jfree.ui.RectangleEdge edge)
PlotChangeEvent
to all
registered listeners.edge
- the location.public ContourDataset getDataset()
null
).public void setDataset(ContourDataset dataset)
dataset
- the dataset (null
permitted).public ValueAxis getDomainAxis()
public void setDomainAxis(ValueAxis axis)
axis
- The new axis.public ValueAxis getRangeAxis()
public void setRangeAxis(ValueAxis axis)
An exception is thrown if the new axis and the plot are not mutually compatible.
axis
- The new axis (null permitted).public void setColorBarAxis(ColorBar axis)
axis
- The new axis (null permitted).public double getDataAreaRatio()
public void setDataAreaRatio(double ratio)
ratio
- the ratio.public void addDomainMarker(Marker 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.
marker
- the marker.public void clearDomainMarkers()
public void addRangeMarker(Marker 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.
marker
- The marker.public void clearRangeMarkers()
public void addAnnotation(XYAnnotation annotation)
annotation
- the annotation.public void clearAnnotations()
public boolean isCompatibleDomainAxis(ValueAxis axis)
axis
- The proposed axis.true
if the axis is compatible with the plot.public void draw(Graphics2D g2, Rectangle2D area, Point2D anchor, PlotState parentState, PlotRenderingInfo info)
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.
draw
in class Plot
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).public void render(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, CrosshairState crosshairState)
The info
and crosshairState
arguments may be
null
.
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.public void contourRenderer(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, ContourPlot plot, ValueAxis horizontalAxis, ValueAxis verticalAxis, ColorBar colorBar, ContourDataset data, CrosshairState crosshairState)
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.public void pointRenderer(Graphics2D g2, Rectangle2D dataArea, PlotRenderingInfo info, ContourPlot plot, ValueAxis domainAxis, ValueAxis rangeAxis, ColorBar colorBar, ContourDataset data, CrosshairState crosshairState)
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.public void handleClick(int x, int y, PlotRenderingInfo info)
handleClick
in class Plot
x
- x-coordinate, where the click occured.y
- y-coordinate, where the click occured.info
- An object for collection dimension information.public void zoom(double percent)
public String getPlotType()
getPlotType
in class Plot
public Range getDataRange(ValueAxis axis)
getDataRange
in interface ValueAxisPlot
axis
- the axis.public Range getContourDataRange()
getContourDataRange
in interface ContourValuePlot
public void propertyChange(PropertyChangeEvent event)
One source of property change events is the plot's renderer.
propertyChange
in interface PropertyChangeListener
event
- Information about the property change.public void datasetChanged(DatasetChangeEvent event)
The chart reacts by passing on a chart change event to all registered listeners.
datasetChanged
in interface DatasetChangeListener
datasetChanged
in class Plot
event
- Information about the event (not used here).public ColorBar getColorBar()
public boolean isDomainCrosshairVisible()
public void setDomainCrosshairVisible(boolean flag)
flag
- the new value of the flag.public boolean isDomainCrosshairLockedOnData()
public void setDomainCrosshairLockedOnData(boolean flag)
flag
- the flag.public double getDomainCrosshairValue()
public void setDomainCrosshairValue(double value)
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
value
- the new value.public void setDomainCrosshairValue(double value, boolean notify)
Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.
value
- the new value.notify
- a flag that controls whether or not listeners are
notified.public Stroke getDomainCrosshairStroke()
public void setDomainCrosshairStroke(Stroke stroke)
stroke
- the new crosshair stroke.public Paint getDomainCrosshairPaint()
public void setDomainCrosshairPaint(Paint paint)
paint
- the new crosshair paint.public boolean isRangeCrosshairVisible()
public void setRangeCrosshairVisible(boolean flag)
flag
- the new value of the flag.public boolean isRangeCrosshairLockedOnData()
public void setRangeCrosshairLockedOnData(boolean flag)
flag
- the flag.public double getRangeCrosshairValue()
public void setRangeCrosshairValue(double value)
Registered listeners are notified that the plot has been modified, but only if the crosshair is visible.
value
- the new value.public void setRangeCrosshairValue(double value, boolean notify)
Registered listeners are notified that the axis has been modified, but only if the crosshair is visible.
value
- the new value.notify
- a flag that controls whether or not listeners are
notified.public Stroke getRangeCrosshairStroke()
public void setRangeCrosshairStroke(Stroke stroke)
stroke
- the new crosshair stroke.public Paint getRangeCrosshairPaint()
public void setRangeCrosshairPaint(Paint paint)
paint
- the new crosshair paint.public ContourToolTipGenerator getToolTipGenerator()
public void setToolTipGenerator(ContourToolTipGenerator generator)
generator
- the tool tip generator (null permitted).public XYURLGenerator getURLGenerator()
public void setURLGenerator(XYURLGenerator urlGenerator)
urlGenerator
- the URL generator (null permitted).public void drawDomainMarker(Graphics2D g2, ContourPlot plot, ValueAxis domainAxis, Marker marker, Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.domainAxis
- the domain axis.marker
- the marker line.dataArea
- the axis data area.public void drawRangeMarker(Graphics2D g2, ContourPlot plot, ValueAxis rangeAxis, Marker marker, Rectangle2D dataArea)
g2
- the graphics device.plot
- the plot.rangeAxis
- the range axis.marker
- the marker line.dataArea
- the axis data area.public ClipPath getClipPath()
public void setClipPath(ClipPath clipPath)
clipPath
- The clipPath to setpublic double getPtSizePct()
public boolean isRenderAsPoints()
public void setPtSizePct(double ptSizePct)
ptSizePct
- The ptSizePct to setpublic void setRenderAsPoints(boolean renderAsPoints)
renderAsPoints
- The renderAsPoints to setpublic void axisChanged(AxisChangeEvent event)
axisChanged
in interface AxisChangeListener
axisChanged
in class Plot
event
- information about the event.public Range visibleRange(ContourDataset data, Range x, Range y)
data
- the dataset.x
- the x range.y
- the y range.public Paint getMissingPaint()
public void setMissingPaint(Paint paint)
paint
- the missingPaint to set.public void zoomDomainAxes(double x, double y, double factor)
x
- the x-coordinate (in Java2D space).y
- the y-coordinate (in Java2D space).factor
- the zoom factor.public void zoomDomainAxes(double x, double y, double lowerPercent, double upperPercent)
x
- the x-coordinate (in Java2D space).y
- the y-coordinate (in Java2D space).lowerPercent
- the new lower bound.upperPercent
- the new upper bound.public void zoomRangeAxes(double x, double y, double factor)
x
- the x-coordinate (in Java2D space).y
- the y-coordinate (in Java2D space).factor
- the zoom factor.public void zoomRangeAxes(double x, double y, double lowerPercent, double upperPercent)
x
- the x-coordinate (in Java2D space).y
- the y-coordinate (in Java2D space).lowerPercent
- the new lower bound.upperPercent
- the new upper bound.public boolean isDomainZoomable()
false
.public boolean isRangeZoomable()
false
.public Object clone() throws CloneNotSupportedException
clone
in interface org.jfree.util.PublicCloneable
clone
in class Plot
CloneNotSupportedException
- if some component of the plot does not
support cloning.Plot.clone()
Jas4pp 1.5 © Java Analysis Studio for Particle Physics