com.ijchart.xychart.render.paint
Class LookupPaintScale

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

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

Title: IJChart

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

根据值查找paint对象.

Copyright: Copyright (c) 2013

Company:

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

Field Summary
static java.awt.Paint DEFAULT_PAINT
          缺省的静态paint对象.
 
Fields inherited from interface com.ijchart.xychart.render.paint.IPaintScale
DEFAULT_LOWER_BOUND, DEFAULT_UPPER_BOUND
 
Constructor Summary
LookupPaintScale()
          缺省的构造器.
LookupPaintScale(double lowerBound, double upperBound)
          构造器.
LookupPaintScale(double lowerBound, double upperBound, java.awt.Paint defaultPaint)
          构造器.
LookupPaintScale(double lowerBound, double upperBound, java.awt.Paint defaultPaint, java.lang.String[] legendSymbols)
          构造器.
 
Method Summary
 void add(double value, java.awt.Paint paint)
          增加一个值和paint的对应关系.
 java.lang.Object clone()
          返回克隆的对象.
 boolean equals(java.lang.Object obj)
          测试两个对象是否相等.
 java.awt.Paint getDefaultPaint()
          返回缺省的paint对象.
 java.lang.String[] getLegendSymbols()
          返回绘制图例图形时显示的分类刻度值.
 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
 

Field Detail

DEFAULT_PAINT

public static final transient java.awt.Paint DEFAULT_PAINT
缺省的静态paint对象.

Constructor Detail

LookupPaintScale

public LookupPaintScale()
缺省的构造器.


LookupPaintScale

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

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

LookupPaintScale

public LookupPaintScale(double lowerBound,
                        double upperBound,
                        java.awt.Paint defaultPaint)
构造器.

Parameters:
lowerBound - 最小边界值.
upperBound - 最大边界值.
defaultPaint - 缺省的paint对象 (不可为null).

LookupPaintScale

public LookupPaintScale(double lowerBound,
                        double upperBound,
                        java.awt.Paint defaultPaint,
                        java.lang.String[] legendSymbols)
构造器.

Parameters:
lowerBound - 最小边界值.
upperBound - 最大边界值.
defaultPaint - 缺省的paint对象 (不可为null). 绘制图例图形时显示的分类刻度值.
legendSymbols - 图例标签数组.
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 最大边界值.

getDefaultPaint

public java.awt.Paint getDefaultPaint()
返回缺省的paint对象.

Returns:
Paint paint对象 (不为null).

getLegendSymbols

public java.lang.String[] getLegendSymbols()
返回绘制图例图形时显示的分类刻度值.

Returns:
String[] 字符串数组 (可为null).

add

public void add(double value,
                java.awt.Paint paint)
增加一个值和paint的对应关系.

Parameters:
value - double 值.
paint - Paint paint对象.

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.