org.jfree.chart.renderer

Class GrayPaintScale

public class GrayPaintScale extends Object implements PaintScale, PublicCloneable, Serializable

A paint scale that returns shades of gray.

Since: 1.0.4

Constructor Summary
GrayPaintScale()
Creates a new GrayPaintScale instance with default values.
GrayPaintScale(double lowerBound, double upperBound)
Creates a new paint scale for values in the specified range.
Method Summary
Objectclone()
Returns a clone of this GrayPaintScale instance.
booleanequals(Object obj)
Tests this GrayPaintScale instance for equality with an arbitrary object.
doublegetLowerBound()
Returns the lower bound.
PaintgetPaint(double value)
Returns a paint for the specified value.
doublegetUpperBound()
Returns the upper bound.

Constructor Detail

GrayPaintScale

public GrayPaintScale()
Creates a new GrayPaintScale instance with default values.

GrayPaintScale

public GrayPaintScale(double lowerBound, double upperBound)
Creates a new paint scale for values in the specified range.

Parameters: lowerBound the lower bound. upperBound the upper bound.

Throws: IllegalArgumentException if lowerBound is not less than upperBound.

Method Detail

clone

public Object clone()
Returns a clone of this GrayPaintScale instance.

Returns: A clone.

Throws: CloneNotSupportedException if there is a problem cloning this instance.

equals

public boolean equals(Object obj)
Tests this GrayPaintScale instance for equality with an arbitrary object. This method returns true if and only if:

Parameters: obj the object (null permitted).

Returns: A boolean.

getLowerBound

public double getLowerBound()
Returns the lower bound.

Returns: The lower bound.

See Also: getUpperBound

getPaint

public Paint getPaint(double value)
Returns a paint for the specified value.

Parameters: value the value (must be within the range specified by the lower and upper bounds for the scale).

Returns: A paint for the specified value.

getUpperBound

public double getUpperBound()
Returns the upper bound.

Returns: The upper bound.

See Also: getLowerBound