public class

ThermometerPlot

extends Plot
implements Serializable Cloneable ValueAxisPlot Zoomable
java.lang.Object
   ↳ org.jfree.chart.plot.Plot
     ↳ org.jfree.chart.plot.ThermometerPlot

Class Overview

A plot that displays a single value (from a ValueDataset) in a thermometer type display.

This plot supports a number of options:

  1. three sub-ranges which could be viewed as 'Normal', 'Warning' and 'Critical' ranges.
  2. the thermometer can be run in two modes:
    • fixed range, or
    • range adjusts to current sub-range.
  3. settable units to be displayed.
  4. settable display location for the value text.

Summary

Constants
int AXIS_GAP The axis gap.
int BULB A constant for the value label position (in the thermometer bulb).
int BULB_DIAMETER This constant is deprecated. As of 1.0.7, use getBulbDiameter().
int BULB_RADIUS This constant is deprecated. As of 1.0.7, use getBulbRadius().
int COLUMN_DIAMETER This constant is deprecated. As of 1.0.7, use getColumnDiameter().
int COLUMN_RADIUS This constant is deprecated. As of 1.0.7, use getColumnRadius().
int CRITICAL A constant for the 'critical' range.
int DEFAULT_BULB_RADIUS The default bulb radius.
int DEFAULT_COLUMN_RADIUS The default column radius.
int DEFAULT_GAP The default gap between the outlines representing the thermometer.
double DEFAULT_LOWER_BOUND The default lower bound.
double DEFAULT_UPPER_BOUND The default upper bound.
int DISPLAY_HIGH Index for display high value in subrangeInfo matrix.
int DISPLAY_LOW Index for display low value in subrangeInfo matrix.
int GAP_DIAMETER This constant is deprecated. As of 1.0.7, use getGap() times two.
int GAP_RADIUS This constant is deprecated. As of 1.0.7, use getGap().
int LEFT A constant for the value label position (left of the thermometer).
int NONE A constant for the value label position (no label).
int NORMAL A constant for the 'normal' range.
int RANGE_HIGH Index for high value in subrangeInfo matrix.
int RANGE_LOW Index for low value in subrangeInfo matrix.
int RIGHT A constant for the value label position (right of the thermometer).
int UNITS_CELCIUS A constant for unit type 'Celcius'.
int UNITS_FAHRENHEIT A constant for unit type 'Fahrenheit'.
int UNITS_KELVIN A constant for unit type 'Kelvin'.
int UNITS_NONE A constant for unit type 'None'.
int WARNING A constant for the 'warning' range.
[Expand]
Inherited Constants
From class org.jfree.chart.plot.Plot
Fields
protected static final String[] UNITS The unit strings.
protected static ResourceBundle localizationResources The resourceBundle for the localization.
[Expand]
Inherited Fields
From class org.jfree.chart.plot.Plot
Public Constructors
ThermometerPlot()
Creates a new thermometer plot.
ThermometerPlot(ValueDataset dataset)
Creates a new thermometer plot, using default attributes where necessary.
Public Methods
Object clone()
Returns a clone of the plot.
void datasetChanged(DatasetChangeEvent event)
Checks to see if a new value means the axis range needs adjusting.
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).
boolean equals(Object obj)
Tests this plot for equality with another object.
int getAxisLocation()
Returns the axis location.
int getBulbDiameter()
Returns the bulb diameter, which is always twice the value returned by getBulbRadius().
int getBulbRadius()
Returns the bulb radius, in Java2D units.
int getColumnDiameter()
Returns the column diameter, which is always twice the value returned by getColumnRadius().
int getColumnRadius()
Returns the column radius, in Java2D units.
Range getDataRange(ValueAxis axis)
Returns the data range.
ValueDataset getDataset()
Returns the dataset for the plot.
boolean getFollowDataInSubranges()
Returns a flag that controls whether or not the thermometer axis zooms to display the subrange within which the data value falls.
int getGap()
Returns the gap, in Java2D units, between the two outlines that represent the thermometer.
LegendItemCollection getLegendItems()
Returns the legend items for the plot.
double getLowerBound()
Returns the lower bound for the thermometer.
Number getMaximumVerticalDataValue()
This method is deprecated. This method is not used. Officially deprecated in version 1.0.6.
Paint getMercuryPaint()
Returns the default mercury paint.
Number getMinimumVerticalDataValue()
This method is deprecated. This method is not used. Officially deprecated in version 1.0.6.
PlotOrientation getOrientation()
Returns the orientation of the plot.
RectangleInsets getPadding()
Returns the padding for the thermometer.
String getPlotType()
Returns a short string describing the type of plot.
ValueAxis getRangeAxis()
Returns the range axis.
boolean getShowValueLines()
This method is deprecated. This flag doesn't do anything useful/visible. Deprecated as of version 1.0.6.
Paint getSubrangePaint(int range)
Gets the paint used for a particular subrange.
Paint getThermometerPaint()
Returns the paint used to draw the thermometer outline.
Stroke getThermometerStroke()
Returns the stroke used to draw the thermometer outline.
int getUnits()
Returns a code indicating the unit display type.
double getUpperBound()
Returns the upper bound for the thermometer.
boolean getUseSubrangePaint()
Returns a flag that controls whether or not the mercury color changes for each subrange.
Font getValueFont()
Gets the font used to display the current value.
int getValueLocation()
Returns a code indicating the location at which the value label is displayed.
Paint getValuePaint()
Gets the paint used to display the current value.
boolean isDomainZoomable()
Returns false.
boolean isRangeZoomable()
Returns true.
void setAxisLocation(int location)
Sets the location at which the axis is displayed relative to the thermometer, and sends a PlotChangeEvent to all registered listeners.
void setBulbRadius(int r)
Sets the bulb radius (in Java2D units) and sends a PlotChangeEvent to all registered listeners.
void setColumnRadius(int r)
Sets the column radius (in Java2D units) and sends a PlotChangeEvent to all registered listeners.
void setDataset(ValueDataset dataset)
Sets the dataset for the plot, replacing the existing dataset if there is one, and sends a PlotChangeEvent to all registered listeners.
void setDisplayRange(int range, double low, double high)
Sets the displayed bounds for a sub range.
void setFollowDataInSubranges(boolean flag)
Sets the flag that controls whether or not the thermometer axis zooms to display the subrange within which the data value falls.
void setGap(int gap)
Sets the gap (in Java2D units) between the two outlines that represent the thermometer, and sends a PlotChangeEvent to all registered listeners.
void setLowerBound(double lower)
Sets the lower bound for the thermometer.
void setMercuryPaint(Paint paint)
Sets the default mercury paint and sends a PlotChangeEvent to all registered listeners.
void setPadding(RectangleInsets padding)
Sets the padding for the thermometer and sends a PlotChangeEvent to all registered listeners.
void setRange(double lower, double upper)
Sets the lower and upper bounds for the thermometer.
void setRangeAxis(ValueAxis axis)
Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.
void setShowValueLines(boolean b)
This method is deprecated. This flag doesn't do anything useful/visible. Deprecated as of version 1.0.6.
void setSubrange(int range, double low, double high)
Sets the bounds for a subrange.
void setSubrangeInfo(int range, double rangeLow, double rangeHigh, double displayLow, double displayHigh)
Sets the subrangeInfo attribute of the ThermometerPlot object
void setSubrangeInfo(int range, double low, double hi)
Sets information for a particular range.
void setSubrangePaint(int range, Paint paint)
Sets the paint to be used for a subrange and sends a PlotChangeEvent to all registered listeners.
void setThermometerPaint(Paint paint)
Sets the paint used to draw the thermometer outline and sends a PlotChangeEvent to all registered listeners.
void setThermometerStroke(Stroke s)
Sets the stroke used to draw the thermometer outline and sends a PlotChangeEvent to all registered listeners.
void setUnits(String u)
This method is deprecated. Use setUnits(int) instead. Deprecated as of version 1.0.6, because this method is a little obscure and redundant anyway.
void setUnits(int u)
Sets the units to be displayed in the thermometer.
void setUpperBound(double upper)
Sets the upper bound for the thermometer.
void setUseSubrangePaint(boolean flag)
Sets the range colour change option.
void setValueFont(Font f)
Sets the font used to display the current value.
void setValueFormat(NumberFormat formatter)
Sets the formatter for the value label and sends a PlotChangeEvent to all registered listeners.
void setValueLocation(int location)
Sets the location at which the current value is displayed and sends a PlotChangeEvent to all registered listeners.
void setValuePaint(Paint paint)
Sets the paint used to display the current value and sends a PlotChangeEvent to all registered listeners.
void zoom(double percent)
A zoom method that does nothing.
void zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source)
Multiplies the range on the domain axis/axes by the specified factor.
void zoomDomainAxes(double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor)
Multiplies the range on the domain axis/axes by the specified factor.
void zoomDomainAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
This method does nothing.
void zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor)
Multiplies the range on the range axis/axes by the specified factor.
void zoomRangeAxes(double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)
Zooms the range axes.
void zoomRangeAxes(double factor, PlotRenderingInfo state, Point2D source)
Multiplies the range on the range axis/axes by the specified factor.
Protected Methods
static boolean isValidNumber(double d)
Determine whether a number is valid and finite.
void setAxisRange()
Sets the axis range to the current values in the rangeInfo array.
[Expand]
Inherited Methods
From class org.jfree.chart.plot.Plot
From class java.lang.Object
From interface org.jfree.chart.LegendItemSource
From interface org.jfree.chart.event.AxisChangeListener
From interface org.jfree.chart.event.MarkerChangeListener
From interface org.jfree.chart.plot.ValueAxisPlot
From interface org.jfree.chart.plot.Zoomable
From interface org.jfree.data.general.DatasetChangeListener

Constants

protected static final int AXIS_GAP

The axis gap.

Constant Value: 10 (0x0000000a)

public static final int BULB

A constant for the value label position (in the thermometer bulb).

Constant Value: 3 (0x00000003)

protected static final int BULB_DIAMETER

This constant is deprecated.
As of 1.0.7, use getBulbDiameter().

The bulb diameter.

Constant Value: 80 (0x00000050)

protected static final int BULB_RADIUS

This constant is deprecated.
As of 1.0.7, use getBulbRadius().

The bulb radius.

Constant Value: 40 (0x00000028)

protected static final int COLUMN_DIAMETER

This constant is deprecated.
As of 1.0.7, use getColumnDiameter().

The column diameter.

Constant Value: 40 (0x00000028)

protected static final int COLUMN_RADIUS

This constant is deprecated.
As of 1.0.7, use getColumnRadius().

The column radius.

Constant Value: 20 (0x00000014)

public static final int CRITICAL

A constant for the 'critical' range.

Constant Value: 2 (0x00000002)

protected static final int DEFAULT_BULB_RADIUS

The default bulb radius.

Constant Value: 40 (0x00000028)

protected static final int DEFAULT_COLUMN_RADIUS

The default column radius.

Constant Value: 20 (0x00000014)

protected static final int DEFAULT_GAP

The default gap between the outlines representing the thermometer.

Constant Value: 5 (0x00000005)

protected static final double DEFAULT_LOWER_BOUND

The default lower bound.

Constant Value: 0.0

protected static final double DEFAULT_UPPER_BOUND

The default upper bound.

Constant Value: 100.0

protected static final int DISPLAY_HIGH

Index for display high value in subrangeInfo matrix.

Constant Value: 3 (0x00000003)

protected static final int DISPLAY_LOW

Index for display low value in subrangeInfo matrix.

Constant Value: 2 (0x00000002)

protected static final int GAP_DIAMETER

This constant is deprecated.
As of 1.0.7, use getGap() times two.

The gap diameter.

Constant Value: 10 (0x0000000a)

protected static final int GAP_RADIUS

This constant is deprecated.
As of 1.0.7, use getGap().

The gap radius.

Constant Value: 5 (0x00000005)

public static final int LEFT

A constant for the value label position (left of the thermometer).

Constant Value: 2 (0x00000002)

public static final int NONE

A constant for the value label position (no label).

Constant Value: 0 (0x00000000)

public static final int NORMAL

A constant for the 'normal' range.

Constant Value: 0 (0x00000000)

protected static final int RANGE_HIGH

Index for high value in subrangeInfo matrix.

Constant Value: 1 (0x00000001)

protected static final int RANGE_LOW

Index for low value in subrangeInfo matrix.

Constant Value: 0 (0x00000000)

public static final int RIGHT

A constant for the value label position (right of the thermometer).

Constant Value: 1 (0x00000001)

public static final int UNITS_CELCIUS

A constant for unit type 'Celcius'.

Constant Value: 2 (0x00000002)

public static final int UNITS_FAHRENHEIT

A constant for unit type 'Fahrenheit'.

Constant Value: 1 (0x00000001)

public static final int UNITS_KELVIN

A constant for unit type 'Kelvin'.

Constant Value: 3 (0x00000003)

public static final int UNITS_NONE

A constant for unit type 'None'.

Constant Value: 0 (0x00000000)

public static final int WARNING

A constant for the 'warning' range.

Constant Value: 1 (0x00000001)

Fields

protected static final String[] UNITS

The unit strings.

protected static ResourceBundle localizationResources

The resourceBundle for the localization.

Public Constructors

public ThermometerPlot ()

Creates a new thermometer plot.

public ThermometerPlot (ValueDataset dataset)

Creates a new thermometer plot, using default attributes where necessary.

Parameters
dataset the data set.

Public Methods

public Object clone ()

Returns a clone of the plot.

Returns
  • A clone.
Throws
CloneNotSupportedException if the plot cannot be cloned.

public void datasetChanged (DatasetChangeEvent event)

Checks to see if a new value means the axis range needs adjusting.

Parameters
event the dataset change event.

public 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).

Parameters
g2 the graphics device.
area the area within which the plot should be drawn.
anchor the anchor point (null permitted).
parentState the state from the parent plot, if there is one.
info collects info about the drawing.

public boolean equals (Object obj)

Tests this plot for equality with another object. The plot's dataset is not considered in the test.

Parameters
obj the object (null permitted).
Returns
  • true or false.

public int getAxisLocation ()

Returns the axis location.

Returns

public int getBulbDiameter ()

Returns the bulb diameter, which is always twice the value returned by getBulbRadius().

Returns
  • The bulb diameter.

public int getBulbRadius ()

Returns the bulb radius, in Java2D units.

Returns
  • The bulb radius.

public int getColumnDiameter ()

Returns the column diameter, which is always twice the value returned by getColumnRadius().

Returns
  • The column diameter.

public int getColumnRadius ()

Returns the column radius, in Java2D units.

Returns
  • The column radius.

public Range getDataRange (ValueAxis axis)

Returns the data range.

Parameters
axis the axis.
Returns
  • The range of data displayed.

public ValueDataset getDataset ()

Returns the dataset for the plot.

Returns
  • The dataset (possibly null).

public boolean getFollowDataInSubranges ()

Returns a flag that controls whether or not the thermometer axis zooms to display the subrange within which the data value falls.

Returns
  • The flag.

public int getGap ()

Returns the gap, in Java2D units, between the two outlines that represent the thermometer.

Returns
  • The gap.
See Also

public LegendItemCollection getLegendItems ()

Returns the legend items for the plot.

Returns
  • null.

public double getLowerBound ()

Returns the lower bound for the thermometer. The data value can be set lower than this, but it will not be shown in the thermometer.

Returns
  • The lower bound.

public Number getMaximumVerticalDataValue ()

This method is deprecated.
This method is not used. Officially deprecated in version 1.0.6.

Returns the maximum value in either the domain or the range, whichever is displayed against the vertical axis for the particular type of plot implementing this interface.

Returns
  • The maximum value in either the domain or the range

public Paint getMercuryPaint ()

Returns the default mercury paint.

Returns
  • The paint (never null).

public Number getMinimumVerticalDataValue ()

This method is deprecated.
This method is not used. Officially deprecated in version 1.0.6.

Returns the minimum value in either the domain or the range, whichever is displayed against the vertical axis for the particular type of plot implementing this interface.

Returns
  • The minimum value in either the domain or the range.

public PlotOrientation getOrientation ()

Returns the orientation of the plot.

Returns

public RectangleInsets getPadding ()

Returns the padding for the thermometer. This is the space inside the plot area.

Returns
  • The padding (never null).

public String getPlotType ()

Returns a short string describing the type of plot.

Returns
  • A short string describing the type of plot.

public ValueAxis getRangeAxis ()

Returns the range axis.

Returns
  • The range axis (never null).

public boolean getShowValueLines ()

This method is deprecated.
This flag doesn't do anything useful/visible. Deprecated as of version 1.0.6.

Returns the flag that controls whether not value lines are displayed.

Returns
  • The flag.

public Paint getSubrangePaint (int range)

Gets the paint used for a particular subrange.

Parameters
range the range (.
Returns
  • The paint.

public Paint getThermometerPaint ()

Returns the paint used to draw the thermometer outline.

Returns
  • The paint (never null).

public Stroke getThermometerStroke ()

Returns the stroke used to draw the thermometer outline.

Returns
  • The stroke (never null).

public int getUnits ()

Returns a code indicating the unit display type. This is one of UNITS_NONE, UNITS_FAHRENHEIT, UNITS_CELCIUS and UNITS_KELVIN.

Returns
  • The units type.
See Also

public double getUpperBound ()

Returns the upper bound for the thermometer. The data value can be set higher than this, but it will not be shown in the thermometer.

Returns
  • The upper bound.

public boolean getUseSubrangePaint ()

Returns a flag that controls whether or not the mercury color changes for each subrange.

Returns
  • The flag.

public Font getValueFont ()

Gets the font used to display the current value.

Returns
  • The font.

public int getValueLocation ()

Returns a code indicating the location at which the value label is displayed.

Returns

public Paint getValuePaint ()

Gets the paint used to display the current value.

Returns
  • The paint.

public boolean isDomainZoomable ()

Returns false.

Returns
  • A boolean.

public boolean isRangeZoomable ()

Returns true.

Returns
  • A boolean.

public void setAxisLocation (int location)

Sets the location at which the axis is displayed relative to the thermometer, and sends a PlotChangeEvent to all registered listeners.

Parameters
location the location (one of NONE, LEFT and RIGHT).

public void setBulbRadius (int r)

Sets the bulb radius (in Java2D units) and sends a PlotChangeEvent to all registered listeners.

Parameters
r the new radius (in Java2D units).
See Also

public void setColumnRadius (int r)

Sets the column radius (in Java2D units) and sends a PlotChangeEvent to all registered listeners.

Parameters
r the new radius.

public void setDataset (ValueDataset dataset)

Sets the dataset for the plot, replacing the existing dataset if there is one, and sends a PlotChangeEvent to all registered listeners.

Parameters
dataset the dataset (null permitted).
See Also

public void setDisplayRange (int range, double low, double high)

Sets the displayed bounds for a sub range.

Parameters
range the range type.
low the low value.
high the high value.

public void setFollowDataInSubranges (boolean flag)

Sets the flag that controls whether or not the thermometer axis zooms to display the subrange within which the data value falls.

Parameters
flag the flag.

public void setGap (int gap)

Sets the gap (in Java2D units) between the two outlines that represent the thermometer, and sends a PlotChangeEvent to all registered listeners.

Parameters
gap the new gap.
See Also

public void setLowerBound (double lower)

Sets the lower bound for the thermometer.

Parameters
lower the lower bound.
See Also

public void setMercuryPaint (Paint paint)

Sets the default mercury paint and sends a PlotChangeEvent to all registered listeners.

Parameters
paint the new paint (null not permitted).

public void setPadding (RectangleInsets padding)

Sets the padding for the thermometer and sends a PlotChangeEvent to all registered listeners.

Parameters
padding the padding (null not permitted).
See Also

public void setRange (double lower, double upper)

Sets the lower and upper bounds for the thermometer.

Parameters
lower the lower bound.
upper the upper bound.

public void setRangeAxis (ValueAxis axis)

Sets the range axis for the plot and sends a PlotChangeEvent to all registered listeners.

Parameters
axis the new axis (null not permitted).
See Also

public void setShowValueLines (boolean b)

This method is deprecated.
This flag doesn't do anything useful/visible. Deprecated as of version 1.0.6.

Sets the display as to whether to show value lines in the output.

Parameters
b Whether to show value lines in the thermometer

public void setSubrange (int range, double low, double high)

Sets the bounds for a subrange.

Parameters
range the range type.
low the low value.
high the high value.

public void setSubrangeInfo (int range, double rangeLow, double rangeHigh, double displayLow, double displayHigh)

Sets the subrangeInfo attribute of the ThermometerPlot object

Parameters
range the new rangeInfo value.
rangeLow the new rangeInfo value
rangeHigh the new rangeInfo value
displayLow the new rangeInfo value
displayHigh the new rangeInfo value

public void setSubrangeInfo (int range, double low, double hi)

Sets information for a particular range.

Parameters
range the range to specify information about.
low the low value for the range
hi the high value for the range

public void setSubrangePaint (int range, Paint paint)

Sets the paint to be used for a subrange and sends a PlotChangeEvent to all registered listeners.

Parameters
range the range (0, 1 or 2).
paint the paint to be applied (null not permitted).

public void setThermometerPaint (Paint paint)

Sets the paint used to draw the thermometer outline and sends a PlotChangeEvent to all registered listeners.

Parameters
paint the new paint (null ignored).

public void setThermometerStroke (Stroke s)

Sets the stroke used to draw the thermometer outline and sends a PlotChangeEvent to all registered listeners.

Parameters
s the new stroke (null ignored).

public void setUnits (String u)

This method is deprecated.
Use setUnits(int) instead. Deprecated as of version 1.0.6, because this method is a little obscure and redundant anyway.

Sets the unit type.

Parameters
u the unit type (null ignored).

public void setUnits (int u)

Sets the units to be displayed in the thermometer. Use one of the following constants:

  • UNITS_NONE : no units displayed.
  • UNITS_FAHRENHEIT : units displayed in Fahrenheit.
  • UNITS_CELCIUS : units displayed in Celcius.
  • UNITS_KELVIN : units displayed in Kelvin.

Parameters
u the new unit type.
See Also

public void setUpperBound (double upper)

Sets the upper bound for the thermometer.

Parameters
upper the upper bound.
See Also

public void setUseSubrangePaint (boolean flag)

Sets the range colour change option.

Parameters
flag the new range colour change option

public void setValueFont (Font f)

Sets the font used to display the current value.

Parameters
f the new font (null not permitted).
See Also

public void setValueFormat (NumberFormat formatter)

Sets the formatter for the value label and sends a PlotChangeEvent to all registered listeners.

Parameters
formatter the new formatter (null not permitted).

public void setValueLocation (int location)

Sets the location at which the current value is displayed and sends a PlotChangeEvent to all registered listeners.

The location can be one of the constants: NONE, RIGHT LEFT and BULB.

Parameters
location the location.

public void setValuePaint (Paint paint)

Sets the paint used to display the current value and sends a PlotChangeEvent to all registered listeners.

Parameters
paint the new paint (null not permitted).
See Also

public void zoom (double percent)

A zoom method that does nothing. Plots are required to support the zoom operation. In the case of a thermometer chart, it doesn't make sense to zoom in or out, so the method is empty.

Parameters
percent the zoom percentage.

public void zoomDomainAxes (double factor, PlotRenderingInfo state, Point2D source)

Multiplies the range on the domain axis/axes by the specified factor.

Parameters
factor the zoom factor.
state the plot state.
source the source point.

public void zoomDomainAxes (double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor)

Multiplies the range on the domain axis/axes by the specified factor.

Parameters
factor the zoom factor.
state the plot state.
source the source point.
useAnchor a flag that controls whether or not the source point is used for the zoom anchor.

public void zoomDomainAxes (double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)

This method does nothing.

Parameters
lowerPercent the lower percent.
upperPercent the upper percent.
state the plot state.
source the source point.

public void zoomRangeAxes (double factor, PlotRenderingInfo state, Point2D source, boolean useAnchor)

Multiplies the range on the range axis/axes by the specified factor.

Parameters
factor the zoom factor.
state the plot state.
source the source point.
useAnchor a flag that controls whether or not the source point is used for the zoom anchor.

public void zoomRangeAxes (double lowerPercent, double upperPercent, PlotRenderingInfo state, Point2D source)

Zooms the range axes.

Parameters
lowerPercent the lower percent.
upperPercent the upper percent.
state the plot state.
source the source point.

public void zoomRangeAxes (double factor, PlotRenderingInfo state, Point2D source)

Multiplies the range on the range axis/axes by the specified factor.

Parameters
factor the zoom factor.
state the plot state.
source the source point.

Protected Methods

protected static boolean isValidNumber (double d)

Determine whether a number is valid and finite.

Parameters
d the number to be tested.
Returns
  • true if the number is valid and finite, and false otherwise.

protected void setAxisRange ()

Sets the axis range to the current values in the rangeInfo array.