Package org.apache.poi.xssf.usermodel
Class XSSFConditionalFormattingRule
java.lang.Object
org.apache.poi.xssf.usermodel.XSSFConditionalFormattingRule
- All Implemented Interfaces:
ConditionalFormattingRule,DifferentialStyleProvider
XSSF support for Conditional Formatting rules
-
Method Summary
Modifier and TypeMethodDescriptionCreate a new border formatting structure if it does not exist, otherwise just return existing object.createDataBarFormatting(XSSFColor color) Create a new font formatting structure if it does not exist, otherwise just return existing object.Create a new pattern formatting structure if it does not exist, otherwise just return existing object.byteThe comparison function used when the type of conditional formatting is set toConditionType.CELL_VALUE_ISWill return null ifgetConditionType()!=ConditionType.FILTERType of conditional formatting rule.The formula used to evaluate the first operand for the conditional formatting rule.The formula used to evaluate the second operand of the comparison when comparison type isConditionType.CELL_VALUE_ISand operator is eitherComparisonOperator.BETWEENorComparisonOperator.NOT_BETWEENReturn the number format from the dxf style record if present, null if notintbooleanintConditional format rules don't define stripes, so always 0getText()
-
Method Details
-
getPriority
public int getPriority()- Specified by:
getPriorityin interfaceConditionalFormattingRule
-
getStopIfTrue
public boolean getStopIfTrue()- Specified by:
getStopIfTruein interfaceConditionalFormattingRule
-
createBorderFormatting
Create a new border formatting structure if it does not exist, otherwise just return existing object.- Specified by:
createBorderFormattingin interfaceConditionalFormattingRule- Returns:
- - border formatting object, never returns
null.
-
getBorderFormatting
- Specified by:
getBorderFormattingin interfaceConditionalFormattingRule- Specified by:
getBorderFormattingin interfaceDifferentialStyleProvider- Returns:
- - border formatting object if defined,
nullotherwise
-
createFontFormatting
Create a new font formatting structure if it does not exist, otherwise just return existing object.- Specified by:
createFontFormattingin interfaceConditionalFormattingRule- Returns:
- - font formatting object, never returns
null.
-
getFontFormatting
- Specified by:
getFontFormattingin interfaceConditionalFormattingRule- Specified by:
getFontFormattingin interfaceDifferentialStyleProvider- Returns:
- - font formatting object if defined,
nullotherwise
-
createPatternFormatting
Create a new pattern formatting structure if it does not exist, otherwise just return existing object.- Specified by:
createPatternFormattingin interfaceConditionalFormattingRule- Returns:
- - pattern formatting object, never returns
null.
-
getPatternFormatting
- Specified by:
getPatternFormattingin interfaceConditionalFormattingRule- Specified by:
getPatternFormattingin interfaceDifferentialStyleProvider- Returns:
- - pattern formatting object if defined,
nullotherwise
-
createDataBarFormatting
- Returns:
- data bar formatting
-
getDataBarFormatting
- Specified by:
getDataBarFormattingin interfaceConditionalFormattingRule
-
createMultiStateFormatting
public XSSFIconMultiStateFormatting createMultiStateFormatting(IconMultiStateFormatting.IconSet iconSet) -
getMultiStateFormatting
- Specified by:
getMultiStateFormattingin interfaceConditionalFormattingRule
-
createColorScaleFormatting
-
getColorScaleFormatting
- Specified by:
getColorScaleFormattingin interfaceConditionalFormattingRule
-
getNumberFormat
Return the number format from the dxf style record if present, null if not- Specified by:
getNumberFormatin interfaceConditionalFormattingRule- Specified by:
getNumberFormatin interfaceDifferentialStyleProvider
-
getConditionType
Type of conditional formatting rule.- Specified by:
getConditionTypein interfaceConditionalFormattingRule
-
getConditionFilterType
Will return null ifgetConditionType()!=ConditionType.FILTER- Specified by:
getConditionFilterTypein interfaceConditionalFormattingRule
-
getFilterConfiguration
- Specified by:
getFilterConfigurationin interfaceConditionalFormattingRule
-
getComparisonOperation
public byte getComparisonOperation()The comparison function used when the type of conditional formatting is set toConditionType.CELL_VALUE_ISMUST be a constant from
ComparisonOperator- Specified by:
getComparisonOperationin interfaceConditionalFormattingRule- Returns:
- the conditional format operator
-
getFormula1
The formula used to evaluate the first operand for the conditional formatting rule.If the condition type is
ConditionType.CELL_VALUE_IS, this field is the first operand of the comparison. If type isConditionType.FORMULA, this formula is used to determine if the conditional formatting is applied.If comparison type is
ConditionType.FORMULAthe formula MUST be a Boolean function- Specified by:
getFormula1in interfaceConditionalFormattingRule- Returns:
- the first formula
-
getFormula2
The formula used to evaluate the second operand of the comparison when comparison type isConditionType.CELL_VALUE_ISand operator is eitherComparisonOperator.BETWEENorComparisonOperator.NOT_BETWEEN- Specified by:
getFormula2in interfaceConditionalFormattingRule- Returns:
- the second formula
-
getText
- Specified by:
getTextin interfaceConditionalFormattingRule
-
getStripeSize
public int getStripeSize()Conditional format rules don't define stripes, so always 0- Specified by:
getStripeSizein interfaceDifferentialStyleProvider- See Also:
-