Class FixedColorScale

java.lang.Object
org.jfree.chart3d.renderer.FixedColorScale
All Implemented Interfaces:
Serializable, ColorScale

public class FixedColorScale extends Object implements ColorScale, Serializable
A ColorScale that returns the same color for every value on the scale. This is used by the SurfaceRenderer when there is no need to represent different value levels by color.

NOTE: This class is serializable, but the serialization format is subject to change in future releases and should not be relied upon for persisting instances of this class.
Since:
1.1
See Also:
  • Constructor Details

    • FixedColorScale

      public FixedColorScale(Color color)
      Creates a new FixedColorScale instance.
      Parameters:
      color - the color (null not permitted).
  • Method Details

    • getRange

      public Range getRange()
      Returns the range 0.0 to 1.0 always.
      Specified by:
      getRange in interface ColorScale
      Returns:
      The range (never null).
    • valueToColor

      public Color valueToColor(double value)
      Returns a single color (as specified in the constructor) for all values.
      Specified by:
      valueToColor in interface ColorScale
      Parameters:
      value - the value.
      Returns:
      The fixed color.
    • equals

      public boolean equals(Object obj)
      Tests this instance for equality with an arbitrary object.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object (null permitted).
      Returns:
      A boolean.