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.

灰度梯度,此类在外部是不可以修改的.

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()
          缺省的构造器.
GrayPaintScale(double lowerBound, double upperBound)
          构造器.
 
Method Summary
 java.lang.Object clone()
          返回克隆的对象.
 boolean equals(java.lang.Object obj)
          测试两个对象是否相等.
 double getLowerBound()
          返回最小边界值.
 java.awt.Paint getPaint(double value)
          返回某个值对应的paint对象.
 double getUpperBound()
          返回最大边界值.
 int hashCode()
          计算对象的hashcode值.
 java.lang.String toString()
          覆盖toString方法.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GrayPaintScale

public GrayPaintScale()
缺省的构造器.


GrayPaintScale

public GrayPaintScale(double lowerBound,
                      double upperBound)
构造器.

Parameters:
lowerBound - 最小边界值.
upperBound - 最大边界值.
Method Detail

getLowerBound

public double getLowerBound()
返回最小边界值.

Specified by:
getLowerBound in interface IPaintScale
Returns:
double 最小边界值.

getUpperBound

public double getUpperBound()
返回最大边界值.

Specified by:
getUpperBound in interface IPaintScale
Returns:
double 最大边界值.

getPaint

public java.awt.Paint getPaint(double value)
返回某个值对应的paint对象.

Specified by:
getPaint in interface IPaintScale
Parameters:
value - double 数字值.
Returns:
Paint paint对象 (不为null).

equals

public boolean equals(java.lang.Object obj)
测试两个对象是否相等.

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

hashCode

public int hashCode()
计算对象的hashcode值.

Overrides:
hashCode in class java.lang.Object
Returns:
int 对象的hashcode值.

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
返回克隆的对象.

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()
覆盖toString方法.

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