public class XSSFConditionalFormattingRule extends java.lang.Object implements ConditionalFormattingRule
Modifier and Type | Method and Description |
---|---|
XSSFBorderFormatting |
createBorderFormatting()
Create a new border formatting structure if it does not exist,
otherwise just return existing object.
|
XSSFColorScaleFormatting |
createColorScaleFormatting() |
XSSFDataBarFormatting |
createDataBarFormatting(XSSFColor color) |
XSSFFontFormatting |
createFontFormatting()
Create a new font formatting structure if it does not exist,
otherwise just return existing object.
|
XSSFIconMultiStateFormatting |
createMultiStateFormatting(IconMultiStateFormatting.IconSet iconSet) |
XSSFPatternFormatting |
createPatternFormatting()
Create a new pattern formatting structure if it does not exist,
otherwise just return existing object.
|
XSSFBorderFormatting |
getBorderFormatting() |
XSSFColorScaleFormatting |
getColorScaleFormatting() |
byte |
getComparisonOperation()
The comparison function used when the type of conditional formatting is set to
ConditionType.CELL_VALUE_IS |
ConditionFilterType |
getConditionFilterType()
Will return null if
getConditionType() != ConditionType.FILTER |
ConditionType |
getConditionType()
Type of conditional formatting rule.
|
XSSFDataBarFormatting |
getDataBarFormatting() |
ConditionFilterData |
getFilterConfiguration()
This is null if
|
XSSFFontFormatting |
getFontFormatting() |
java.lang.String |
getFormula1()
The formula used to evaluate the first operand for the conditional formatting rule.
|
java.lang.String |
getFormula2()
The formula used to evaluate the second operand of the comparison when
comparison type is
ConditionType.CELL_VALUE_IS and operator
is either ComparisonOperator.BETWEEN or ComparisonOperator.NOT_BETWEEN |
XSSFIconMultiStateFormatting |
getMultiStateFormatting() |
ExcelNumberFormat |
getNumberFormat()
Return the number format from the dxf style record if present, null if not
|
XSSFPatternFormatting |
getPatternFormatting() |
int |
getPriority()
The priority of the rule, if defined, otherwise 0.
|
boolean |
getStopIfTrue()
Always true for HSSF rules, optional flag for XSSF rules.
|
int |
getStripeSize()
Conditional format rules don't define stripes, so always 0
|
java.lang.String |
getText()
XSSF rules store textual condition values as an attribute and also as a formula that needs shifting.
|
public int getPriority()
ConditionalFormattingRule
If priority is 0, just use definition order, as that's how older HSSF rules are evaluated.
For XSSF, this should always be set. For HSSF, only newer style rules have this set, older ones will return 0.
If a rule is created but not yet added to a sheet, this value may not be valid.
getPriority
in interface ConditionalFormattingRule
public boolean getStopIfTrue()
ConditionalFormattingRule
getStopIfTrue
in interface ConditionalFormattingRule
public XSSFBorderFormatting createBorderFormatting()
createBorderFormatting
in interface ConditionalFormattingRule
null
.public XSSFBorderFormatting getBorderFormatting()
getBorderFormatting
in interface ConditionalFormattingRule
getBorderFormatting
in interface DifferentialStyleProvider
null
otherwisepublic XSSFFontFormatting createFontFormatting()
createFontFormatting
in interface ConditionalFormattingRule
null
.public XSSFFontFormatting getFontFormatting()
getFontFormatting
in interface ConditionalFormattingRule
getFontFormatting
in interface DifferentialStyleProvider
null
otherwisepublic XSSFPatternFormatting createPatternFormatting()
createPatternFormatting
in interface ConditionalFormattingRule
null
.public XSSFPatternFormatting getPatternFormatting()
getPatternFormatting
in interface ConditionalFormattingRule
getPatternFormatting
in interface DifferentialStyleProvider
null
otherwisepublic XSSFDataBarFormatting createDataBarFormatting(XSSFColor color)
color
- public XSSFDataBarFormatting getDataBarFormatting()
getDataBarFormatting
in interface ConditionalFormattingRule
null
otherwisepublic XSSFIconMultiStateFormatting createMultiStateFormatting(IconMultiStateFormatting.IconSet iconSet)
public XSSFIconMultiStateFormatting getMultiStateFormatting()
getMultiStateFormatting
in interface ConditionalFormattingRule
null
otherwisepublic XSSFColorScaleFormatting createColorScaleFormatting()
public XSSFColorScaleFormatting getColorScaleFormatting()
getColorScaleFormatting
in interface ConditionalFormattingRule
null
otherwisepublic ExcelNumberFormat getNumberFormat()
getNumberFormat
in interface ConditionalFormattingRule
getNumberFormat
in interface DifferentialStyleProvider
ConditionalFormattingRule.getNumberFormat()
public ConditionType getConditionType()
getConditionType
in interface ConditionalFormattingRule
public ConditionFilterType getConditionFilterType()
getConditionType()
!= ConditionType.FILTER
getConditionFilterType
in interface ConditionalFormattingRule
ConditionalFormattingRule.getConditionFilterType()
public ConditionFilterData getFilterConfiguration()
ConditionalFormattingRule
ConditionalFormattingRule.getConditionFilterType()
== null
This means it is always null for HSSF, which does not define the extended condition types.
This object contains the additional configuration information for XSSF filter conditions.
getFilterConfiguration
in interface ConditionalFormattingRule
public byte getComparisonOperation()
ConditionType.CELL_VALUE_IS
MUST be a constant from ComparisonOperator
getComparisonOperation
in interface ConditionalFormattingRule
public java.lang.String getFormula1()
If the condition type is ConditionType.CELL_VALUE_IS
,
this field is the first operand of the comparison.
If type is ConditionType.FORMULA
, this formula is used
to determine if the conditional formatting is applied.
If comparison type is ConditionType.FORMULA
the formula MUST be a Boolean function
getFormula1
in interface ConditionalFormattingRule
public java.lang.String getFormula2()
ConditionType.CELL_VALUE_IS
and operator
is either ComparisonOperator.BETWEEN
or ComparisonOperator.NOT_BETWEEN
getFormula2
in interface ConditionalFormattingRule
public java.lang.String getText()
ConditionalFormattingRule
getText
in interface ConditionalFormattingRule
public int getStripeSize()
getStripeSize
in interface DifferentialStyleProvider
DifferentialStyleProvider.getStripeSize()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.