public class ConditionalFormattingRuleImpl extends Object implements SConditionalFormattingRule, Serializable
SConditionalFormattingRule.RuleOperator, SConditionalFormattingRule.RuleTimePeriod, SConditionalFormattingRule.RuleType
Constructor and Description |
---|
ConditionalFormattingRuleImpl(SConditionalFormatting cfi) |
Modifier and Type | Method and Description |
---|---|
void |
addDependency(FormulaExpression fexpr) |
void |
clearFormulaResultCache() |
void |
copyFrom(SConditionalFormattingRule src,
int rowOff,
int colOff)
Copy state from the src rule with an row/column offset.
|
void |
destroy()
destroy this rule.
|
SColorScale |
getColorScale()
Returns the color scale (used with "colorScale" type)
|
SFill |
getColorScaleFill(Double value0) |
SDataBar |
getDataBar()
Returns the data bar (used with "dataBar" type)
|
double |
getDataBarPercent(Double value) |
String |
getEscapedFormula1() |
String |
getEscapedFormula2() |
String |
getEscapedFormula3() |
SExtraStyle |
getExtraStyle()
Returns the applied color if match
|
SConditionalFormatting |
getFormatting() |
String |
getFormula1()
Returns the associated formulas (used with "cellIs" type)
|
String |
getFormula2()
Returns the associated formulas (used with "cellIs" type)
|
String |
getFormula3()
Returns the associated formulas (used with "cellIs" type)
|
FormulaExpression |
getFormulaExpression1() |
FormulaExpression |
getFormulaExpression2() |
FormulaExpression |
getFormulaExpression3() |
List<String> |
getFormulas()
Returns the associated formulas (used with "cellIs" type)
|
SIconSet |
getIconSet()
Returns the icon set (used with "iconSet" type)
|
int |
getIconSetId(Double value) |
SConditionalFormattingRule.RuleOperator |
getOperator()
Returns the comparison operator if needed
|
Integer |
getPriority()
Returns the applying priority if covered region overlapped
|
Long |
getRank()
Returns the rank used with "top10" type; rank is the 10 in top10, 6 in top6...
|
Ref |
getRef(String sheetName) |
Collection<CellRegion> |
getRegions()
Get applied regions.
|
RuleInfo |
getRuleInfo1() |
RuleInfo |
getRuleInfo2() |
SSheet |
getSheet() |
Integer |
getStandardDeviation()
Returns 1st/2nd/3rd standard deviation average (used with "aboveAverage" type; aka.
|
String |
getText()
Returns the text for comparison (used with "containsText" type).
|
SConditionalFormattingRule.RuleTimePeriod |
getTimePeriod()
Returns the timePeriod operator (used with "timePeriod" type)
|
SConditionalFormattingRule.RuleType |
getType()
Returns type of this rule
|
boolean |
isAboveAverage()
Returns whether above average (used with "aboveAverage" type).
|
boolean |
isBottom()
Returns whether bottom value (used with "top10" type).
|
boolean |
isEqualAverage()
Returns whether equal average (used with "aboveAverage" type).
|
boolean |
isFormulaParsingError()
Whether the formula parsed error
|
boolean |
isPercent()
Returns whether a percentage (used with "top10" type)
|
boolean |
isStopIfTrue()
Returns whether stop if true
|
boolean |
match(SCell cell) |
FormulaExpression |
parseFormula(String formula) |
void |
setAboveAverage(boolean b) |
void |
setBottom(boolean b) |
void |
setColorScale(SColorScale colorScale) |
void |
setDataBar(SDataBar dataBar) |
void |
setEqualAverage(boolean b) |
void |
setEscapedFormulas(String formula1,
String formula2,
String formula3) |
void |
setExtraStyle(SExtraStyle style) |
void |
setFormula1(FormulaExpression formula1) |
void |
setFormula1(String formula1) |
void |
setFormula2(FormulaExpression formula2) |
void |
setFormula2(String formula2) |
void |
setFormula3(FormulaExpression formula3) |
void |
setFormula3(String formula3) |
void |
setFormulas(FormulaExpression fe1,
FormulaExpression fe2,
FormulaExpression fe3) |
void |
setFormulas(String formula1,
String formula2,
String formula3) |
void |
setIconSet(SIconSet iconSet) |
void |
setOperator(SConditionalFormattingRule.RuleOperator operator) |
void |
setPercent(boolean b) |
void |
setPriority(int priority) |
void |
setRank(long rank) |
void |
setStandardDeviation(int s) |
void |
setStopIfTrue(boolean b) |
void |
setText(String text) |
void |
setTimePeriod(SConditionalFormattingRule.RuleTimePeriod timePeriod) |
void |
setType(SConditionalFormattingRule.RuleType type) |
void |
shiftFormulas(int rowOff,
int colOff) |
public ConditionalFormattingRuleImpl(SConditionalFormatting cfi)
public SConditionalFormatting getFormatting()
getFormatting
in interface SConditionalFormattingRule
public SSheet getSheet()
getSheet
in interface SConditionalFormattingRule
public void clearFormulaResultCache()
clearFormulaResultCache
in interface SConditionalFormattingRule
public SConditionalFormattingRule.RuleType getType()
SConditionalFormattingRule
getType
in interface SConditionalFormattingRule
public void setType(SConditionalFormattingRule.RuleType type)
public SConditionalFormattingRule.RuleOperator getOperator()
SConditionalFormattingRule
getOperator
in interface SConditionalFormattingRule
public void setOperator(SConditionalFormattingRule.RuleOperator operator)
public Integer getPriority()
SConditionalFormattingRule
getPriority
in interface SConditionalFormattingRule
public void setPriority(int priority)
public SExtraStyle getExtraStyle()
SConditionalFormattingRule
getExtraStyle
in interface SConditionalFormattingRule
public void setExtraStyle(SExtraStyle style)
public boolean isStopIfTrue()
SConditionalFormattingRule
isStopIfTrue
in interface SConditionalFormattingRule
public void setStopIfTrue(boolean b)
public List<String> getFormulas()
SConditionalFormattingRule
getFormulas
in interface SConditionalFormattingRule
public SConditionalFormattingRule.RuleTimePeriod getTimePeriod()
SConditionalFormattingRule
getTimePeriod
in interface SConditionalFormattingRule
public void setTimePeriod(SConditionalFormattingRule.RuleTimePeriod timePeriod)
public Long getRank()
SConditionalFormattingRule
getRank
in interface SConditionalFormattingRule
public void setRank(long rank)
public boolean isPercent()
SConditionalFormattingRule
isPercent
in interface SConditionalFormattingRule
public void setPercent(boolean b)
public boolean isBottom()
SConditionalFormattingRule
isBottom
in interface SConditionalFormattingRule
public void setBottom(boolean b)
public SColorScale getColorScale()
SConditionalFormattingRule
getColorScale
in interface SConditionalFormattingRule
public void setColorScale(SColorScale colorScale)
public SDataBar getDataBar()
SConditionalFormattingRule
getDataBar
in interface SConditionalFormattingRule
public void setDataBar(SDataBar dataBar)
public SIconSet getIconSet()
SConditionalFormattingRule
getIconSet
in interface SConditionalFormattingRule
public void setIconSet(SIconSet iconSet)
public String getText()
SConditionalFormattingRule
#getFormula
will return the formula for doing the search operation.getText
in interface SConditionalFormattingRule
public void setText(String text)
public boolean isAboveAverage()
SConditionalFormattingRule
isAboveAverage
in interface SConditionalFormattingRule
public void setAboveAverage(boolean b)
public boolean isEqualAverage()
SConditionalFormattingRule
isEqualAverage
in interface SConditionalFormattingRule
public void setEqualAverage(boolean b)
public Integer getStandardDeviation()
SConditionalFormattingRule
getStandardDeviation
in interface SConditionalFormattingRule
public void setStandardDeviation(int s)
public boolean match(SCell cell)
public void destroy()
SConditionalFormattingRule
destroy
in interface SConditionalFormattingRule
public Collection<CellRegion> getRegions()
SConditionalFormattingRule
getRegions
in interface SConditionalFormattingRule
public boolean isFormulaParsingError()
SConditionalFormattingRule
isFormulaParsingError
in interface SConditionalFormattingRule
public String getFormula1()
SConditionalFormattingRule
getFormula1
in interface SConditionalFormattingRule
public String getFormula2()
SConditionalFormattingRule
getFormula2
in interface SConditionalFormattingRule
public String getFormula3()
SConditionalFormattingRule
getFormula3
in interface SConditionalFormattingRule
public void setFormula1(String formula1)
setFormula1
in interface SConditionalFormattingRule
public void setFormula2(String formula2)
setFormula2
in interface SConditionalFormattingRule
public void setFormula3(String formula3)
setFormula3
in interface SConditionalFormattingRule
public FormulaExpression parseFormula(String formula)
public void setFormulas(String formula1, String formula2, String formula3)
setFormulas
in interface SConditionalFormattingRule
public void setEscapedFormulas(String formula1, String formula2, String formula3)
setEscapedFormulas
in interface SConditionalFormattingRule
public void copyFrom(SConditionalFormattingRule src, int rowOff, int colOff)
SConditionalFormattingRule
copyFrom
in interface SConditionalFormattingRule
public void setFormulas(FormulaExpression fe1, FormulaExpression fe2, FormulaExpression fe3)
fe1
- fe2
- public FormulaExpression getFormulaExpression1()
public FormulaExpression getFormulaExpression2()
public FormulaExpression getFormulaExpression3()
public void setFormula1(FormulaExpression formula1)
formula
- public void setFormula2(FormulaExpression formula2)
formula
- public void setFormula3(FormulaExpression formula3)
formula
- public String getEscapedFormula1()
getEscapedFormula1
in interface SConditionalFormattingRule
public String getEscapedFormula2()
getEscapedFormula2
in interface SConditionalFormattingRule
public String getEscapedFormula3()
getEscapedFormula3
in interface SConditionalFormattingRule
public double getDataBarPercent(Double value)
public int getIconSetId(Double value)
public void shiftFormulas(int rowOff, int colOff)
shiftFormulas
in interface SConditionalFormattingRule
public void addDependency(FormulaExpression fexpr)
public RuleInfo getRuleInfo1()
public RuleInfo getRuleInfo2()
Copyright © 2020. All rights reserved.