Top Description Methods
org.apache.poi.ss.usermodel

public Interface ColorScaleFormatting

Known Direct Implementers
org.apache.poi.hssf.usermodel.HSSFColorScaleFormatting
Imports
org.apache.poi.hssf.record.cf.Threshold

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

Method Summary

Modifier and TypeMethod and Description
public ConditionalFormattingThreshold
createThreshold()

Creates a new, empty Threshold

public Color[]
getColors()

Gets the list of colours that are interpolated between.

public int
getNumControlPoints()

How many control points should be used to map the colours?

public ConditionalFormattingThreshold[]
getThresholds()

Gets the list of thresholds

public void
setColors(Color[] colors)

Sets the list of colours that are interpolated between.

public void
setNumControlPoints(int num)

Sets the number of control points to use to map the colours.

public void
setThresholds(ConditionalFormattingThreshold[] thresholds)

Sets the of thresholds.

Method Detail

createThresholdback to summary
public ConditionalFormattingThreshold createThreshold()

Creates a new, empty Threshold

getColorsback to summary
public Color[] getColors()

Gets the list of colours that are interpolated between.

getNumControlPointsback to summary
public int getNumControlPoints()

How many control points should be used to map the colours? Normally 2 or 3

getThresholdsback to summary
public ConditionalFormattingThreshold[] getThresholds()

Gets the list of thresholds

setColorsback to summary
public void setColors(Color[] colors)

Sets the list of colours that are interpolated between. The number must match getNumControlPoints()

setNumControlPointsback to summary
public void setNumControlPoints(int num)

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

setThresholdsback to summary
public void setThresholds(ConditionalFormattingThreshold[] thresholds)

Sets the of thresholds. The number must match getNumControlPoints()