org.jfree.chart.renderer
Class LookupPaintScale
java.lang.Objectorg.jfree.chart.renderer.LookupPaintScale
- PaintScale, PublicCloneable, Serializable
extends java.lang.Object
implements PaintScale, PublicCloneable, Serializable
A paint scale that uses a lookup table to associate paint instances
with data value ranges.
LookupPaintScale()- Creates a new paint scale.
|
LookupPaintScale(double lowerBound, double upperBound, Paint defaultPaint)- Creates a new paint scale with the specified default paint.
|
void | add(Number value, Paint paint)- Use
add(double,Paint).
|
void | add(double value, Paint paint)- Adds an entry to the lookup table.
|
Object | clone()- Returns a clone of the instance.
|
boolean | equals(Object obj)- Tests this instance for equality with an arbitrary object.
|
Paint | getDefaultPaint()- Returns the default paint (never
null).
|
double | getLowerBound()- Returns the lower bound.
|
Paint | getPaint(double value)- Returns the paint associated with the specified value.
|
double | getUpperBound()- Returns the upper bound.
|
LookupPaintScale
public LookupPaintScale(double lowerBound,
double upperBound,
Paint defaultPaint) Creates a new paint scale with the specified default paint.
lowerBound - the lower bound.upperBound - the upper bound.defaultPaint - the default paint (null not
permitted).
add
public void add(Number value,
Paint paint)Use add(double,Paint).
Adds an entry to the lookup table. Any values from n up
to but not including the next value in the table take on the specified
paint.
value - the data value (null not permitted).paint - the paint.
add
public void add(double value,
Paint paint) Adds an entry to the lookup table. Any values from n up
to but not including the next value in the table take on the specified
paint.
value - the data value.paint - the paint.
clone
public Object clone()
throws CloneNotSupportedException Returns a clone of the instance.
equals
public boolean equals(Object obj)
Tests this instance for equality with an arbitrary object.
obj - the object (null permitted).
getDefaultPaint
public Paint getDefaultPaint()
Returns the default paint (never null).
getPaint
public Paint getPaint(double value)
Returns the paint associated with the specified value.
- getPaint in interface PaintScale