Package org.apache.poi.ss.usermodel
Interface ConditionalFormattingThreshold
- All Known Implementing Classes:
HSSFConditionalFormattingThreshold
,XSSFConditionalFormattingThreshold
public interface ConditionalFormattingThreshold
The Threshold / CFVO / Conditional Formatting Value Object.
This defines how to calculate the ranges for a conditional formatting rule, eg which values get a Green Traffic Light icon and which Yellow or Red.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionFormula to use to calculate the threshold, ornull
if no formulaGet the Range Type usedgetValue()
Gets the value used for the threshold, ornull
if there isn't one.void
setFormula
(String formula) Sets the formula used to calculate the threshold, or unsets it ifnull
is given.void
Changes the Range Type usedvoid
Sets the value used for the threshold.
-
Method Details
-
getRangeType
ConditionalFormattingThreshold.RangeType getRangeType()Get the Range Type used -
setRangeType
Changes the Range Type usedIf you change the range type, you need to ensure that the Formula and Value parameters are compatible with it before saving
-
getFormula
String getFormula()Formula to use to calculate the threshold, ornull
if no formula -
setFormula
Sets the formula used to calculate the threshold, or unsets it ifnull
is given. -
getValue
Double getValue()Gets the value used for the threshold, ornull
if there isn't one. -
setValue
Sets the value used for the threshold.If the type is
ConditionalFormattingThreshold.RangeType.PERCENT
orConditionalFormattingThreshold.RangeType.PERCENTILE
it must be between 0 and 100.If the type is
ConditionalFormattingThreshold.RangeType.MIN
orConditionalFormattingThreshold.RangeType.MAX
orConditionalFormattingThreshold.RangeType.FORMULA
it shouldn't be set.Use
null
to unset
-