Class CFRecordsAggregate
java.lang.Object
org.apache.poi.hssf.record.RecordBase
org.apache.poi.hssf.record.aggregates.RecordAggregate
org.apache.poi.hssf.record.aggregates.CFRecordsAggregate
- All Implemented Interfaces:
GenericRecord
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate
RecordAggregate.PositionTrackingVisitor, RecordAggregate.RecordVisitor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCreate a deep clone of the recordstatic CFRecordsAggregateCreate CFRecordsAggregate from a list of CF RecordsintgetRule(int idx) voidsetRule(int idx, CFRuleBase r) toString()String representation of CFRecordsAggregatebooleanupdateFormulasAfterCellShift(FormulaShifter shifter, int currentExternSheetIx) voidVisit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file.Methods inherited from class org.apache.poi.hssf.record.aggregates.RecordAggregate
getRecordSize, serializeMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren, getGenericRecordType
-
Constructor Details
-
CFRecordsAggregate
-
CFRecordsAggregate
-
-
Method Details
-
createCFAggregate
Create CFRecordsAggregate from a list of CF Records- Parameters:
rs- - the stream to read from- Returns:
- CFRecordsAggregate object
-
cloneCFAggregate
Create a deep clone of the record- Returns:
- A new object with the same values as this record
-
getHeader
- Returns:
- the header. Never
null.
-
getRule
-
setRule
-
addRule
-
getNumberOfRules
public int getNumberOfRules() -
getGenericProperties
- Specified by:
getGenericPropertiesin interfaceGenericRecord
-
toString
String representation of CFRecordsAggregate -
visitContainedRecords
Description copied from class:RecordAggregateVisit each of the atomic BIFF records contained in this RecordAggregate in the order that they should be written to file. Implementors may or may not return the actualRecords being used to manage POI's internal implementation. Callers should not assume either way, and therefore only attempt to modify thoseRecords after cloning- Specified by:
visitContainedRecordsin classRecordAggregate- Parameters:
rv- The visitor to use for callbacks while walking this object
-
updateFormulasAfterCellShift
- Parameters:
shifter- TheFormulaShifterto usecurrentExternSheetIx- The index for extern sheets- Returns:
falseif this wholeCFHeaderRecord/CFRuleRecords should be deleted
-