Package org.apache.poi.hssf.record
Class ColumnInfoRecord
- 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.ColumnInfoRecord
-
- All Implemented Interfaces:
java.lang.Cloneable
public final class ColumnInfoRecord extends StandardRecord implements java.lang.Cloneable
Title: COLINFO Record (0x007D)Description: Defines with width and formatting for a range of columns
REFERENCE: PG 293 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)
-
-
Field Summary
Fields Modifier and Type Field Description static short
sid
-
Constructor Summary
Constructors Constructor Description ColumnInfoRecord()
Creates a column info record with default width and formatColumnInfoRecord(RecordInputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColumnInfoRecord
clone()
boolean
containsColumn(int columnIndex)
boolean
formatMatches(ColumnInfoRecord other)
boolean
getCollapsed()
int
getColumnWidth()
int
getFirstColumn()
get the first column this record defines formatting info forboolean
getHidden()
int
getLastColumn()
get the last column this record defines formatting info forint
getOutlineLevel()
short
getSid()
return the non static version of the id for this record.int
getXFIndex()
get the columns' default format infoboolean
isAdjacentBefore(ColumnInfoRecord other)
void
serialize(LittleEndianOutput out)
void
setCollapsed(boolean isCollapsed)
set whether the cells are collapsedvoid
setColumnWidth(int cw)
set the columns' width in 1/256 of a character widthvoid
setFirstColumn(int fc)
set the first column this record defines formatting info forvoid
setHidden(boolean ishidden)
set whether or not these cells are hiddenvoid
setLastColumn(int lc)
set the last column this record defines formatting info forvoid
setOutlineLevel(int olevel)
set the outline level for the cellsvoid
setXFIndex(int xfi)
set the columns' default format infojava.lang.String
toString()
get a string representation of the record (for biffview/debugging)-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ColumnInfoRecord
public ColumnInfoRecord()
Creates a column info record with default width and format
-
ColumnInfoRecord
public ColumnInfoRecord(RecordInputStream in)
-
-
Method Detail
-
setFirstColumn
public void setFirstColumn(int fc)
set the first column this record defines formatting info for- Parameters:
fc
- - the first column index (0-based)
-
setLastColumn
public void setLastColumn(int lc)
set the last column this record defines formatting info for- Parameters:
lc
- - the last column index (0-based)
-
setColumnWidth
public void setColumnWidth(int cw)
set the columns' width in 1/256 of a character width- Parameters:
cw
- - column width
-
setXFIndex
public void setXFIndex(int xfi)
set the columns' default format info- Parameters:
xfi
- - the extended format index- See Also:
ExtendedFormatRecord
-
setHidden
public void setHidden(boolean ishidden)
set whether or not these cells are hidden- Parameters:
ishidden
- - whether the cells are hidden.
-
setOutlineLevel
public void setOutlineLevel(int olevel)
set the outline level for the cells- Parameters:
olevel
- -outline level for the cells
-
setCollapsed
public void setCollapsed(boolean isCollapsed)
set whether the cells are collapsed- Parameters:
isCollapsed
- - whether the cells are collapsed
-
getFirstColumn
public int getFirstColumn()
get the first column this record defines formatting info for- Returns:
- the first column index (0-based)
-
getLastColumn
public int getLastColumn()
get the last column this record defines formatting info for- Returns:
- the last column index (0-based)
-
getColumnWidth
public int getColumnWidth()
- Returns:
- column width in units of 1/256 of a character width
-
getXFIndex
public int getXFIndex()
get the columns' default format info- Returns:
- the extended format index
- See Also:
ExtendedFormatRecord
-
getHidden
public boolean getHidden()
- Returns:
- whether the cells are hidden.
-
getOutlineLevel
public int getOutlineLevel()
- Returns:
- outline level for the cells
-
getCollapsed
public boolean getCollapsed()
- Returns:
- whether the cells are collapsed
-
containsColumn
public boolean containsColumn(int columnIndex)
-
isAdjacentBefore
public boolean isAdjacentBefore(ColumnInfoRecord other)
-
formatMatches
public boolean formatMatches(ColumnInfoRecord other)
- Parameters:
other
- the format to match with- Returns:
true
if the format, options and column width match
-
getSid
public short getSid()
Description copied from class:Record
return the non static version of the id for this record.
-
serialize
public void serialize(LittleEndianOutput out)
-
toString
public java.lang.String toString()
Description copied from class:Record
get a string representation of the record (for biffview/debugging)
-
clone
public ColumnInfoRecord clone()
-
-