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

public final Class CFRule12Record

extends CFRuleBase
implements FutureRecord
Class Inheritance
All Implemented Interfaces
org.apache.poi.hssf.record.common.FutureRecord
Imports
java.util.Collections, .LinkedHashMap, .Map, java.util.function.Supplier, org.apache.poi.hssf.record.cf.ColorGradientFormatting, .ColorGradientThreshold, .DataBarFormatting, .DataBarThreshold, .IconMultiStateFormatting, .IconMultiStateThreshold, .Threshold, org.apache.poi.hssf.record.common.ExtendedColor, .FtrHeader, .FutureRecord, org.apache.poi.hssf.usermodel.HSSFSheet, org.apache.poi.ss.formula.Formula, org.apache.poi.ss.formula.ptg.Ptg, org.apache.poi.ss.usermodel.ConditionalFormattingThreshold.RangeType, .IconMultiStateFormatting.IconSet, org.apache.poi.ss.util.CellRangeAddress, org.apache.poi.util.IOUtils, .LittleEndianOutput

Conditional Formatting v12 Rule Record (0x087A).

This is for newer-style Excel conditional formattings, from Excel 2007 onwards.

CFRuleRecord is used where the condition type is CONDITION_TYPE_CELL_VALUE_IS or CONDITION_TYPE_FORMULA, this is only used for the other types

Field Summary

Modifier and TypeField and Description
private ColorGradientFormatting
private DataBarFormatting
private byte[]
private int
private byte
private byte[]
private Formula
private FtrHeader
private IconMultiStateFormatting
private int
public static final short
private byte
private byte[]
private int
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
CFRule12Record(byte conditionType, byte comparisonOperation)

private
CFRule12Record(byte conditionType, byte comparisonOperation, Ptg[] formula1, Ptg[] formula2, Ptg[] formulaScale)

public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
public CFRule12Record
public static CFRule12Record

Returns:

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

Creates a new comparison operation rule

public static CFRule12Record

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

public static CFRule12Record

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
,
String
the scale to apply for the comparison
formulaTextScale
)

Creates a new comparison operation rule

public static CFRule12Record

Returns:

a new Data Bar formatting
create
(HSSFSheet
the sheet
sheet
,
ExtendedColor
the data bar color
color
)

Creates a new Data Bar formatting

public static CFRule12Record

Returns:

a new Icon Set / Multi-State formatting
create
(HSSFSheet
the sheet
sheet
,
IconMultiStateFormatting.IconSet
the icon set
iconSet
)

Creates a new Icon Set / Multi-State formatting

public ColorGradientFormatting
public static CFRule12Record

Returns:

a new Color Scale / Color Gradient formatting
createColorScale
(HSSFSheet
the sheet
sheet
)

Creates a new Color Scale / Color Gradient formatting

public DataBarFormatting
public IconMultiStateFormatting
public CellRangeAddress
public ColorGradientFormatting
public DataBarFormatting
protected int
public FtrHeader
public short
public Map<String, Supplier<?>>
public HSSFRecordTypes
public IconMultiStateFormatting
public Ptg[]

Returns:

list of tokens (casts stack to a list and returns it!) this method can return null is we are unable to create Ptgs from existing excel file callers should check for null!
getParsedExpressionScale
()

get the stack of the scale expression as a list

public int
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
public void
public void
setPriority(int priority)

Inherited from org.apache.poi.hssf.record.CFRuleBase:
containsAlignFormattingBlockcontainsBorderFormattingBlockcontainsFontFormattingBlockcontainsPatternFormattingBlockcontainsProtectionFormattingBlockgetBorderFormattinggetComparisonOperationgetConditionTypegetFontFormattinggetFormattingBlockSizegetFormula1getFormula2getFormulaSizegetOptionsgetParsedExpression1getParsedExpression2getPatternFormattingisBottomBorderModifiedisBottomLeftTopRightBorderModifiedisLeftBorderModifiedisPatternBackgroundColorModifiedisPatternColorModifiedisPatternStyleModifiedisRightBorderModifiedisTopBorderModifiedisTopLeftBottomRightBorderModifiedparseFormulareadFormatOptionsserializeFormattingBlocksetAlignFormattingUnchangedsetBorderFormattingsetBottomBorderModifiedsetBottomLeftTopRightBorderModifiedsetComparisonOperationsetConditionTypesetFontFormattingsetFormula1setFormula2setLeftBorderModifiedsetParsedExpression1setParsedExpression2setPatternBackgroundColorModifiedsetPatternColorModifiedsetPatternFormattingsetPatternStyleModifiedsetProtectionFormattingUnchangedsetRightBorderModifiedsetTopBorderModifiedsetTopLeftBottomRightBorderModified

Field Detail

color_gradientback to summary
private ColorGradientFormatting color_gradient
data_barback to summary
private DataBarFormatting data_bar
ext_formatting_databack to summary
private byte[] ext_formatting_data
ext_formatting_lengthback to summary
private int ext_formatting_length
ext_optsback to summary
private byte ext_opts
filter_databack to summary
private byte[] filter_data
formula_scaleback to summary
private Formula formula_scale
futureHeaderback to summary
private FtrHeader futureHeader
multistateback to summary
private IconMultiStateFormatting multistate
priorityback to summary
private int priority
sidback to summary
public static final short sid
template_param_lengthback to summary
private byte template_param_length
template_paramsback to summary
private byte[] template_params
template_typeback to summary
private int template_type

Constructor Detail

CFRule12Recordback to summary
public CFRule12Record(CFRule12Record other)
CFRule12Recordback to summary
private CFRule12Record(byte conditionType, byte comparisonOperation)
CFRule12Recordback to summary
private CFRule12Record(byte conditionType, byte comparisonOperation, Ptg[] formula1, Ptg[] formula2, Ptg[] formulaScale)
CFRule12Recordback to summary
public CFRule12Record(RecordInputStream in)

Method Detail

containsColorGradientBlockback to summary
public boolean containsColorGradientBlock()
containsDataBarBlockback to summary
public boolean containsDataBarBlock()
containsMultiStateBlockback to summary
public boolean containsMultiStateBlock()
copyback to summary
public CFRule12Record copy()

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

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

Returns:CFRule12Record

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

a deep copy of the implementing class / instance

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

Creates a new comparison operation rule

Parameters
sheet:HSSFSheet

the sheet

formulaText:String

the first formula text

Returns:CFRule12Record

a new comparison operation rule

createback to summary
public static CFRule12Record 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:CFRule12Record

a new comparison operation rule

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

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

formulaTextScale:String

the scale to apply for the comparison

Returns:CFRule12Record

a new comparison operation rule

createback to summary
public static CFRule12Record create(HSSFSheet sheet, ExtendedColor color)

Creates a new Data Bar formatting

Parameters
sheet:HSSFSheet

the sheet

color:ExtendedColor

the data bar color

Returns:CFRule12Record

a new Data Bar formatting

createback to summary
public static CFRule12Record create(HSSFSheet sheet, IconMultiStateFormatting.IconSet iconSet)

Creates a new Icon Set / Multi-State formatting

Parameters
sheet:HSSFSheet

the sheet

iconSet:IconMultiStateFormatting.IconSet

the icon set

Returns:CFRule12Record

a new Icon Set / Multi-State formatting

createColorGradientFormattingback to summary
public ColorGradientFormatting createColorGradientFormatting()
createColorScaleback to summary
public static CFRule12Record createColorScale(HSSFSheet sheet)

Creates a new Color Scale / Color Gradient formatting

Parameters
sheet:HSSFSheet

the sheet

Returns:CFRule12Record

a new Color Scale / Color Gradient formatting

createDataBarFormattingback to summary
public DataBarFormatting createDataBarFormatting()
createMultiStateFormattingback to summary
public IconMultiStateFormatting createMultiStateFormatting()
getAssociatedRangeback to summary
public CellRangeAddress getAssociatedRange()

Implements org.apache.poi.hssf.record.common.FutureRecord.getAssociatedRange.

getColorGradientFormattingback to summary
public ColorGradientFormatting getColorGradientFormatting()
getDataBarFormattingback to summary
public DataBarFormatting getDataBarFormatting()
getDataSizeback to summary
protected int getDataSize()

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

getFutureHeaderback to summary
public FtrHeader getFutureHeader()

Implements org.apache.poi.hssf.record.common.FutureRecord.getFutureHeader.

getFutureRecordTypeback to summary
public short getFutureRecordType()

Implements org.apache.poi.hssf.record.common.FutureRecord.getFutureRecordType.

getGenericPropertiesback to summary
public Map<String, Supplier<?>> getGenericProperties()

Overrides org.apache.poi.hssf.record.CFRuleBase.getGenericProperties.

Implements org.apache.poi.common.usermodel.GenericRecord.getGenericProperties.

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
getMultiStateFormattingback to summary
public IconMultiStateFormatting getMultiStateFormatting()
getParsedExpressionScaleback to summary
public Ptg[] getParsedExpressionScale()

get the stack of the scale expression as a list

Returns:Ptg[]

list of tokens (casts stack to a list and returns it!) this method can return null is we are unable to create Ptgs from existing excel file callers should check for null!

getPriorityback to summary
public int getPriority()
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

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

setDefaultsback to summary
private void setDefaults()
setParsedExpressionScaleback to summary
public void setParsedExpressionScale(Ptg[] ptgs)
setPriorityback to summary
public void setPriority(int priority)