public class

GrayPaintScale

extends Object
implements Serializable PaintScale
java.lang.Object
   ↳ org.jfree.chart.renderer.GrayPaintScale

Class Overview

A paint scale that returns shades of gray.

Summary

Public Constructors
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.
GrayPaintScale(double lowerBound, double upperBound, int alpha)
Creates a new paint scale for values in the specified range.
Public Methods
Object clone()
Returns a clone of this GrayPaintScale instance.
boolean equals(Object obj)
Tests this GrayPaintScale instance for equality with an arbitrary object.
int getAlpha()
Returns the alpha transparency that was specified in the constructor.
double getLowerBound()
Returns the lower bound.
Paint getPaint(double value)
Returns a paint for the specified value.
double getUpperBound()
Returns the upper bound.
int hashCode()
Returns a hash code for this instance.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.jfree.chart.renderer.PaintScale

Public Constructors

public GrayPaintScale ()

Creates a new GrayPaintScale instance with default values.

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.

public GrayPaintScale (double lowerBound, double upperBound, int alpha)

Creates a new paint scale for values in the specified range.

Parameters
lowerBound the lower bound.
upperBound the upper bound.
alpha the alpha transparency (0-255).
Throws
IllegalArgumentException if lowerBound is not less than upperBound, or alpha is not in the range 0 to 255.

Public Methods

public Object clone ()

Returns a clone of this GrayPaintScale instance.

Returns
  • A clone.
Throws
CloneNotSupportedException if there is a problem cloning this instance.

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.

public int getAlpha ()

Returns the alpha transparency that was specified in the constructor.

Returns
  • The alpha transparency (in the range 0 to 255).

public double getLowerBound ()

Returns the lower bound.

Returns
  • The lower bound.
See Also

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.

public double getUpperBound ()

Returns the upper bound.

Returns
  • The upper bound.
See Also

public int hashCode ()

Returns a hash code for this instance.

Returns
  • A hash code.