Top Description Fields Constructors Methods
org.apache.poi.hssf.record

public final Class CFRuleRecord

extends CFRuleBase
Class Inheritance
Imports
org.apache.poi.hssf.usermodel.HSSFSheet, org.apache.poi.ss.formula.Formula, org.apache.poi.ss.formula.ptg.Ptg, org.apache.poi.util.LittleEndianOutput

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.

Field Summary

Modifier and TypeField and Description
public static final short
Inherited from org.apache.poi.hssf.record.CFRuleBase:
_borderFormatting_fontFormatting_patternFormattingalignalignHoralignIndentalignJustLastalignRotalignShrinalignTextDiralignVeralignWrapbordbordBlTrbordBotbordLeftbordRightbordTlBrbordTopCONDITION_TYPE_CELL_VALUE_ISCONDITION_TYPE_COLOR_SCALECONDITION_TYPE_DATA_BARCONDITION_TYPE_FILTERCONDITION_TYPE_FORMULACONDITION_TYPE_ICON_SETfmtBlockBitsfontformatting_not_usedformatting_optionsLOGmergeCellmodificationBitsnotUsed2pattpattBgColpattColpattStyleprotprotHiddenprotLockedTEMPLATE_ABOVE_AVERAGETEMPLATE_ABOVE_OR_EQUAL_TO_AVERAGETEMPLATE_BELOW_AVERAGETEMPLATE_BELOW_OR_EQUAL_TO_AVERAGETEMPLATE_CELL_VALUETEMPLATE_COLOR_SCALE_FORMATTINGTEMPLATE_CONTAINS_BLANKSTEMPLATE_CONTAINS_ERRORSTEMPLATE_CONTAINS_NO_BLANKSTEMPLATE_CONTAINS_NO_ERRORSTEMPLATE_CONTAINS_TEXTTEMPLATE_DATA_BAR_FORMATTINGTEMPLATE_DUPLICATE_VALUESTEMPLATE_FILTERTEMPLATE_FORMULATEMPLATE_ICON_SET_FORMATTINGTEMPLATE_LAST_7_DAYSTEMPLATE_LAST_MONTHTEMPLATE_LAST_WEEKTEMPLATE_NEXT_MONTHTEMPLATE_NEXT_WEEKTEMPLATE_THIS_MONTHTEMPLATE_THIS_WEEKTEMPLATE_TODAYTEMPLATE_TOMORROWTEMPLATE_UNIQUE_VALUESTEMPLATE_YESTERDAYundocumented

Constructor Summary

AccessConstructor and Description
public
private
CFRuleRecord(byte conditionType, byte comparisonOperation, Ptg[] formula1, Ptg[] formula2)

public

Method Summary

Modifier and TypeMethod and Description
public CFRuleRecord
public static CFRuleRecord

Returns:

a new comparison operation rule
create
(HSSFSheet
the sheet
sheet
,
String
the formula text
formulaText
)

Creates a new comparison operation rule

public static CFRuleRecord

Returns:

a new comparison operation rule
create
(HSSFSheet
the sheet
sheet
,
byte
the comparison operation
comparisonOperation
,
String
the first formula text
formulaText1
,
String
the second formula text
formulaText2
)

Creates a new comparison operation rule

protected int
public HSSFRecordTypes
public short
getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

public void
serialize(LittleEndianOutput
the stream to write to
out
)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

called by the class that is responsible for writing this sucker.

private void
Inherited from org.apache.poi.hssf.record.CFRuleBase:
containsAlignFormattingBlockcontainsBorderFormattingBlockcontainsFontFormattingBlockcontainsPatternFormattingBlockcontainsProtectionFormattingBlockgetBorderFormattinggetComparisonOperationgetConditionTypegetFontFormattinggetFormattingBlockSizegetFormula1getFormula2getFormulaSizegetGenericPropertiesgetOptionsgetParsedExpression1getParsedExpression2getPatternFormattingisBottomBorderModifiedisBottomLeftTopRightBorderModifiedisLeftBorderModifiedisPatternBackgroundColorModifiedisPatternColorModifiedisPatternStyleModifiedisRightBorderModifiedisTopBorderModifiedisTopLeftBottomRightBorderModifiedparseFormulareadFormatOptionsserializeFormattingBlocksetAlignFormattingUnchangedsetBorderFormattingsetBottomBorderModifiedsetBottomLeftTopRightBorderModifiedsetComparisonOperationsetConditionTypesetFontFormattingsetFormula1setFormula2setLeftBorderModifiedsetParsedExpression1setParsedExpression2setPatternBackgroundColorModifiedsetPatternColorModifiedsetPatternFormattingsetPatternStyleModifiedsetProtectionFormattingUnchangedsetRightBorderModifiedsetTopBorderModifiedsetTopLeftBottomRightBorderModified

Field Detail

sidback to summary
public static final short sid

Constructor Detail

CFRuleRecordback to summary
public CFRuleRecord(CFRuleRecord other)
CFRuleRecordback to summary
private CFRuleRecord(byte conditionType, byte comparisonOperation, Ptg[] formula1, Ptg[] formula2)
CFRuleRecordback to summary
public CFRuleRecord(RecordInputStream in)

Method Detail

copyback to summary
public CFRuleRecord copy()

Implements abstract org.apache.poi.hssf.record.CFRuleBase.copy.

Implements org.apache.poi.common.Duplicatable.copy.

Returns:CFRuleRecord

Doc from org.apache.poi.common.Duplicatable.copy.

a deep copy of the implementing class / instance

Annotations
@Override
createback to summary
public static CFRuleRecord create(HSSFSheet sheet, String formulaText)

Creates a new comparison operation rule

Parameters
sheet:HSSFSheet

the sheet

formulaText:String

the formula text

Returns:CFRuleRecord

a new comparison operation rule

createback to summary
public static CFRuleRecord create(HSSFSheet sheet, byte comparisonOperation, String formulaText1, String formulaText2)

Creates a new comparison operation rule

Parameters
sheet:HSSFSheet

the sheet

comparisonOperation:byte

the comparison operation

formulaText1:String

the first formula text

formulaText2:String

the second formula text

Returns:CFRuleRecord

a new comparison operation rule

getDataSizeback to summary
protected int getDataSize()

Implements abstract org.apache.poi.hssf.record.StandardRecord.getDataSize.

Annotations
@Override
getGenericRecordTypeback to summary
public HSSFRecordTypes getGenericRecordType()

Overrides default org.apache.poi.common.usermodel.GenericRecord.getGenericRecordType.

Implements abstract org.apache.poi.hssf.record.Record.getGenericRecordType.

Annotations
@Override
getSidback to summary
public short getSid()

Implements abstract org.apache.poi.hssf.record.Record.getSid.

Doc from org.apache.poi.hssf.record.Record.getSid.

return the non static version of the id for this record.

Returns:short

he id for this record

Annotations
@Override
serializeback to summary
public void serialize(LittleEndianOutput out)

Implements abstract org.apache.poi.hssf.record.StandardRecord.serialize.

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:LittleEndianOutput

the stream to write to

Annotations
@Override
setDefaultsback to summary
private void setDefaults()