|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.poi.hssf.record.Record | +--org.apache.poi.hssf.record.MergeCellsRecord
Title: Merged Cells Record
Description: Optional record defining a square area of cells to "merged" into one cell.
REFERENCE: NONE (UNDOCUMENTED PRESENTLY)
Inner Class Summary | |
class |
MergeCellsRecord.MergedRegion
this is a low level representation of a MergedRegion of cells. |
Field Summary | |
static short |
sid
|
Constructor Summary | |
MergeCellsRecord()
|
|
MergeCellsRecord(short sid,
short size,
byte[] data)
Constructs a MergedCellsRecord and sets its fields appropriately |
|
MergeCellsRecord(short sid,
short size,
byte[] data,
int offset)
Constructs a MergedCellsRecord and sets its fields appropriately |
Method Summary | |
int |
addArea(short rowfrom,
short colfrom,
short rowto,
short colto)
Add an area to consider a merged cell. |
protected void |
fillFields(byte[] data,
short size,
int offset)
called by the constructor, should set class level fields. |
MergeCellsRecord.MergedRegion |
getAreaAt(int index)
return the MergedRegion at the given index. |
short |
getNumAreas()
get the number of merged areas. |
int |
getRecordSize()
gives the current serialized size of the record. |
short |
getSid()
return the non static version of the id for this record. |
void |
removeAreaAt(int area)
essentially unmerge the cells in the "area" stored at the passed in index |
int |
serialize(int offset,
byte[] data)
called by the class that is responsible for writing this sucker. |
void |
setNumAreas(short numareas)
set the number of merged areas. |
java.lang.String |
toString()
get a string representation of the record (for biffview/debugging) |
protected void |
validateSid(short id)
called by constructor, should throw runtime exception in the event of a record passed with a differing ID. |
Methods inherited from class org.apache.poi.hssf.record.Record |
fillFields, isInValueSection, isValue, processContinueRecord, serialize |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short sid
Constructor Detail |
public MergeCellsRecord()
public MergeCellsRecord(short sid, short size, byte[] data)
sid
- id must be 0xe5 or an exception will be throw upon validationsize
- the size of the data area of the recorddata
- data of the record (should not contain sid/len)public MergeCellsRecord(short sid, short size, byte[] data, int offset)
sid
- id must be 0xe5 or an exception will be throw upon validationsize
- the size of the data area of the recorddata
- data of the record (should not contain sid/len)offset
- the offset of the record's dataMethod Detail |
protected void fillFields(byte[] data, short size, int offset)
Record
fillFields
in class Record
org.apache.poi.hssf.record.Record
data
- raw datasize
- size of dataoffset
- of the record's data (provided a big array of the file)public short getNumAreas()
public void setNumAreas(short numareas)
numareas
- number of areaspublic int addArea(short rowfrom, short colfrom, short rowto, short colto)
rowfrom
- - the upper left hand corner's rowcolfrom
- - the upper left hand corner's colrowto
- - the lower right hand corner's rowcolto
- - the lower right hand corner's colpublic void removeAreaAt(int area)
area
- indexpublic MergeCellsRecord.MergedRegion getAreaAt(int index)
public int getRecordSize()
Record
getRecordSize
in class Record
public short getSid()
Record
getSid
in class Record
public int serialize(int offset, byte[] data)
Record
serialize
in class Record
org.apache.poi.hssf.record.Record
offset
- to begin writing atdata
- byte array containing instance datapublic java.lang.String toString()
Record
toString
in class Record
protected void validateSid(short id)
Record
validateSid
in class Record
org.apache.poi.hssf.record.Record
id
- alleged id for this record
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |