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:
org.apache.poi.common.Duplicatable,GenericRecord
Defines with width and formatting for a range of columns
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a column info record with default width and formatColumnInfoRecord(ColumnInfoRecord other) -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsColumn(int columnIndex) copy()booleanformatMatches(ColumnInfoRecord other) booleanintintget the first column this record defines formatting info forbooleanintget the last column this record defines formatting info forintshortgetSid()return the non static version of the id for this record.intget the columns' default format infobooleanisAdjacentBefore(ColumnInfoRecord other) voidvoidsetCollapsed(boolean isCollapsed) set whether the cells are collapsedvoidsetColumnWidth(int cw) set the columns' width in 1/256 of a character widthvoidsetFirstColumn(int fc) set the first column this record defines formatting info forvoidsetHidden(boolean ishidden) set whether or not these cells are hiddenvoidsetLastColumn(int lc) set the last column this record defines formatting info forvoidsetOutlineLevel(int olevel) set the outline level for the cellsvoidsetXFIndex(int xfi) set the columns' default format infoMethods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serializeMethods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
Field Details
-
sid
public static final short sid- See Also:
-
-
Constructor Details
-
ColumnInfoRecord
public ColumnInfoRecord()Creates a column info record with default width and format -
ColumnInfoRecord
-
ColumnInfoRecord
-
-
Method Details
-
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:
-
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:
-
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
-
formatMatches
- Parameters:
other- the format to match with- Returns:
trueif the format, options and column width match
-
getSid
public short getSid()Description copied from class:Recordreturn the non static version of the id for this record. -
serialize
-
copy
- Specified by:
copyin interfaceorg.apache.poi.common.Duplicatable- Specified by:
copyin classStandardRecord
-
getGenericRecordType
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
getGenericProperties
-