com.ijchart.xychart.render.paint
Class GrayPaintScale

java.lang.Object
  extended by com.ijchart.xychart.render.paint.GrayPaintScale
All Implemented Interfaces:
IPaintScale, java.io.Serializable, java.lang.Cloneable

public class GrayPaintScale
extends java.lang.Object
implements IPaintScale, java.io.Serializable, java.lang.Cloneable

Title: IJChart

Description: a chart library for the Java(tm) platform.

A paint scale that returns shades of gray,this class is immutable.

Copyright: Copyright (c) 2013

Company:

Version:
1.0
Author:
zhang feng min,shanghai china. Contract me by email.
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.ijchart.xychart.render.paint.IPaintScale
DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND
 
Constructor Summary
GrayPaintScale()
           The default constructor.
GrayPaintScale(double lowerBound, double upperBound)
           The constructor.
 
Method Summary
 java.lang.Object clone()
           Creates and returns a copy of this object.
 boolean equals(java.lang.Object obj)
           Tests this instance for equality with an arbitrary object.
 double getLowerBound()
           The lower bound.
 java.awt.Paint getPaint(double value)
           Returns a Paint instance for the specified value.
 double getUpperBound()
           The upper bound.
 int hashCode()
           Returns a hash code value for the object.
 java.lang.String toString()
           Returns a string representation of the object.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GrayPaintScale

public GrayPaintScale()
The default constructor.


GrayPaintScale

public GrayPaintScale(double lowerBound,
                      double upperBound)
The constructor.

Parameters:
lowerBound - The lower bound.
upperBound - The upper bound.
Method Detail

getLowerBound

public double getLowerBound()
The lower bound.

Specified by:
getLowerBound in interface IPaintScale
Returns:
double The lower bound.

getUpperBound

public double getUpperBound()
The upper bound.

Specified by:
getUpperBound in interface IPaintScale
Returns:
double The upper bound.

getPaint

public java.awt.Paint getPaint(double value)
Returns a Paint instance for the specified value.

Specified by:
getPaint in interface IPaintScale
Parameters:
value - double The value.
Returns:
Paint The paint object (never null).

equals

public boolean equals(java.lang.Object obj)
Tests this instance for equality with an arbitrary object.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object (null permitted).
Returns:
A boolean.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class java.lang.Object
Returns:
int A hash code value for this object.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class java.lang.Object
Returns:
object a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface. Subclasses that override the clone method can also throw this exception to indicate that an instance cannot be cloned.

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.