Package org.apache.poi.hssf.record
Class CFRuleRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.CFRuleBase
-
- org.apache.poi.hssf.record.CFRuleRecord
-
- All Implemented Interfaces:
org.apache.poi.common.Duplicatable
,GenericRecord
public final class CFRuleRecord extends CFRuleBase
Conditional Formatting Rule Record (0x01B1).This is for the older-style Excel conditional formattings, new-style (Excel 2007+) also make use of
CFRule12Record
for their rules.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.poi.hssf.record.CFRuleBase
CFRuleBase.ComparisonOperator
-
-
Field Summary
Fields Modifier and Type Field Description static short
sid
-
Fields inherited from class org.apache.poi.hssf.record.CFRuleBase
CONDITION_TYPE_CELL_VALUE_IS, CONDITION_TYPE_COLOR_SCALE, CONDITION_TYPE_DATA_BAR, CONDITION_TYPE_FILTER, CONDITION_TYPE_FORMULA, CONDITION_TYPE_ICON_SET, TEMPLATE_ABOVE_AVERAGE, TEMPLATE_ABOVE_OR_EQUAL_TO_AVERAGE, TEMPLATE_BELOW_AVERAGE, TEMPLATE_BELOW_OR_EQUAL_TO_AVERAGE, TEMPLATE_CELL_VALUE, TEMPLATE_COLOR_SCALE_FORMATTING, TEMPLATE_CONTAINS_BLANKS, TEMPLATE_CONTAINS_ERRORS, TEMPLATE_CONTAINS_NO_BLANKS, TEMPLATE_CONTAINS_NO_ERRORS, TEMPLATE_CONTAINS_TEXT, TEMPLATE_DATA_BAR_FORMATTING, TEMPLATE_DUPLICATE_VALUES, TEMPLATE_FILTER, TEMPLATE_FORMULA, TEMPLATE_ICON_SET_FORMATTING, TEMPLATE_LAST_7_DAYS, TEMPLATE_LAST_MONTH, TEMPLATE_LAST_WEEK, TEMPLATE_NEXT_MONTH, TEMPLATE_NEXT_WEEK, TEMPLATE_THIS_MONTH, TEMPLATE_THIS_WEEK, TEMPLATE_TODAY, TEMPLATE_TOMORROW, TEMPLATE_UNIQUE_VALUES, TEMPLATE_YESTERDAY
-
-
Constructor Summary
Constructors Constructor Description CFRuleRecord(CFRuleRecord other)
CFRuleRecord(RecordInputStream in)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CFRuleRecord
copy()
static CFRuleRecord
create(HSSFSheet sheet, byte comparisonOperation, java.lang.String formulaText1, java.lang.String formulaText2)
Creates a new comparison operation rulestatic CFRuleRecord
create(HSSFSheet sheet, java.lang.String formulaText)
Creates a new comparison operation ruleHSSFRecordTypes
getGenericRecordType()
short
getSid()
return the non static version of the id for this record.void
serialize(LittleEndianOutput out)
called by the class that is responsible for writing this sucker.-
Methods inherited from class org.apache.poi.hssf.record.CFRuleBase
containsAlignFormattingBlock, containsBorderFormattingBlock, containsFontFormattingBlock, containsPatternFormattingBlock, containsProtectionFormattingBlock, getBorderFormatting, getComparisonOperation, getConditionType, getFontFormatting, getGenericProperties, getOptions, getParsedExpression1, getParsedExpression2, getPatternFormatting, isBottomBorderModified, isBottomLeftTopRightBorderModified, isLeftBorderModified, isPatternBackgroundColorModified, isPatternColorModified, isPatternStyleModified, isRightBorderModified, isTopBorderModified, isTopLeftBottomRightBorderModified, parseFormula, setAlignFormattingUnchanged, setBorderFormatting, setBottomBorderModified, setBottomLeftTopRightBorderModified, setComparisonOperation, setFontFormatting, setLeftBorderModified, setParsedExpression1, setParsedExpression2, setPatternBackgroundColorModified, setPatternColorModified, setPatternFormatting, setPatternStyleModified, setProtectionFormattingUnchanged, setRightBorderModified, setTopBorderModified, setTopLeftBottomRightBorderModified
-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CFRuleRecord
public CFRuleRecord(CFRuleRecord other)
-
CFRuleRecord
public CFRuleRecord(RecordInputStream in)
-
-
Method Detail
-
create
public static CFRuleRecord create(HSSFSheet sheet, java.lang.String formulaText)
Creates a new comparison operation rule- Parameters:
sheet
- the sheetformulaText
- the formula text- Returns:
- a new comparison operation rule
-
create
public static CFRuleRecord create(HSSFSheet sheet, byte comparisonOperation, java.lang.String formulaText1, java.lang.String formulaText2)
Creates a new comparison operation rule- Parameters:
sheet
- the sheetcomparisonOperation
- the comparison operationformulaText1
- the first formula textformulaText2
- the second formula text- Returns:
- a new comparison operation rule
-
getSid
public short getSid()
Description copied from class:Record
return the non static version of the id for this record.
-
serialize
public void serialize(LittleEndianOutput out)
called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.- Parameters:
out
- the stream to write to
-
copy
public CFRuleRecord copy()
- Specified by:
copy
in interfaceorg.apache.poi.common.Duplicatable
- Specified by:
copy
in classCFRuleBase
-
getGenericRecordType
public HSSFRecordTypes getGenericRecordType()
- Specified by:
getGenericRecordType
in interfaceGenericRecord
- Specified by:
getGenericRecordType
in classRecord
-
-