org.jfree.chart.axis
Class ValueAxis

java.lang.Object
  extended byorg.jfree.chart.axis.Axis
      extended byorg.jfree.chart.axis.ValueAxis
All Implemented Interfaces:
AxisConstants, java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable
Direct Known Subclasses:
DateAxis, NumberAxis

public abstract class ValueAxis
extends Axis
implements java.lang.Cloneable, org.jfree.util.PublicCloneable, java.io.Serializable

The base class for axes that display value data, where values are measured using the double primitive. The two key subclasses are DateAxis and NumberAxis.

Author:
David Gilbert
See Also:
Serialized Form

Field Summary
static boolean DEFAULT_AUTO_RANGE
          The default auto-range value.
static double DEFAULT_AUTO_RANGE_MINIMUM_SIZE
          The default minimum auto range.
static boolean DEFAULT_AUTO_TICK_UNIT_SELECTION
          The default auto-tick-unit-selection value.
static java.awt.Paint DEFAULT_AXIS_LINE_PAINT
          The default axis line paint.
static java.awt.Stroke DEFAULT_AXIS_LINE_STROKE
          The default axis line stroke.
static boolean DEFAULT_INVERTED
          The default inverted flag setting.
static double DEFAULT_LOWER_BOUND
          The default lower bound for the axis.
static double DEFAULT_LOWER_MARGIN
          The default value for the lower margin (0.05 = 5%).
static Range DEFAULT_RANGE
          The default axis range.
static double DEFAULT_UPPER_BOUND
          The default upper bound for the axis.
static double DEFAULT_UPPER_MARGIN
          The default value for the upper margin (0.05 = 5%).
static int MAXIMUM_TICK_COUNT
          The maximum tick count.
 
Fields inherited from interface org.jfree.chart.axis.AxisConstants
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
 
Constructor Summary
protected ValueAxis(java.lang.String label, TickUnitSource standardTickUnits)
          Constructs a value axis.
 
Method Summary
protected abstract  void autoAdjustRange()
          Automatically determines the maximum and minimum values on the axis to 'fit' the data.
protected  float[] calculateAnchorPoint(ValueTick tick, double cursor, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Calculates the anchor point for a tick label.
 void centerRange(double value)
          Centers the axis range about the specified value.
 java.lang.Object clone()
          Returns a clone of the object.
protected  void drawAxisLine(java.awt.Graphics2D g2, double cursor, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Draws an axis line at the current cursor position and edge.
protected  AxisState drawTickMarksAndLabels(java.awt.Graphics2D g2, double cursor, java.awt.geom.Rectangle2D plotArea, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Draws the axis line, tick marks and tick mark labels.
 boolean equals(java.lang.Object obj)
          Tests this axis for equality with another object.
protected  double findMaximumTickLabelHeight(java.util.List ticks, java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, boolean vertical)
          A utility method for determining the height of the tallest tick label.
protected  double findMaximumTickLabelWidth(java.util.List ticks, java.awt.Graphics2D g2, java.awt.geom.Rectangle2D drawArea, boolean vertical)
          A utility method for determining the width of the widest tick label.
 double getAutoRangeMinimumSize()
          Returns the minimum size allowed for the axis range when it is automatically calculated.
protected  int getAutoTickIndex()
          Returns the auto tick index.
 double getFixedAutoRange()
          Returns the fixed auto range.
 double getLowerBound()
          Returns the lower bound of the axis range.
 double getLowerMargin()
          Returns the margin (a percentage of the current range) by which the lower bound for the axis is less than the minimum data value.
 double getMaximumAxisValue()
          Deprecated. Use getUpperBound().
 double getMinimumAxisValue()
          Deprecated. Use getLowerBound().
 Range getRange()
          Returns the range for the axis.
 TickUnitSource getStandardTickUnits()
          Returns the standard tick units for the axis.
 double getUpperBound()
          Returns the upper bound for the axis range.
 double getUpperMargin()
          Returns the margin (a percentage of the current range) by which the upper bound for the axis exceeds the maximum data value.
 boolean isAutoRange()
          Returns true if the axis range is automatically adjusted to fit the data.
 boolean isAutoTickUnitSelection()
          Returns a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units.
 boolean isInverted()
          Returns a flag that controls the direction of values on the axis.
 boolean isNegativeArrowVisible()
          A flag that controls whether or not the axis line has a negative arrow.
 boolean isPositiveArrowVisible()
          A flag that controls whether or not the axis line has a positive arrow.
 boolean isVerticalTickLabels()
          Returns true if the tick labels should be rotated (to vertical), and false otherwise.
 AxisSpace reserveSpace(java.awt.Graphics2D g2, Plot plot, java.awt.geom.Rectangle2D plotArea, org.jfree.ui.RectangleEdge edge, AxisSpace space)
          Returns the space required to draw the axis.
 void resizeRange(double percent)
          Increases or decreases the axis range by the specified percentage, about the central value.
 void resizeRange(double percent, double anchorValue)
          Increases or decreases the axis range by the specified percentage, about the specified anchor value.
 void setAutoRange(boolean auto)
          Sets a flag that determines whether or not the axis range is automatically adjusted to fit the data, and notifies registered listeners that the axis has been modified.
protected  void setAutoRange(boolean auto, boolean notify)
          Sets the auto range attribute.
 void setAutoRangeMinimumSize(double size)
          Sets the auto range minimum size and sends an AxisChangeEvent to all registered listeners.
 void setAutoRangeMinimumSize(double size, boolean notify)
          Sets the minimum size allowed for the axis range when it is automatically calculated.
protected  void setAutoTickIndex(int index)
          Sets the auto tick index.
 void setAutoTickUnitSelection(boolean flag)
          Sets a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units.
 void setAutoTickUnitSelection(boolean flag, boolean notify)
          Sets a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units.
 void setFixedAutoRange(double length)
          Sets the fixed auto range for the axis.
 void setInverted(boolean flag)
          Sets a flag that controls the direction of values on the axis, and notifies registered listeners that the axis has changed.
 void setLowerBound(double min)
          Sets the lower bound for the axis range.
 void setLowerMargin(double margin)
          Sets the lower margin for the axis, as a percentage of the current range.
 void setMaximumAxisValue(double max)
          Deprecated. Use setUpperBound(...).
 void setMinimumAxisValue(double min)
          Deprecated. Use setLowerBound(...).
 void setNegativeArrowVisible(boolean visible)
          Sets a flag that controls whether or not the negative arrow on the axis line is visible.
 void setPositiveArrowVisible(boolean visible)
          Sets a flag that controls whether or not the positive arrow on the axis line is visible.
 void setRange(double lower, double upper)
          Sets the axis range.
 void setRange(Range range)
          Sets the range attribute.
 void setRange(Range range, boolean turnOffAutoRange, boolean notify)
          Sets the upper and lower bounds for the axis.
 void setRangeAboutValue(double value, double length)
          Sets the axis range, where the new range is 'size' in length, and centered on 'value'.
 void setStandardTickUnits(TickUnitSource collection)
          Sets the collection of tick units for the axis, and notifies registered listeners that the axis has changed.
 void setUpperBound(double max)
          Sets the upper bound for the axis range.
 void setUpperMargin(double margin)
          Sets the upper margin for the axis, as a percentage of the current range.
 void setVerticalTickLabels(boolean flag)
          Sets the flag that controls whether the tick labels are displayed vertically (that is, rotated 90 degrees from horizontal).
abstract  double translateJava2DToValue(double java2DValue, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified dataArea.
 double translateJava2DtoValue(float java2DValue, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Deprecated. Use translateJava2DToValue(double, ...).
abstract  double translateValueToJava2D(double dataValue, java.awt.geom.Rectangle2D dataArea, org.jfree.ui.RectangleEdge edge)
          Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified dataArea.
 void zoomRange(double lowerPercent, double upperPercent)
          Zooms in on the current range.
 
Methods inherited from class org.jfree.chart.axis.Axis
addChangeListener, configure, draw, drawLabel, getAxisLinePaint, getAxisLineStroke, getFixedDimension, getLabel, getLabelAngle, getLabelEnclosure, getLabelFont, getLabelInsets, getLabelPaint, getPlot, getTickLabelFont, getTickLabelInsets, getTickLabelPaint, getTickMarkInsideLength, getTickMarkOutsideLength, getTickMarkPaint, getTickMarkStroke, isAxisLineVisible, isTickLabelsVisible, isTickMarksVisible, isVisible, notifyListeners, refreshTicks, removeChangeListener, setAxisLinePaint, setAxisLineStroke, setAxisLineVisible, setFixedDimension, setLabel, setLabelAngle, setLabelFont, setLabelInsets, setLabelPaint, setPlot, setTickLabelFont, setTickLabelInsets, setTickLabelPaint, setTickLabelsVisible, setTickMarkInsideLength, setTickMarkOutsideLength, setTickMarkPaint, setTickMarkStroke, setTickMarksVisible, setVisible
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_RANGE

public static final Range DEFAULT_RANGE
The default axis range.


DEFAULT_AUTO_RANGE

public static final boolean DEFAULT_AUTO_RANGE
The default auto-range value.

See Also:
Constant Field Values

DEFAULT_INVERTED

public static final boolean DEFAULT_INVERTED
The default inverted flag setting.

See Also:
Constant Field Values

DEFAULT_AUTO_RANGE_MINIMUM_SIZE

public static final double DEFAULT_AUTO_RANGE_MINIMUM_SIZE
The default minimum auto range.

See Also:
Constant Field Values

DEFAULT_LOWER_MARGIN

public static final double DEFAULT_LOWER_MARGIN
The default value for the lower margin (0.05 = 5%).

See Also:
Constant Field Values

DEFAULT_UPPER_MARGIN

public static final double DEFAULT_UPPER_MARGIN
The default value for the upper margin (0.05 = 5%).

See Also:
Constant Field Values

DEFAULT_LOWER_BOUND

public static final double DEFAULT_LOWER_BOUND
The default lower bound for the axis.

See Also:
Constant Field Values

DEFAULT_UPPER_BOUND

public static final double DEFAULT_UPPER_BOUND
The default upper bound for the axis.

See Also:
Constant Field Values

DEFAULT_AUTO_TICK_UNIT_SELECTION

public static final boolean DEFAULT_AUTO_TICK_UNIT_SELECTION
The default auto-tick-unit-selection value.

See Also:
Constant Field Values

MAXIMUM_TICK_COUNT

public static final int MAXIMUM_TICK_COUNT
The maximum tick count.

See Also:
Constant Field Values

DEFAULT_AXIS_LINE_STROKE

public static java.awt.Stroke DEFAULT_AXIS_LINE_STROKE
The default axis line stroke.


DEFAULT_AXIS_LINE_PAINT

public static final java.awt.Paint DEFAULT_AXIS_LINE_PAINT
The default axis line paint.

Constructor Detail

ValueAxis

protected ValueAxis(java.lang.String label,
                    TickUnitSource standardTickUnits)
Constructs a value axis.

Parameters:
label - the axis label.
standardTickUnits - the source for standard tick units.
Method Detail

isVerticalTickLabels

public boolean isVerticalTickLabels()
Returns true if the tick labels should be rotated (to vertical), and false otherwise.

Returns:
true or false.

setVerticalTickLabels

public void setVerticalTickLabels(boolean flag)
Sets the flag that controls whether the tick labels are displayed vertically (that is, rotated 90 degrees from horizontal).

If the flag is changed, an AxisChangeEvent is sent to all registered listeners.

Parameters:
flag - the flag.

isPositiveArrowVisible

public boolean isPositiveArrowVisible()
A flag that controls whether or not the axis line has a positive arrow.

Returns:
A boolean.

setPositiveArrowVisible

public void setPositiveArrowVisible(boolean visible)
Sets a flag that controls whether or not the positive arrow on the axis line is visible.

Parameters:
visible - the flag.

isNegativeArrowVisible

public boolean isNegativeArrowVisible()
A flag that controls whether or not the axis line has a negative arrow.

Returns:
A boolean.

setNegativeArrowVisible

public void setNegativeArrowVisible(boolean visible)
Sets a flag that controls whether or not the negative arrow on the axis line is visible.

Parameters:
visible - the flag.

drawAxisLine

protected void drawAxisLine(java.awt.Graphics2D g2,
                            double cursor,
                            java.awt.geom.Rectangle2D dataArea,
                            org.jfree.ui.RectangleEdge edge)
Draws an axis line at the current cursor position and edge.

Overrides:
drawAxisLine in class Axis
Parameters:
g2 - the graphics device.
cursor - the cursor position.
dataArea - the data area.
edge - the edge.

calculateAnchorPoint

protected float[] calculateAnchorPoint(ValueTick tick,
                                       double cursor,
                                       java.awt.geom.Rectangle2D dataArea,
                                       org.jfree.ui.RectangleEdge edge)
Calculates the anchor point for a tick label.

Parameters:
tick - the tick.
cursor - the cursor.
dataArea - the data area.
edge - the edge on which the axis is drawn.
Returns:
the x and y coordinates of the anchor point.

drawTickMarksAndLabels

protected AxisState drawTickMarksAndLabels(java.awt.Graphics2D g2,
                                           double cursor,
                                           java.awt.geom.Rectangle2D plotArea,
                                           java.awt.geom.Rectangle2D dataArea,
                                           org.jfree.ui.RectangleEdge edge)
Draws the axis line, tick marks and tick mark labels.

Parameters:
g2 - the graphics device.
cursor - the cursor.
plotArea - the plot area.
dataArea - the data area.
edge - the edge that the axis is aligned with.
Returns:
The width or height used to draw the axis.

reserveSpace

public AxisSpace reserveSpace(java.awt.Graphics2D g2,
                              Plot plot,
                              java.awt.geom.Rectangle2D plotArea,
                              org.jfree.ui.RectangleEdge edge,
                              AxisSpace space)
Returns the space required to draw the axis.

Specified by:
reserveSpace in class Axis
Parameters:
g2 - the graphics device.
plot - the plot that the axis belongs to.
plotArea - the area within which the plot should be drawn.
edge - the axis location.
space - the space already reserved (for other axes).
Returns:
The space required to draw the axis (including pre-reserved space).

findMaximumTickLabelHeight

protected double findMaximumTickLabelHeight(java.util.List ticks,
                                            java.awt.Graphics2D g2,
                                            java.awt.geom.Rectangle2D drawArea,
                                            boolean vertical)
A utility method for determining the height of the tallest tick label.

Parameters:
ticks - the ticks.
g2 - the graphics device.
drawArea - the area within which the plot and axes should be drawn.
vertical - a flag that indicates whether or not the tick labels are 'vertical'.
Returns:
the height of the tallest tick label.

findMaximumTickLabelWidth

protected double findMaximumTickLabelWidth(java.util.List ticks,
                                           java.awt.Graphics2D g2,
                                           java.awt.geom.Rectangle2D drawArea,
                                           boolean vertical)
A utility method for determining the width of the widest tick label.

Parameters:
ticks - the ticks.
g2 - the graphics device.
drawArea - the area within which the plot and axes should be drawn.
vertical - a flag that indicates whether or not the tick labels are 'vertical'.
Returns:
the width of the tallest tick label.

isInverted

public boolean isInverted()
Returns a flag that controls the direction of values on the axis.

For a regular axis, values increase from left to right (for a horizontal axis) and bottom to top (for a vertical axis). When the axis is 'inverted', the values increase in the opposite direction.

Returns:
the flag.

setInverted

public void setInverted(boolean flag)
Sets a flag that controls the direction of values on the axis, and notifies registered listeners that the axis has changed.

Parameters:
flag - the flag.

isAutoRange

public boolean isAutoRange()
Returns true if the axis range is automatically adjusted to fit the data.

Returns:
the auto-range flag.

setAutoRange

public void setAutoRange(boolean auto)
Sets a flag that determines whether or not the axis range is automatically adjusted to fit the data, and notifies registered listeners that the axis has been modified.

Parameters:
auto - the new value of the flag.

setAutoRange

protected void setAutoRange(boolean auto,
                            boolean notify)
Sets the auto range attribute. If the notify flag is set, an AxisChangeEvent is sent to registered listeners.

Parameters:
auto - the new value of the flag.
notify - notify listeners?

getAutoRangeMinimumSize

public double getAutoRangeMinimumSize()
Returns the minimum size allowed for the axis range when it is automatically calculated.

Returns:
the minimum range.

setAutoRangeMinimumSize

public void setAutoRangeMinimumSize(double size)
Sets the auto range minimum size and sends an AxisChangeEvent to all registered listeners.

Parameters:
size - the size.

setAutoRangeMinimumSize

public void setAutoRangeMinimumSize(double size,
                                    boolean notify)
Sets the minimum size allowed for the axis range when it is automatically calculated.

If requested, an AxisChangeEvent is forwarded to all registered listeners.

Parameters:
size - the new minimum.
notify - notify listeners?

getUpperMargin

public double getUpperMargin()
Returns the margin (a percentage of the current range) by which the upper bound for the axis exceeds the maximum data value.

Returns:
the upper margin.

setUpperMargin

public void setUpperMargin(double margin)
Sets the upper margin for the axis, as a percentage of the current range.

This margin is added only when the axis range is auto-calculated.

The default is 5 percent.

Parameters:
margin - the new margin.

getLowerMargin

public double getLowerMargin()
Returns the margin (a percentage of the current range) by which the lower bound for the axis is less than the minimum data value.

Returns:
the lower margin.

setLowerMargin

public void setLowerMargin(double margin)
Sets the lower margin for the axis, as a percentage of the current range.

This margin is added only when the axis range is auto-calculated.

The default is 5 percent.

Parameters:
margin - the new margin.

getFixedAutoRange

public double getFixedAutoRange()
Returns the fixed auto range.

Returns:
the length.

setFixedAutoRange

public void setFixedAutoRange(double length)
Sets the fixed auto range for the axis.

Parameters:
length - the range length.

getMinimumAxisValue

public double getMinimumAxisValue()
Deprecated. Use getLowerBound().

Returns the minimum value for the axis.

Returns:
the minimum value for the axis.

getLowerBound

public double getLowerBound()
Returns the lower bound of the axis range.

Returns:
The lower bound.

setMinimumAxisValue

public void setMinimumAxisValue(double min)
Deprecated. Use setLowerBound(...).

Sets the minimum value for the axis.

Registered listeners are notified that the axis has been modified.

Parameters:
min - the new minimum.

setLowerBound

public void setLowerBound(double min)
Sets the lower bound for the axis range. An AxisChangeEvent is sent to all registered listeners.

Parameters:
min - the new minimum.

getMaximumAxisValue

public double getMaximumAxisValue()
Deprecated. Use getUpperBound().

Returns the maximum value for the axis.

Returns:
the maximum value.

getUpperBound

public double getUpperBound()
Returns the upper bound for the axis range.

Returns:
The upper bound.

setMaximumAxisValue

public void setMaximumAxisValue(double max)
Deprecated. Use setUpperBound(...).

Sets the maximum value for the axis.

Registered listeners are notified that the axis has been modified.

Parameters:
max - the new maximum.

setUpperBound

public void setUpperBound(double max)
Sets the upper bound for the axis range. An AxisChangeEvent is sent to all registered listeners.

Parameters:
max - the new maximum.

getRange

public Range getRange()
Returns the range for the axis.

Returns:
the axis range.

setRange

public void setRange(Range range,
                     boolean turnOffAutoRange,
                     boolean notify)
Sets the upper and lower bounds for the axis. Registered listeners are notified of the change.

As a side-effect, the auto-range flag is set to false.

Parameters:
range - the new range.
turnOffAutoRange - a flag that controls whether or not the auto range is turned off.
notify - a flag that controls whether or not listeners are notified.

setRange

public void setRange(Range range)
Sets the range attribute.

Parameters:
range - the range.

setRange

public void setRange(double lower,
                     double upper)
Sets the axis range.

Parameters:
lower - the lower axis limit.
upper - the upper axis limit.

setRangeAboutValue

public void setRangeAboutValue(double value,
                               double length)
Sets the axis range, where the new range is 'size' in length, and centered on 'value'.

Parameters:
value - the central value.
length - the range length.

isAutoTickUnitSelection

public boolean isAutoTickUnitSelection()
Returns a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units.

Returns:
a flag indicating whether or not the tick unit is automatically selected.

setAutoTickUnitSelection

public void setAutoTickUnitSelection(boolean flag)
Sets a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units. If the flag is changed, registered listeners are notified that the chart has changed.

Parameters:
flag - the new value of the flag.

setAutoTickUnitSelection

public void setAutoTickUnitSelection(boolean flag,
                                     boolean notify)
Sets a flag indicating whether or not the tick unit is automatically selected from a range of standard tick units.

Parameters:
flag - the new value of the flag.
notify - notify listeners?

getStandardTickUnits

public TickUnitSource getStandardTickUnits()
Returns the standard tick units for the axis.

If autoTickUnitSelection is on, the tick unit for the axis will be automatically selected from this collection.

Returns:
the standard tick units.

setStandardTickUnits

public void setStandardTickUnits(TickUnitSource collection)
Sets the collection of tick units for the axis, and notifies registered listeners that the axis has changed.

If the autoTickUnitSelection flag is true, a tick unit will be selected from this collection automatically (to ensure that labels do not overlap).

Parameters:
collection - the tick unit collection.

translateValueToJava2D

public abstract double translateValueToJava2D(double dataValue,
                                              java.awt.geom.Rectangle2D dataArea,
                                              org.jfree.ui.RectangleEdge edge)
Converts a data value to a coordinate in Java2D space, assuming that the axis runs along one edge of the specified dataArea.

Note that it is possible for the coordinate to fall outside the plotArea.

Parameters:
dataValue - the data value.
dataArea - the area for plotting the data.
edge - the edge along which the axis lies.
Returns:
the Java2D coordinate.

translateJava2DtoValue

public double translateJava2DtoValue(float java2DValue,
                                     java.awt.geom.Rectangle2D dataArea,
                                     org.jfree.ui.RectangleEdge edge)
Deprecated. Use translateJava2DToValue(double, ...).

Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified dataArea.

Parameters:
java2DValue - the coordinate in Java2D space.
dataArea - the area in which the data is plotted.
edge - the edge along which the axis lies.
Returns:
the data value.

translateJava2DToValue

public abstract double translateJava2DToValue(double java2DValue,
                                              java.awt.geom.Rectangle2D dataArea,
                                              org.jfree.ui.RectangleEdge edge)
Converts a coordinate in Java2D space to the corresponding data value, assuming that the axis runs along one edge of the specified dataArea.

Parameters:
java2DValue - the coordinate in Java2D space.
dataArea - the area in which the data is plotted.
edge - the edge along which the axis lies.
Returns:
the data value.

autoAdjustRange

protected abstract void autoAdjustRange()
Automatically determines the maximum and minimum values on the axis to 'fit' the data.


centerRange

public void centerRange(double value)
Centers the axis range about the specified value.

Parameters:
value - the center value.

resizeRange

public void resizeRange(double percent)
Increases or decreases the axis range by the specified percentage, about the central value.

To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5).

Parameters:
percent - the resize factor.

resizeRange

public void resizeRange(double percent,
                        double anchorValue)
Increases or decreases the axis range by the specified percentage, about the specified anchor value.

To double the length of the axis range, use 200% (2.0). To halve the length of the axis range, use 50% (0.5).

Parameters:
percent - the resize factor.
anchorValue - the new central value after the resize.

zoomRange

public void zoomRange(double lowerPercent,
                      double upperPercent)
Zooms in on the current range.

Parameters:
lowerPercent - the new lower bound.
upperPercent - the new upper bound.

getAutoTickIndex

protected int getAutoTickIndex()
Returns the auto tick index.

Returns:
the auto tick index.

setAutoTickIndex

protected void setAutoTickIndex(int index)
Sets the auto tick index.

Parameters:
index - the new value.

equals

public boolean equals(java.lang.Object obj)
Tests this axis for equality with another object.

Overrides:
equals in class Axis
Parameters:
obj - the object.
Returns:
true or false.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Returns a clone of the object.

Specified by:
clone in interface org.jfree.util.PublicCloneable
Overrides:
clone in class Axis
Returns:
A clone.
Throws:
java.lang.CloneNotSupportedException - if some component of the axis does not support cloning.