org.apache.poi.hssf.record
Class ColumnInfoRecord

java.lang.Object
  extended by org.apache.poi.hssf.record.RecordBase
      extended by org.apache.poi.hssf.record.Record
          extended by org.apache.poi.hssf.record.ColumnInfoRecord

public final class ColumnInfoRecord
extends Record

Title: COLINFO Record

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)

Version:
2.0-pre
Author:
Andrew C. Oliver (acoliver at apache dot org)

Field Summary
static short sid
           
 
Constructor Summary
ColumnInfoRecord()
          Creates a column info record with default width and format
ColumnInfoRecord(RecordInputStream in)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean containsColumn(int columnIndex)
           
 boolean formatMatches(ColumnInfoRecord other)
           
 boolean getCollapsed()
          get whether the cells are collapsed
 int getColumnWidth()
          get the columns' width in 1/256 of a character width
 int getFirstColumn()
          get the first column this record defines formatting info for
 boolean getHidden()
          get whether or not these cells are hidden
 int getLastColumn()
          get the last column this record defines formatting info for
 int getOptions()
           
 int getOutlineLevel()
          get the outline level for the cells
 int getRecordSize()
          gives the current serialized size of the record.
 short getSid()
          return the non static version of the id for this record.
 int getXFIndex()
          get the columns' default format info
 boolean isAdjacentBefore(ColumnInfoRecord other)
           
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
 void setCollapsed(boolean iscollapsed)
          set whether the cells are collapsed
 void setColumnWidth(int cw)
          set the columns' width in 1/256 of a character width
 void setFirstColumn(int fc)
          set the first column this record defines formatting info for
 void setHidden(boolean ishidden)
          set whether or not these cells are hidden
 void setLastColumn(int lc)
          set the last column this record defines formatting info for
 void setOptions(int field_5_options)
           
 void setOutlineLevel(int olevel)
          set the outline level for the cells
 void setXFIndex(int xfi)
          set the columns' default format info
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
 
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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.
See Also:
#setOptions(short)

setOutlineLevel

public void setOutlineLevel(int olevel)
set the outline level for the cells

Parameters:
olevel - -outline level for the cells
See Also:
#setOptions(short)

setCollapsed

public void setCollapsed(boolean iscollapsed)
set whether the cells are collapsed

Parameters:
iscollapsed - - wether the cells are collapsed
See Also:
#setOptions(short)

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()
get the columns' width in 1/256 of a character width

Returns:
column width

getXFIndex

public int getXFIndex()
get the columns' default format info

Returns:
the extended format index
See Also:
ExtendedFormatRecord

getOptions

public int getOptions()

setOptions

public void setOptions(int field_5_options)

getHidden

public boolean getHidden()
get whether or not these cells are hidden

Returns:
whether the cells are hidden.
See Also:
#setOptions(short)

getOutlineLevel

public int getOutlineLevel()
get the outline level for the cells

Returns:
outline level for the cells
See Also:
#setOptions(short)

getCollapsed

public boolean getCollapsed()
get whether the cells are collapsed

Returns:
wether the cells are collapsed
See Also:
#setOptions(short)

containsColumn

public boolean containsColumn(int columnIndex)

isAdjacentBefore

public boolean isAdjacentBefore(ColumnInfoRecord other)

formatMatches

public boolean formatMatches(ColumnInfoRecord other)
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.

Specified by:
getSid in class Record

serialize

public int serialize(int offset,
                     byte[] data)
Description copied from class: RecordBase
called 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.

Specified by:
serialize in class RecordBase
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

getRecordSize

public int getRecordSize()
Description copied from class: Record
gives the current serialized size of the record. Should include the sid and reclength (4 bytes).

Overrides:
getRecordSize in class Record

toString

public java.lang.String toString()
Description copied from class: Record
get a string representation of the record (for biffview/debugging)

Overrides:
toString in class Record

clone

public java.lang.Object clone()
Overrides:
clone in class Record


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.