jxl.write.biff
Class ColumnInfoRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.ColumnInfoRecord
All Implemented Interfaces:
ByteData

class ColumnInfoRecord
extends WritableRecordData

Describes the column formatting for a particular column


Field Summary
private  int column
          The column number which this format applies to
private  byte[] data
          The binary data
private  boolean hidden
          Flag to indicate the hidden status of this column
private  XFRecord style
          The style for the column
private  int width
          The width of the column in 1/256 of a character
private  int xfIndex
          The index for the style of this column
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
ColumnInfoRecord(ColumnInfoRecord cir, int col, FormattingRecords fr)
          Constructor used when copying an existing spreadsheet
ColumnInfoRecord(int col, int w, XFRecord xf)
          Constructor used when setting column information from the user API
 
Method Summary
 void decrementColumn()
          Decrements the column.
 XFRecord getCellFormat()
          Gets the cell format associated with this column info record
 int getColumn()
          Gets the column this format applies to
 byte[] getData()
          Gets the binary data to be written to the output file
(package private)  boolean getHidden()
          Accessor for the hidden flag
(package private)  int getWidth()
          Accessor for the width
 void incrementColumn()
          Increments the column.
(package private)  void rationalize(IndexMapping xfmapping)
          Rationalizes the sheets xf index mapping
(package private)  void setHidden(boolean h)
          Sets this column to be hidden (or otherwise)
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes, handleContinueRecords
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

data

private byte[] data
The binary data

column

private int column
The column number which this format applies to

style

private XFRecord style
The style for the column

xfIndex

private int xfIndex
The index for the style of this column

width

private int width
The width of the column in 1/256 of a character

hidden

private boolean hidden
Flag to indicate the hidden status of this column
Constructor Detail

ColumnInfoRecord

public ColumnInfoRecord(int col,
                        int w,
                        XFRecord xf)
Constructor used when setting column information from the user API
Parameters:
w - the width of the column in characters
col - the column to format
xf - the style for the column

ColumnInfoRecord

public ColumnInfoRecord(ColumnInfoRecord cir,
                        int col,
                        FormattingRecords fr)
Constructor used when copying an existing spreadsheet
Parameters:
col - the column number
cir - the column info record read in
fr - the format records
Method Detail

getColumn

public int getColumn()
Gets the column this format applies to
Returns:
the column which is formatted

incrementColumn

public void incrementColumn()
Increments the column. Called when inserting a new column into the sheet

decrementColumn

public void decrementColumn()
Decrements the column. Called when removing a column from the sheet

getWidth

int getWidth()
Accessor for the width
Returns:
the width

getData

public byte[] getData()
Gets the binary data to be written to the output file
Overrides:
getData in class WritableRecordData
Returns:
the data to write to file

getCellFormat

public XFRecord getCellFormat()
Gets the cell format associated with this column info record

rationalize

void rationalize(IndexMapping xfmapping)
Rationalizes the sheets xf index mapping
Parameters:
xfmapping - the index mapping

setHidden

void setHidden(boolean h)
Sets this column to be hidden (or otherwise)
Parameters:
h - TRUE if the column is to be hidden, FALSE otherwise

getHidden

boolean getHidden()
Accessor for the hidden flag
Returns:
TRUE if this column is hidden, FALSE otherwise