jxl.write.biff
Class MergedCellsRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.MergedCellsRecord
All Implemented Interfaces:
ByteData

public class MergedCellsRecord
extends WritableRecordData

A number record. This is stored as 8 bytes, as opposed to the 4 byte RK record


Field Summary
private  java.util.ArrayList ranges
          The ranges of all the cells which are merged on this sheet
private  WritableSheet sheet
          The sheet containing this hyperlink
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
protected MergedCellsRecord(MergedCellsRecord mc, WritableSheet ws)
          Constructs this object from the a readable spreadsheet
protected MergedCellsRecord(WritableSheet ws)
          Constructs a merged cell record
 
Method Summary
(package private)  void add(Range r)
          Adds the range to the list of merged cells.
private  void checkRanges()
          Checks the cell ranges for intersections, or if the merged cells contains more than one item of data
 byte[] getData()
          Gets the raw data for output to file
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

ranges

private java.util.ArrayList ranges
The ranges of all the cells which are merged on this sheet

sheet

private WritableSheet sheet
The sheet containing this hyperlink
Constructor Detail

MergedCellsRecord

protected MergedCellsRecord(MergedCellsRecord mc,
                            WritableSheet ws)
Constructs this object from the a readable spreadsheet
Parameters:
mc - the merged cell record from the sheet read in
ws - the sheet containing the merged cells

MergedCellsRecord

protected MergedCellsRecord(WritableSheet ws)
Constructs a merged cell record
Parameters:
ws - the sheet containing the merged cells
Method Detail

add

void add(Range r)
Adds the range to the list of merged cells. Checks for range clashes
Parameters:
range - the range to add

getData

public byte[] getData()
Gets the raw data for output to file
Overrides:
getData in class WritableRecordData
Returns:
the data to write to file

checkRanges

private void checkRanges()
Checks the cell ranges for intersections, or if the merged cells contains more than one item of data