Package org.apache.poi.hssf.record
Class RowRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.RowRecord
-
- All Implemented Interfaces:
Duplicatable
,GenericRecord
public final class RowRecord extends StandardRecord
Stores the row information for the sheet.- Since:
- 2.0-pre
-
-
Field Summary
Fields Modifier and Type Field Description static int
ENCODED_SIZE
static short
sid
-
Constructor Summary
Constructors Constructor Description RowRecord(int rowNumber)
RowRecord(RecordInputStream in)
RowRecord(RowRecord other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RowRecord
copy()
boolean
getBadFontHeight()
get whether the font and row height are not compatibleboolean
getBottomBorder()
A bit that specifies whether any cell in the row has a medium or thick bottom border, or any cell in the row directly below the current row has a medium or thick top border.boolean
getColapsed()
get whether or not to colapse this rowprotected int
getDataSize()
int
getFirstCol()
get the logical col number for the first cell this row (0 based index)boolean
getFormatted()
get whether the row has been formatted (even if its got all blank cells)Map<String,Supplier<?>>
getGenericProperties()
HSSFRecordTypes
getGenericRecordType()
short
getHeight()
get the height of the rowint
getLastCol()
get the logical col number for the last cell this row (0 based index), plus oneshort
getOptimize()
get whether to optimize or not (set to 0)short
getOptionFlags()
gets the option bitmask.short
getOptionFlags2()
gets the 2nd option bitmask.short
getOutlineLevel()
get the outline level of this rowboolean
getPhoeneticGuide()
A bit that specifies whether the phonetic guide feature is enabled for any cell in this row.int
getRowNumber()
get the logical row number for this row (0 based index)short
getSid()
return the non static version of the id for this record.boolean
getTopBorder()
A bit that specifies whether any cell in the row has a thick top border, or any cell in the row directly above the current row has a thick bottom border.short
getXFIndex()
if the row is formatted then this is the index to the extended format recordboolean
getZeroHeight()
get whether or not to display this row with 0 heightboolean
isEmpty()
void
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.void
setBadFontHeight(boolean f)
set whether the font and row height are not compatiblevoid
setBottomBorder(boolean f)
A bit that specifies whether any cell in the row has a medium or thick bottom border, or any cell in the row directly below the current row has a medium or thick top border.void
setColapsed(boolean c)
set whether or not to collapse this rowvoid
setEmpty()
Updates the firstCol and lastCol fields to the reserved value (-1) to signify that this row is emptyvoid
setFirstCol(int col)
set the logical col number for the first cell this row (0 based index)void
setFormatted(boolean f)
set whether the row has been formatted (even if its got all blank cells)void
setHeight(short height)
set the height of the rowvoid
setLastCol(int col)
void
setOptimize(short optimize)
set whether to optimize or not (set to 0)void
setOutlineLevel(short ol)
set the outline level of this rowvoid
setPhoeneticGuide(boolean f)
A bit that specifies whether the phonetic guide feature is enabled for any cell in this row.void
setRowNumber(int row)
set the logical row number for this row (0 based index)void
setTopBorder(boolean f)
bit that specifies whether any cell in the row has a thick top border, or any cell in the row directly above the current row has a thick bottom border.void
setXFIndex(short index)
if the row is formatted then this is the index to the extended format recordvoid
setZeroHeight(boolean z)
set whether or not to display this row with 0 height-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
ENCODED_SIZE
public static final int ENCODED_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RowRecord
public RowRecord(RowRecord other)
-
RowRecord
public RowRecord(int rowNumber)
-
RowRecord
public RowRecord(RecordInputStream in)
-
-
Method Detail
-
setEmpty
public void setEmpty()
Updates the firstCol and lastCol fields to the reserved value (-1) to signify that this row is empty
-
isEmpty
public boolean isEmpty()
-
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(int col)
set the logical col number for the first cell this row (0 based index)- Parameters:
col
- - the col number
-
setLastCol
public void setLastCol(int col)
- Parameters:
col
- - one past the zero-based index to the last cell in this row
-
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)
-
setOutlineLevel
public void setOutlineLevel(short ol)
set the outline level of this row- Parameters:
ol
- - the outline level
-
setColapsed
public void setColapsed(boolean c)
set whether or not to collapse this row- Parameters:
c
- - collapse or not
-
setZeroHeight
public void setZeroHeight(boolean z)
set whether or not to display this row with 0 height- Parameters:
z
- height is zero or not.
-
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)
-
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
-
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:
ExtendedFormatRecord
-
setTopBorder
public void setTopBorder(boolean f)
bit that specifies whether any cell in the row has a thick top border, or any cell in the row directly above the current row has a thick bottom border.- Parameters:
f
- has thick top border
-
setBottomBorder
public void setBottomBorder(boolean f)
A bit that specifies whether any cell in the row has a medium or thick bottom border, or any cell in the row directly below the current row has a medium or thick top border.- Parameters:
f
- has thick bottom border
-
setPhoeneticGuide
public void setPhoeneticGuide(boolean f)
A bit that specifies whether the phonetic guide feature is enabled for any cell in this row.- Parameters:
f
- use phoenetic guide
-
getRowNumber
public int getRowNumber()
get the logical row number for this row (0 based index)- Returns:
- row - the row number
-
getFirstCol
public int getFirstCol()
get the logical col number for the first cell this row (0 based index)- Returns:
- col - the col number
-
getLastCol
public int getLastCol()
get the logical col number for the last cell this row (0 based index), plus one- Returns:
- col - the last col index + 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:
getOptionFlags()
-
getColapsed
public boolean getColapsed()
get whether or not to colapse this row- Returns:
- c - colapse or not
- See Also:
getOptionFlags()
-
getZeroHeight
public boolean getZeroHeight()
get whether or not to display this row with 0 height- Returns:
- - z height is zero or not.
- See Also:
getOptionFlags()
-
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:
getOptionFlags()
-
getFormatted
public boolean getFormatted()
get whether the row has been formatted (even if its got all blank cells)- Returns:
- formatted or not
- See Also:
getOptionFlags()
-
getOptionFlags2
public short getOptionFlags2()
gets the 2nd option bitmask. (use the individual bit setters that refer to this method)- Returns:
- options - the bitmask
-
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:
ExtendedFormatRecord
-
getTopBorder
public boolean getTopBorder()
A bit that specifies whether any cell in the row has a thick top border, or any cell in the row directly above the current row has a thick bottom border.- Returns:
- has cells with a thick top border
-
getBottomBorder
public boolean getBottomBorder()
A bit that specifies whether any cell in the row has a medium or thick bottom border, or any cell in the row directly below the current row has a medium or thick top border.- Returns:
- has cells with a thick bottom border
-
getPhoeneticGuide
public boolean getPhoeneticGuide()
A bit that specifies whether the phonetic guide feature is enabled for any cell in this row.- Returns:
- has phoentic guide
-
serialize
public void serialize(LittleEndianOutput out)
Description copied from class:StandardRecord
Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.The number of bytes written must equal the record size reported by
RecordBase.getRecordSize()
} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).- Specified by:
serialize
in classStandardRecord
- Parameters:
out
- the output object
-
getDataSize
protected int getDataSize()
- Specified by:
getDataSize
in classStandardRecord
-
getSid
public short getSid()
Description copied from class:Record
return the non static version of the id for this record.
-
copy
public RowRecord copy()
- Specified by:
copy
in interfaceDuplicatable
- Specified by:
copy
in classStandardRecord
- Returns:
- a deep copy of the implementing class / instance
-
getGenericRecordType
public HSSFRecordTypes getGenericRecordType()
- Specified by:
getGenericRecordType
in interfaceGenericRecord
- Specified by:
getGenericRecordType
in classRecord
-
-