public final class CFRecordsAggregate extends RecordAggregate
CFRecordsAggregate - aggregates Conditional Formatting records CFHeaderRecord and number of up CFRuleRecord records together to simplify access to them.
Note that Excel versions before 2007 can only cope with a maximum of 3 Conditional Formatting rules per sheet. Excel 2007 or newer can cope with unlimited numbers, as can Apache OpenOffice. This is an Excel limitation, not a file format one.
RecordAggregate.PositionTrackingVisitor, RecordAggregate.RecordVisitor
Constructor and Description |
---|
CFRecordsAggregate(CellRangeAddress[] regions,
CFRuleBase[] rules) |
CFRecordsAggregate(CFRecordsAggregate other) |
Modifier and Type | Method and Description |
---|---|
void |
addRule(CFRuleBase r) |
CFRecordsAggregate |
cloneCFAggregate()
Create a deep clone of the record
|
static CFRecordsAggregate |
createCFAggregate(RecordStream rs)
Create CFRecordsAggregate from a list of CF Records
|
CFHeaderBase |
getHeader() |
int |
getNumberOfRules() |
CFRuleBase |
getRule(int idx) |
void |
setRule(int idx,
CFRuleBase r) |
java.lang.String |
toString()
String representation of CFRecordsAggregate
|
boolean |
updateFormulasAfterCellShift(FormulaShifter shifter,
int currentExternSheetIx) |
void |
visitContainedRecords(RecordAggregate.RecordVisitor rv)
Visit each of the atomic BIFF records contained in this
RecordAggregate in the order
that they should be written to file. |
getRecordSize, serialize
public CFRecordsAggregate(CFRecordsAggregate other)
public CFRecordsAggregate(CellRangeAddress[] regions, CFRuleBase[] rules)
public static CFRecordsAggregate createCFAggregate(RecordStream rs)
rs
- - the stream to read frompublic CFRecordsAggregate cloneCFAggregate()
public CFHeaderBase getHeader()
null
.public CFRuleBase getRule(int idx)
public void setRule(int idx, CFRuleBase r)
public void addRule(CFRuleBase r)
public int getNumberOfRules()
public java.lang.String toString()
toString
in class java.lang.Object
public void visitContainedRecords(RecordAggregate.RecordVisitor rv)
RecordAggregate
RecordAggregate
in the order
that they should be written to file. Implementors may or may not return the actual
Record
s being used to manage POI's internal implementation. Callers should not
assume either way, and therefore only attempt to modify those Record
s after cloningvisitContainedRecords
in class RecordAggregate
rv
- The visitor to use for callbacks while walking this objectpublic boolean updateFormulasAfterCellShift(FormulaShifter shifter, int currentExternSheetIx)
shifter
- The FormulaShifter
to usecurrentExternSheetIx
- The index for extern sheetsfalse
if this whole CFHeaderRecord
/ CFRuleRecord
s should be deletedCopyright 2020 The Apache Software Foundation or its licensors, as applicable.