public abstract class CFRuleBase extends StandardRecord
This is for the older-style Excel conditional formattings,
new-style (Excel 2007+) also make use of CFRule12Record
for their rules.
Modifier and Type | Class and Description |
---|---|
static interface |
CFRuleBase.ComparisonOperator |
Modifier | Constructor and Description |
---|---|
protected |
CFRuleBase() |
protected |
CFRuleBase(byte conditionType,
byte comparisonOperation)
Creates new CFRuleRecord
|
protected |
CFRuleBase(byte conditionType,
byte comparisonOperation,
Ptg[] formula1,
Ptg[] formula2) |
protected |
CFRuleBase(CFRuleBase other) |
getDataSize, getRecordSize, serialize, serialize
cloneViaReserialise, getGenericRecordType, getSid, serialize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGenericChildren
public static final byte CONDITION_TYPE_CELL_VALUE_IS
public static final byte CONDITION_TYPE_FORMULA
public static final byte CONDITION_TYPE_COLOR_SCALE
public static final byte CONDITION_TYPE_DATA_BAR
public static final byte CONDITION_TYPE_FILTER
public static final byte CONDITION_TYPE_ICON_SET
public static final int TEMPLATE_CELL_VALUE
public static final int TEMPLATE_FORMULA
public static final int TEMPLATE_COLOR_SCALE_FORMATTING
public static final int TEMPLATE_DATA_BAR_FORMATTING
public static final int TEMPLATE_ICON_SET_FORMATTING
public static final int TEMPLATE_FILTER
public static final int TEMPLATE_UNIQUE_VALUES
public static final int TEMPLATE_CONTAINS_TEXT
public static final int TEMPLATE_CONTAINS_BLANKS
public static final int TEMPLATE_CONTAINS_NO_BLANKS
public static final int TEMPLATE_CONTAINS_ERRORS
public static final int TEMPLATE_CONTAINS_NO_ERRORS
public static final int TEMPLATE_TODAY
public static final int TEMPLATE_TOMORROW
public static final int TEMPLATE_YESTERDAY
public static final int TEMPLATE_LAST_7_DAYS
public static final int TEMPLATE_LAST_MONTH
public static final int TEMPLATE_NEXT_MONTH
public static final int TEMPLATE_THIS_WEEK
public static final int TEMPLATE_NEXT_WEEK
public static final int TEMPLATE_LAST_WEEK
public static final int TEMPLATE_THIS_MONTH
public static final int TEMPLATE_ABOVE_AVERAGE
public static final int TEMPLATE_BELOW_AVERAGE
public static final int TEMPLATE_DUPLICATE_VALUES
public static final int TEMPLATE_ABOVE_OR_EQUAL_TO_AVERAGE
public static final int TEMPLATE_BELOW_OR_EQUAL_TO_AVERAGE
protected static final org.apache.logging.log4j.Logger LOG
protected int formatting_options
protected short formatting_not_used
protected FontFormatting _fontFormatting
protected BorderFormatting _borderFormatting
protected PatternFormatting _patternFormatting
protected CFRuleBase(byte conditionType, byte comparisonOperation)
conditionType
- the condition typecomparisonOperation
- the comparison operationprotected CFRuleBase(byte conditionType, byte comparisonOperation, Ptg[] formula1, Ptg[] formula2)
protected CFRuleBase()
protected CFRuleBase(CFRuleBase other)
protected int readFormatOptions(RecordInputStream in)
public byte getConditionType()
protected void setConditionType(byte condition_type)
public void setComparisonOperation(byte operation)
public byte getComparisonOperation()
public boolean containsFontFormattingBlock()
public void setFontFormatting(FontFormatting fontFormatting)
public FontFormatting getFontFormatting()
public boolean containsAlignFormattingBlock()
public void setAlignFormattingUnchanged()
public boolean containsBorderFormattingBlock()
public void setBorderFormatting(BorderFormatting borderFormatting)
public BorderFormatting getBorderFormatting()
public boolean containsPatternFormattingBlock()
public void setPatternFormatting(PatternFormatting patternFormatting)
public PatternFormatting getPatternFormatting()
public boolean containsProtectionFormattingBlock()
public void setProtectionFormattingUnchanged()
public int getOptions()
public boolean isLeftBorderModified()
public void setLeftBorderModified(boolean modified)
public boolean isRightBorderModified()
public void setRightBorderModified(boolean modified)
public boolean isTopBorderModified()
public void setTopBorderModified(boolean modified)
public boolean isBottomBorderModified()
public void setBottomBorderModified(boolean modified)
public boolean isTopLeftBottomRightBorderModified()
public void setTopLeftBottomRightBorderModified(boolean modified)
public boolean isBottomLeftTopRightBorderModified()
public void setBottomLeftTopRightBorderModified(boolean modified)
public boolean isPatternStyleModified()
public void setPatternStyleModified(boolean modified)
public boolean isPatternColorModified()
public void setPatternColorModified(boolean modified)
public boolean isPatternBackgroundColorModified()
public void setPatternBackgroundColorModified(boolean modified)
protected int getFormattingBlockSize()
protected void serializeFormattingBlock(LittleEndianOutput out)
public Ptg[] getParsedExpression1()
public void setParsedExpression1(Ptg[] ptgs)
protected Formula getFormula1()
protected void setFormula1(Formula formula1)
public Ptg[] getParsedExpression2()
Ptg
s, possibly null
public void setParsedExpression2(Ptg[] ptgs)
protected Formula getFormula2()
protected void setFormula2(Formula formula2)
protected static int getFormulaSize(Formula formula)
formula
- must not be null
public static Ptg[] parseFormula(java.lang.String formula, HSSFSheet sheet)
formula
- The formula to parse, excluding the leading equals sign.sheet
- The sheet that the formula is on.null
if formula
was null.public abstract CFRuleBase copy()
copy
in interface Duplicatable
copy
in class StandardRecord
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
Copyright 2022 The Apache Software Foundation or its licensors, as applicable.