public final class HSSFConditionalFormattingRule extends java.lang.Object implements ConditionalFormattingRule
Modifier and Type | Method and Description |
---|---|
HSSFBorderFormatting |
createBorderFormatting()
create a new border formatting structure if it does not exist,
otherwise just return existing object.
|
HSSFColorScaleFormatting |
createColorScaleFormatting()
create a new color scale / gradient formatting object if it does not exist,
otherwise just return the existing object.
|
HSSFDataBarFormatting |
createDataBarFormatting()
create a new databar / data-bar formatting object if it does not exist,
otherwise just return the existing object.
|
HSSFFontFormatting |
createFontFormatting()
create a new font formatting structure if it does not exist,
otherwise just return existing object.
|
HSSFIconMultiStateFormatting |
createMultiStateFormatting()
create a new icon / multi-state formatting object if it does not exist,
otherwise just return the existing object.
|
HSSFPatternFormatting |
createPatternFormatting()
create a new pattern formatting structure if it does not exist,
otherwise just return existing object.
|
HSSFBorderFormatting |
getBorderFormatting() |
HSSFColorScaleFormatting |
getColorScaleFormatting() |
byte |
getComparisonOperation()
The comparison function used when the type of conditional formatting is set to
ConditionType.CELL_VALUE_IS |
ConditionFilterType |
getConditionFilterType()
always null (not a filter condition) or
ConditionFilterType.FILTER if it is. |
ConditionType |
getConditionType()
Type of conditional formatting rule.
|
HSSFDataBarFormatting |
getDataBarFormatting() |
ConditionFilterData |
getFilterConfiguration()
This is null if
|
HSSFFontFormatting |
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 |
HSSFIconMultiStateFormatting |
getMultiStateFormatting() |
ExcelNumberFormat |
getNumberFormat()
Always null for HSSF records, until someone figures out where to find it
|
HSSFPatternFormatting |
getPatternFormatting() |
int |
getPriority()
Only newer style formatting rules have priorities.
|
boolean |
getStopIfTrue()
Always true for HSSF files, per Microsoft Excel documentation
|
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.
|
protected java.lang.String |
toFormulaString(Ptg[] parsedExpression) |
protected static java.lang.String |
toFormulaString(Ptg[] parsedExpression,
HSSFWorkbook workbook) |
public int getPriority()
getPriority
in interface ConditionalFormattingRule
ConditionalFormattingRule.getPriority()
public boolean getStopIfTrue()
getStopIfTrue
in interface ConditionalFormattingRule
ConditionalFormattingRule.getStopIfTrue()
public ExcelNumberFormat getNumberFormat()
getNumberFormat
in interface ConditionalFormattingRule
getNumberFormat
in interface DifferentialStyleProvider
ConditionalFormattingRule.getNumberFormat()
public HSSFFontFormatting getFontFormatting()
getFontFormatting
in interface ConditionalFormattingRule
getFontFormatting
in interface DifferentialStyleProvider
null
otherwisepublic HSSFFontFormatting createFontFormatting()
createFontFormatting
in interface ConditionalFormattingRule
null
.public HSSFBorderFormatting getBorderFormatting()
getBorderFormatting
in interface ConditionalFormattingRule
getBorderFormatting
in interface DifferentialStyleProvider
null
otherwisepublic HSSFBorderFormatting createBorderFormatting()
createBorderFormatting
in interface ConditionalFormattingRule
null
.public HSSFPatternFormatting getPatternFormatting()
getPatternFormatting
in interface ConditionalFormattingRule
getPatternFormatting
in interface DifferentialStyleProvider
null
otherwisepublic HSSFPatternFormatting createPatternFormatting()
createPatternFormatting
in interface ConditionalFormattingRule
null
.public HSSFDataBarFormatting getDataBarFormatting()
getDataBarFormatting
in interface ConditionalFormattingRule
null
otherwisepublic HSSFDataBarFormatting createDataBarFormatting()
public HSSFIconMultiStateFormatting getMultiStateFormatting()
getMultiStateFormatting
in interface ConditionalFormattingRule
null
otherwisepublic HSSFIconMultiStateFormatting createMultiStateFormatting()
public HSSFColorScaleFormatting getColorScaleFormatting()
getColorScaleFormatting
in interface ConditionalFormattingRule
null
otherwisepublic HSSFColorScaleFormatting createColorScaleFormatting()
public ConditionType getConditionType()
ConditionalFormattingRule
getConditionType
in interface ConditionalFormattingRule
public ConditionFilterType getConditionFilterType()
ConditionFilterType.FILTER
if it is.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()
ConditionalFormattingRule
ConditionType.CELL_VALUE_IS
MUST be a constant from ComparisonOperator
getComparisonOperation
in interface ConditionalFormattingRule
public java.lang.String getFormula1()
ConditionalFormattingRule
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()
ConditionalFormattingRule
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
protected java.lang.String toFormulaString(Ptg[] parsedExpression)
protected static java.lang.String toFormulaString(Ptg[] parsedExpression, HSSFWorkbook workbook)
public int getStripeSize()
getStripeSize
in interface DifferentialStyleProvider
DifferentialStyleProvider.getStripeSize()
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.