org.jfree.chart.renderer

Class GrayPaintScale

Implemented Interfaces:
PaintScale, PublicCloneable, Serializable

public class GrayPaintScale
extends java.lang.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

Object
clone()
Returns a clone of this GrayPaintScale instance.
boolean
equals(Object obj)
Tests this GrayPaintScale instance for equality with an arbitrary object.
double
getLowerBound()
Returns the lower bound.
Paint
getPaint(double value)
Returns a paint for the specified value.
double
getUpperBound()
Returns the upper bound.

Constructor Details

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.

Method Details

clone

public Object clone()
            throws CloneNotSupportedException
Returns a clone of this GrayPaintScale instance.
Returns:
A clone.

equals

public boolean equals(Object obj)
Tests this GrayPaintScale instance for equality with an arbitrary object. This method returns true if and only if:
  • obj is not null;
  • obj is an instance of GrayPaintScale;
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

getLowerBound

public double getLowerBound()
Returns the lower bound.
Specified by:
getLowerBound in interface PaintScale
Returns:
The lower bound.

getPaint

public Paint getPaint(double value)
Returns a paint for the specified value.
Specified by:
getPaint in interface PaintScale
Parameters:
value - the value.
Returns:
A paint for the specified value.

getUpperBound

public double getUpperBound()
Returns the upper bound.
Specified by:
getUpperBound in interface PaintScale
Returns:
The upper bound.