org.apache.poi.xssf.usermodel

## Class XSSFColorScaleFormatting

- java.lang.Object
- - org.apache.poi.xssf.usermodel.XSSFColorScaleFormatting

- All Implemented Interfaces:
    ColorScaleFormatting

      public class XSSFColorScaleFormatting
      extends java.lang.Object
      implements ColorScaleFormatting

  High level representation for Color Scale / Color Gradient Formatting component of Conditional Formatting settings

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `XSSFColor` | `createColor()`
    `XSSFConditionalFormattingThreshold` | `createThreshold()` Creates a new, empty Threshold
    `XSSFColor[]` | `getColors()` Gets the list of colours that are interpolated between.
    `int` | `getNumControlPoints()` How many control points should be used to map the colours? Normally 2 or 3
    `XSSFConditionalFormattingThreshold[]` | `getThresholds()` Gets the list of thresholds
    `void` | `setColors(Color[] colors)` Sets the list of colours that are interpolated between.
    `void` | `setNumControlPoints(int num)` Sets the number of control points to use to map the colours.
    `void` | `setThresholds(ConditionalFormattingThreshold[] thresholds)` Sets the of thresholds.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getNumControlPoints

          public int getNumControlPoints()

      Description copied from interface: `ColorScaleFormatting`
      How many control points should be used to map the colours? Normally 2 or 3
      Specified by:
        `getNumControlPoints` in interface `ColorScaleFormatting`

    - #### setNumControlPoints

          public void setNumControlPoints(int num)

      Description copied from interface: `ColorScaleFormatting`
      Sets the number of control points to use to map the colours. Should normally be 2 or 3.

      After updating, you need to ensure that the `Threshold` count and Color count match

      Specified by:
        `setNumControlPoints` in interface `ColorScaleFormatting`

    - #### getColors

          public XSSFColor[] getColors()

      Description copied from interface: `ColorScaleFormatting`
      Gets the list of colours that are interpolated between.
      Specified by:
        `getColors` in interface `ColorScaleFormatting`

    - #### setColors

          public void setColors(Color[] colors)

      Description copied from interface: `ColorScaleFormatting`
      Sets the list of colours that are interpolated between. The number must match `ColorScaleFormatting.getNumControlPoints()`
      Specified by:
        `setColors` in interface `ColorScaleFormatting`

    - #### getThresholds

          public XSSFConditionalFormattingThreshold[] getThresholds()

      Description copied from interface: `ColorScaleFormatting`
      Gets the list of thresholds
      Specified by:
        `getThresholds` in interface `ColorScaleFormatting`

    - #### setThresholds

          public void setThresholds(ConditionalFormattingThreshold[] thresholds)

      Description copied from interface: `ColorScaleFormatting`
      Sets the of thresholds. The number must match `ColorScaleFormatting.getNumControlPoints()`
      Specified by:
        `setThresholds` in interface `ColorScaleFormatting`

    - #### createColor

          public XSSFColor createColor()

      Returns:
        color from scale

    - #### createThreshold

          public XSSFConditionalFormattingThreshold createThreshold()

      Description copied from interface: `ColorScaleFormatting`
      Creates a new, empty Threshold
      Specified by:
        `createThreshold` in interface `ColorScaleFormatting`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.