Package loci.poi.hssf.record
Class RowRecord
java.lang.Object
loci.poi.hssf.record.Record
loci.poi.hssf.record.RowRecord
- All Implemented Interfaces:
Comparable
Title: Row Record
Description: stores the row information for the sheet.
REFERENCE: PG 379 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
- Version:
- 2.0-pre
- Author:
- Andrew C. Oliver (acoliver at apache dot org), Jason Height (jheight at chariot dot net dot au)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe maximum row number that excel can handle (zero bazed) ie 65536 rows is max number of rows.static final short -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a Row record and sets its fields appropriately. -
Method Summary
Modifier and TypeMethodDescriptionclone()intbooleanprotected voidcalled by the constructor, should set class level fields.booleanget whether the font and row height are not compatiblebooleanget whether or not to colapse this rowshortget the logical col number for the first cell this row (0 based index)booleanget whether the row has been formatted (even if its got all blank cells)shortget the height of the rowshortget the logical col number for the last cell this row plus one (0 based index)shortget whether to optimize or not (set to 0)shortgets the option bitmask.shortget the outline level of this rowintgives the current serialized size of the record.intget the logical row number for this row (0 based index)shortgetSid()return the non static version of the id for this record.shortif the row is formatted then this is the index to the extended format recordbooleanget whether or not to display this row with 0 heightbooleanDBCELL, ROW, VALUES all say yesintserialize(int offset, byte[] data) called by the class that is responsible for writing this sucker.voidsetBadFontHeight(boolean f) set whether the font and row height are not compatiblevoidsetColapsed(boolean c) set whether or not to colapse this rowvoidsetFirstCol(short col) set the logical col number for the first cell this row (0 based index)voidsetFormatted(boolean f) set whether the row has been formatted (even if its got all blank cells)voidsetHeight(short height) set the height of the rowvoidsetLastCol(short col) set the logical col number for the last cell this row (0 based index)voidsetOptimize(short optimize) set whether to optimize or not (set to 0)voidsetOptionFlags(short options) sets the option bitmask.voidsetOutlineLevel(short ol) set the outline level of this rowvoidsetRowNumber(int row) set the logical row number for this row (0 based index)voidsetXFIndex(short index) if the row is formatted then this is the index to the extended format recordvoidsetZeroHeight(boolean z) set whether or not to display this row with 0 heighttoString()get a string representation of the record (for biffview/debugging)protected voidvalidateSid(short id) called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
-
Field Details
-
sid
public static final short sid- See Also:
-
MAX_ROW_NUMBER
public static final int MAX_ROW_NUMBERThe maximum row number that excel can handle (zero bazed) ie 65536 rows is max number of rows.- See Also:
-
-
Constructor Details
-
RowRecord
public RowRecord() -
RowRecord
Constructs a Row record and sets its fields appropriately.- Parameters:
in- the RecordInputstream to read the record from
-
-
Method Details
-
validateSid
protected void validateSid(short id) Description copied from class:Recordcalled by constructor, should throw runtime exception in the event of a record passed with a differing ID.- Specified by:
validateSidin classRecord- Parameters:
id- alleged id for this record
-
fillFields
Description copied from class:Recordcalled by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.- Specified by:
fillFieldsin classRecord- Parameters:
in- the RecordInputstream to read the record from
-
setRowNumber
public void setRowNumber(int row) set the logical row number for this row (0 based index)- Parameters:
row- - the row number
-
setFirstCol
public void setFirstCol(short col) set the logical col number for the first cell this row (0 based index)- Parameters:
col- - the col number
-
setLastCol
public void setLastCol(short col) set the logical col number for the last cell this row (0 based index)- Parameters:
col- - the col number
-
setHeight
public void setHeight(short height) set the height of the row- Parameters:
height- of the row
-
setOptimize
public void setOptimize(short optimize) set whether to optimize or not (set to 0)- Parameters:
optimize- (set to 0)
-
setOptionFlags
public void setOptionFlags(short options) sets the option bitmask. (use the individual bit setters that refer to this method)- Parameters:
options- - the bitmask
-
setOutlineLevel
public void setOutlineLevel(short ol) set the outline level of this row- Parameters:
ol- - the outline level- See Also:
-
setColapsed
public void setColapsed(boolean c) set whether or not to colapse this row- Parameters:
c- - colapse or not- See Also:
-
setZeroHeight
public void setZeroHeight(boolean z) set whether or not to display this row with 0 height- Parameters:
z- height is zero or not.- See Also:
-
setBadFontHeight
public void setBadFontHeight(boolean f) set whether the font and row height are not compatible- Parameters:
f- true if they aren't compatible (damn not logic)- See Also:
-
setFormatted
public void setFormatted(boolean f) set whether the row has been formatted (even if its got all blank cells)- Parameters:
f- formatted or not- See Also:
-
setXFIndex
public void setXFIndex(short index) if the row is formatted then this is the index to the extended format record- Parameters:
index- to the XF record- See Also:
-
getRowNumber
public int getRowNumber()get the logical row number for this row (0 based index)- Returns:
- row - the row number
-
getFirstCol
public short getFirstCol()get the logical col number for the first cell this row (0 based index)- Returns:
- col - the col number
-
getLastCol
public short getLastCol()get the logical col number for the last cell this row plus one (0 based index)- Returns:
- col - the last col number + 1
-
getHeight
public short getHeight()get the height of the row- Returns:
- height of the row
-
getOptimize
public short getOptimize()get whether to optimize or not (set to 0)- Returns:
- optimize (set to 0)
-
getOptionFlags
public short getOptionFlags()gets the option bitmask. (use the individual bit setters that refer to this method)- Returns:
- options - the bitmask
-
getOutlineLevel
public short getOutlineLevel()get the outline level of this row- Returns:
- ol - the outline level
- See Also:
-
getColapsed
public boolean getColapsed()get whether or not to colapse this row- Returns:
- c - colapse or not
- See Also:
-
getZeroHeight
public boolean getZeroHeight()get whether or not to display this row with 0 height- Returns:
- - z height is zero or not.
- See Also:
-
getBadFontHeight
public boolean getBadFontHeight()get whether the font and row height are not compatible- Returns:
- - f -true if they aren't compatible (damn not logic)
- See Also:
-
getFormatted
public boolean getFormatted()get whether the row has been formatted (even if its got all blank cells)- Returns:
- formatted or not
- See Also:
-
getXFIndex
public short getXFIndex()if the row is formatted then this is the index to the extended format record- Returns:
- index to the XF record or bogus value (undefined) if isn't formatted
- See Also:
-
isInValueSection
public boolean isInValueSection()Description copied from class:RecordDBCELL, ROW, VALUES all say yes- Overrides:
isInValueSectionin classRecord
-
toString
Description copied from class:Recordget a string representation of the record (for biffview/debugging) -
serialize
public int serialize(int offset, byte[] data) Description copied from class:Recordcalled by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array. -
getRecordSize
public int getRecordSize()Description copied from class:Recordgives the current serialized size of the record. Should include the sid and reclength (4 bytes).- Overrides:
getRecordSizein classRecord
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record. -
compareTo
- Specified by:
compareToin interfaceComparable
-
equals
-
clone
-