Class ColorPaintScale
java.lang.Object
net.simplace.core.ui.jfreechart.style.ColorPaintScale
- All Implemented Interfaces:
Serializable
,Cloneable
,org.jfree.chart.renderer.PaintScale
,org.jfree.util.PublicCloneable
public class ColorPaintScale
extends Object
implements org.jfree.chart.renderer.PaintScale, org.jfree.util.PublicCloneable, Serializable
A paint scale that returns shades of gray.
- Since:
- 1.0.4
- See Also:
-
Constructor Summary
ConstructorDescriptionColorPaintScale
(Color lowerBoundColor, double lowerBound, Color upperBoundColor, double upperBound) Creates a new paint scale for values in the specified range. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone of thisGrayPaintScale
instance.boolean
Tests thisGrayPaintScale
instance for equality with an arbitrary object.double
Returns the lower bound.getPaint
(double value) Returns a paint for the specified value.double
Returns the upper bound.
-
Constructor Details
-
ColorPaintScale
public ColorPaintScale(Color lowerBoundColor, double lowerBound, Color upperBoundColor, double upperBound) Creates a new paint scale for values in the specified range.- Parameters:
lowerBoundColor
-lowerBound
-upperBoundColor
-upperBound
-- Throws:
IllegalArgumentException
- iflowerBound
is not less thanupperBound
.
-
-
Method Details
-
getLowerBound
public double getLowerBound()Returns the lower bound.- Specified by:
getLowerBound
in interfaceorg.jfree.chart.renderer.PaintScale
- Returns:
- The lower bound.
- See Also:
-
getUpperBound
public double getUpperBound()Returns the upper bound.- Specified by:
getUpperBound
in interfaceorg.jfree.chart.renderer.PaintScale
- Returns:
- The upper bound.
- See Also:
-
getPaint
Returns a paint for the specified value.- Specified by:
getPaint
in interfaceorg.jfree.chart.renderer.PaintScale
- 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.
-
equals
Tests thisGrayPaintScale
instance for equality with an arbitrary object. This method returnstrue
if and only if:obj
is notnull
;obj
is an instance ofGrayPaintScale
;
-
clone
Returns a clone of thisGrayPaintScale
instance.- Specified by:
clone
in interfaceorg.jfree.util.PublicCloneable
- Overrides:
clone
in classObject
- Returns:
- A clone.
- Throws:
CloneNotSupportedException
- if there is a problem cloning this instance.
-