Package org.apache.poi.xssf.usermodel
Class XSSFColorScaleFormatting
- java.lang.Object
-
- org.apache.poi.xssf.usermodel.XSSFColorScaleFormatting
-
- All Implemented Interfaces:
ColorScaleFormatting
public class XSSFColorScaleFormatting extends 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 Description XSSFColorcreateColor()XSSFConditionalFormattingThresholdcreateThreshold()Creates a new, empty ThresholdXSSFColor[]getColors()Gets the list of colours that are interpolated between.intgetNumControlPoints()How many control points should be used to map the colours? Normally 2 or 3XSSFConditionalFormattingThreshold[]getThresholds()Gets the list of thresholdsvoidsetColors(Color[] colors)Sets the list of colours that are interpolated between.voidsetNumControlPoints(int num)Sets the number of control points to use to map the colours.voidsetThresholds(ConditionalFormattingThreshold[] thresholds)Sets the of thresholds.
-
-
-
Method Detail
-
getNumControlPoints
public int getNumControlPoints()
Description copied from interface:ColorScaleFormattingHow many control points should be used to map the colours? Normally 2 or 3- Specified by:
getNumControlPointsin interfaceColorScaleFormatting
-
setNumControlPoints
public void setNumControlPoints(int num)
Description copied from interface:ColorScaleFormattingSets 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
Thresholdcount and Color count match- Specified by:
setNumControlPointsin interfaceColorScaleFormatting
-
getColors
public XSSFColor[] getColors()
Description copied from interface:ColorScaleFormattingGets the list of colours that are interpolated between.- Specified by:
getColorsin interfaceColorScaleFormatting
-
setColors
public void setColors(Color[] colors)
Description copied from interface:ColorScaleFormattingSets the list of colours that are interpolated between. The number must matchColorScaleFormatting.getNumControlPoints()- Specified by:
setColorsin interfaceColorScaleFormatting
-
getThresholds
public XSSFConditionalFormattingThreshold[] getThresholds()
Description copied from interface:ColorScaleFormattingGets the list of thresholds- Specified by:
getThresholdsin interfaceColorScaleFormatting
-
setThresholds
public void setThresholds(ConditionalFormattingThreshold[] thresholds)
Description copied from interface:ColorScaleFormattingSets the of thresholds. The number must matchColorScaleFormatting.getNumControlPoints()- Specified by:
setThresholdsin interfaceColorScaleFormatting
-
createColor
public XSSFColor createColor()
- Returns:
- color from scale
-
createThreshold
public XSSFConditionalFormattingThreshold createThreshold()
Description copied from interface:ColorScaleFormattingCreates a new, empty Threshold- Specified by:
createThresholdin interfaceColorScaleFormatting
-
-