Class IndexedPaintScale

java.lang.Object
org.moeaframework.analysis.plot.style.AutoScaledPaintScale
org.moeaframework.analysis.plot.style.IndexedPaintScale
All Implemented Interfaces:
org.jfree.chart.renderer.PaintScale
Direct Known Subclasses:
ColorGradientPaintScale

public class IndexedPaintScale extends AutoScaledPaintScale
Paint scale that maps Z values to a list of colors.
  • Constructor Details

    • IndexedPaintScale

      public IndexedPaintScale(double lowerBound, double upperBound, Paint... paints)
      Constructs an indexed paint scale.
      Parameters:
      lowerBound - the lower bound
      upperBound - the upper bound
      paints - the array of paints
  • Method Details

    • getScaledPaint

      public Paint getScaledPaint(double value)
      Description copied from class: AutoScaledPaintScale
      Returns the paint for a value scaled by the lower and upper bounds.
      Specified by:
      getScaledPaint in class AutoScaledPaintScale
      Parameters:
      value - the scaled value, between 0.0 and 1.0
      Returns:
      the paint
    • scale

      public IndexedPaintScale scale(double lowerBound, double upperBound)
      Description copied from class: AutoScaledPaintScale
      Returns a new paint scale with new lower and upper bounds.
      Specified by:
      scale in class AutoScaledPaintScale
      Parameters:
      lowerBound - the new lower bound
      upperBound - the new upper bound
      Returns:
      the new paint scale