public class

ModuloAxis

extends NumberAxis
java.lang.Object
   ↳ org.jfree.chart.axis.Axis
     ↳ org.jfree.chart.axis.ValueAxis
       ↳ org.jfree.chart.axis.NumberAxis
         ↳ org.jfree.chart.axis.ModuloAxis

Class Overview

An axis that displays numerical values within a fixed range using a modulo calculation.

Summary

[Expand]
Inherited Constants
From class org.jfree.chart.axis.NumberAxis
From class org.jfree.chart.axis.ValueAxis
From class org.jfree.chart.axis.Axis
[Expand]
Inherited Fields
From class org.jfree.chart.axis.NumberAxis
From class org.jfree.chart.axis.ValueAxis
From class org.jfree.chart.axis.Axis
Public Constructors
ModuloAxis(String label, Range fixedRange)
Creates a new axis.
Public Methods
boolean equals(Object obj)
Tests this axis for equality with an arbitrary object.
double getDisplayEnd()
Returns the display end value.
double getDisplayStart()
Returns the display start value.
double java2DToValue(double java2DValue, Rectangle2D area, RectangleEdge edge)
Translates a Java2D coordinate into a data value.
double lengthToJava2D(double length, Rectangle2D area, RectangleEdge edge)
Converts a length in data coordinates into the corresponding length in Java2D coordinates.
void resizeRange(double percent)
Increases or decreases the axis range by the specified percentage about the central value and sends an AxisChangeEvent to all registered listeners.
void resizeRange(double percent, double anchorValue)
Increases or decreases the axis range by the specified percentage about the specified anchor value and sends an AxisChangeEvent to all registered listeners.
void setDisplayRange(double start, double end)
Sets the display range.
double valueToJava2D(double value, Rectangle2D area, RectangleEdge edge)
Translates a data value to a Java2D coordinate.
Protected Methods
void autoAdjustRange()
This method should calculate a range that will show all the data values.
[Expand]
Inherited Methods
From class org.jfree.chart.axis.NumberAxis
From class org.jfree.chart.axis.ValueAxis
From class org.jfree.chart.axis.Axis
From class java.lang.Object

Public Constructors

public ModuloAxis (String label, Range fixedRange)

Creates a new axis.

Parameters
label the axis label (null permitted).
fixedRange the fixed range (null not permitted).

Public Methods

public boolean equals (Object obj)

Tests this axis for equality with an arbitrary object.

Parameters
obj the object (null permitted).
Returns
  • A boolean.

public double getDisplayEnd ()

Returns the display end value.

Returns
  • The display end value.

public double getDisplayStart ()

Returns the display start value.

Returns
  • The display start value.

public double java2DToValue (double java2DValue, Rectangle2D area, RectangleEdge edge)

Translates a Java2D coordinate into a data value.

Parameters
java2DValue the Java2D coordinate.
area the area.
edge the edge.
Returns
  • The Java2D coordinate.

public double lengthToJava2D (double length, Rectangle2D area, RectangleEdge edge)

Converts a length in data coordinates into the corresponding length in Java2D coordinates.

Parameters
length the length.
area the plot area.
edge the edge along which the axis lies.
Returns
  • The length in Java2D coordinates.

public void resizeRange (double percent)

Increases or decreases the axis range by the specified percentage about the central value and sends an AxisChangeEvent to all registered listeners.

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.

public void resizeRange (double percent, double anchorValue)

Increases or decreases the axis range by the specified percentage about the specified anchor value and sends an AxisChangeEvent to all registered listeners.

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.

public void setDisplayRange (double start, double end)

Sets the display range. The values will be mapped to the fixed range if necessary.

Parameters
start the start value.
end the end value.

public double valueToJava2D (double value, Rectangle2D area, RectangleEdge edge)

Translates a data value to a Java2D coordinate.

Parameters
value the value.
area the area.
edge the edge.
Returns
  • A Java2D coordinate.

Protected Methods

protected void autoAdjustRange ()

This method should calculate a range that will show all the data values. For now, it just sets the axis range to the fixedRange.