| java.lang.Object org.apache.poi.hssf.record.Record org.apache.poi.hssf.record.MergeCellsRecord
MergeCellsRecord | public class MergeCellsRecord extends Record (Code) | | Title: Merged Cells Record
Description: Optional record defining a square area of cells to "merged" into
one cell.
REFERENCE: NONE (UNDOCUMENTED PRESENTLY)
author: Andrew C. Oliver (acoliver at apache dot org) version: 2.0-pre |
Inner Class :public class MergedRegion | |
Field Summary | |
final public static short | sid |
sid | final public static short sid(Code) | | |
MergeCellsRecord | public MergeCellsRecord()(Code) | | |
MergeCellsRecord | public MergeCellsRecord(RecordInputStream in)(Code) | | Constructs a MergedCellsRecord and sets its fields appropriately
Parameters: in - the RecordInputstream to read the record from |
addArea | public int addArea(int rowfrom, short colfrom, int rowto, short colto)(Code) | | Add an area to consider a merged cell. The index returned is only gauranteed to
be correct provided you do not add ahead of or remove ahead of it (in which case
you should increment or decrement appropriately....in other words its an arrayList)
Parameters: rowfrom - - the upper left hand corner's row Parameters: colfrom - - the upper left hand corner's col Parameters: rowto - - the lower right hand corner's row Parameters: colto - - the lower right hand corner's col new index of said area (don't depend on it if you add/remove) |
getAreaAt | public MergedRegion getAreaAt(int index)(Code) | | return the MergedRegion at the given index.
MergedRegion representing the area that is Merged (r1,c1 - r2,c2) |
getNumAreas | public short getNumAreas()(Code) | | get the number of merged areas. If this drops down to 0 you should just go
ahead and delete the record.
number of areas |
getRecordSize | public int getRecordSize()(Code) | | |
getSid | public short getSid()(Code) | | |
removeAreaAt | public void removeAreaAt(int area)(Code) | | essentially unmerge the cells in the "area" stored at the passed in index
Parameters: area - index |
serialize | public int serialize(int offset, byte[] data)(Code) | | |
setNumAreas | public void setNumAreas(short numareas)(Code) | | set the number of merged areas. You do not need to call this if you use addArea,
it will be incremented automatically or decremented when an area is removed. If
you are setting this to 0 then you are a terrible person. Just remove the record.
(just kidding about you being a terrible person..hehe)
See Also: MergeCellsRecord.getNumAreas() Parameters: numareas - number of areas |
validateSid | protected void validateSid(short id)(Code) | | |
|
|