Class WaferMapRenderer

java.lang.Object
org.jfree.chart.renderer.AbstractRenderer
org.jfree.chart.renderer.WaferMapRenderer
All Implemented Interfaces:
Serializable, Cloneable

public class WaferMapRenderer extends AbstractRenderer
A renderer for wafer map plots. Provides color management facilities.
See Also:
  • Field Details

    • paintIndex

      private Map paintIndex
      paint index
    • plot

      private WaferMapPlot plot
      plot
    • paintLimit

      private int paintLimit
      paint limit
    • DEFAULT_PAINT_LIMIT

      private static final int DEFAULT_PAINT_LIMIT
      default paint limit
      See Also:
    • POSITION_INDEX

      public static final int POSITION_INDEX
      default multivalue paint calculation
      See Also:
    • VALUE_INDEX

      public static final int VALUE_INDEX
      The default value index.
      See Also:
    • paintIndexMethod

      private int paintIndexMethod
      paint index method
  • Constructor Details

    • WaferMapRenderer

      public WaferMapRenderer()
      Creates a new renderer.
    • WaferMapRenderer

      public WaferMapRenderer(int paintLimit, int paintIndexMethod)
      Creates a new renderer.
      Parameters:
      paintLimit - the paint limit.
      paintIndexMethod - the paint index method.
    • WaferMapRenderer

      public WaferMapRenderer(Integer paintLimit, Integer paintIndexMethod)
      Creates a new renderer.
      Parameters:
      paintLimit - the paint limit.
      paintIndexMethod - the paint index method.
  • Method Details

    • isMethodValid

      private boolean isMethodValid(int method)
      Verifies that the passed paint index method is valid.
      Parameters:
      method - the method.
      Returns:
      true or false.
    • getDrawingSupplier

      public DrawingSupplier getDrawingSupplier()
      Returns the drawing supplier from the plot.
      Specified by:
      getDrawingSupplier in class AbstractRenderer
      Returns:
      The drawing supplier.
    • getPlot

      public WaferMapPlot getPlot()
      Returns the plot.
      Returns:
      The plot.
    • setPlot

      public void setPlot(WaferMapPlot plot)
      Sets the plot and build the paint index.
      Parameters:
      plot - the plot.
    • getChipColor

      public Paint getChipColor(Number value)
      Returns the paint for a given chip value.
      Parameters:
      value - the value.
      Returns:
      The paint.
    • getPaintIndex

      private int getPaintIndex(Number value)
      Returns the paint index for a given chip value.
      Parameters:
      value - the value.
      Returns:
      The paint index.
    • makePaintIndex

      private void makePaintIndex()
      Builds a map of chip values to paint colors. paintlimit is the maximum allowed number of colors.
    • makePositionIndex

      private void makePositionIndex(Set uniqueValues)
      Builds the paintindex by assigning colors based on the number of unique values: totalvalues/totalcolors.
      Parameters:
      uniqueValues - the set of unique values.
    • makeValueIndex

      private void makeValueIndex(Number max, Number min, Set uniqueValues)
      Builds the paintindex by assigning colors evenly across the range of values: maxValue-minValue/totalcolors
      Parameters:
      max - the maximum value.
      min - the minumum value.
      uniqueValues - the unique values.
    • getLegendCollection

      public LegendItemCollection getLegendCollection()
      Builds the list of legend entries. called by getLegendItems in WaferMapPlot to populate the plot legend.
      Returns:
      The legend items.
    • getMinPaintValue

      private Number getMinPaintValue(Integer index)
      Returns the minimum chip value assigned to a color in the paintIndex
      Parameters:
      index - the index.
      Returns:
      The value.
    • getMaxPaintValue

      private Number getMaxPaintValue(Integer index)
      Returns the maximum chip value assigned to a color in the paintIndex
      Parameters:
      index - the index.
      Returns:
      The value