org.apache.poi.hssf.record.aggregates
Class ColumnInfoRecordsAggregate

java.lang.Object
  extended by org.apache.poi.hssf.record.Record
      extended by org.apache.poi.hssf.record.aggregates.ColumnInfoRecordsAggregate

public class ColumnInfoRecordsAggregate
extends Record

Version:
$Id: ColumnInfoRecordsAggregate.java 496526 2007-01-15 22:46:35Z markt $
Author:
Glen Stampoultzis

Constructor Summary
ColumnInfoRecordsAggregate()
           
 
Method Summary
 java.lang.Object clone()
          Performs a deep clone of the record
 void collapseColInfoRecords(int columnIdx)
           
 void collapseColumn(short columnNumber)
           
static Record createColInfo()
          creates the ColumnInfo Record and sets it to a default column/width
 void expandColumn(short columnNumber)
           
protected  void fillFields(RecordInputStream in)
          You never fill an aggregate
 int findColumnIdx(int column, int fromIdx)
           
 int findEndOfColumnOutlineGroup(int idx)
           
 int findStartOfColumnOutlineGroup(int idx)
           
 ColumnInfoRecord getColInfo(int idx)
           
 java.util.Iterator getIterator()
           
 int getNumColumns()
           
 int getRecordSize()
          gives the current serialized size of the record.
 short getSid()
          It's an aggregate...
 void groupColumnRange(short fromColumn, short toColumn, boolean indent)
          Creates an outline group for the specified columns.
 void insertColumn(ColumnInfoRecord col)
          Inserts a column into the aggregate (at the end of the list).
 void insertColumn(int idx, ColumnInfoRecord col)
          Inserts a column into the aggregate (at the position specified by idx.
 boolean isColumnGroupCollapsed(int idx)
           
 boolean isColumnGroupHiddenByParent(int idx)
           
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
 void setColumn(short column, java.lang.Short xfIndex, java.lang.Short width, java.lang.Integer level, java.lang.Boolean hidden, java.lang.Boolean collapsed)
           
protected  void validateSid(short id)
          Not required by an aggregate
 ColumnInfoRecord writeHidden(ColumnInfoRecord columnInfo, int idx, boolean hidden)
           
 
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, isInValueSection, isValue, serialize, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnInfoRecordsAggregate

public ColumnInfoRecordsAggregate()
Method Detail

fillFields

protected void fillFields(RecordInputStream in)
You never fill an aggregate

Specified by:
fillFields in class Record
Parameters:
in - the RecordInputstream to read the record from

validateSid

protected void validateSid(short id)
Not required by an aggregate

Specified by:
validateSid in class Record
Parameters:
id - alleged id for this record

getSid

public short getSid()
It's an aggregate... just made something up

Specified by:
getSid in class Record

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

getIterator

public java.util.Iterator getIterator()

clone

public java.lang.Object clone()
Performs a deep clone of the record

Overrides:
clone in class Record

insertColumn

public void insertColumn(ColumnInfoRecord col)
Inserts a column into the aggregate (at the end of the list).


insertColumn

public void insertColumn(int idx,
                         ColumnInfoRecord col)
Inserts a column into the aggregate (at the position specified by idx.


getNumColumns

public int getNumColumns()

serialize

public int serialize(int offset,
                     byte[] data)
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 Record
Parameters:
offset - offset to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

findStartOfColumnOutlineGroup

public int findStartOfColumnOutlineGroup(int idx)

findEndOfColumnOutlineGroup

public int findEndOfColumnOutlineGroup(int idx)

getColInfo

public ColumnInfoRecord getColInfo(int idx)

writeHidden

public ColumnInfoRecord writeHidden(ColumnInfoRecord columnInfo,
                                    int idx,
                                    boolean hidden)

isColumnGroupCollapsed

public boolean isColumnGroupCollapsed(int idx)

isColumnGroupHiddenByParent

public boolean isColumnGroupHiddenByParent(int idx)

collapseColumn

public void collapseColumn(short columnNumber)

expandColumn

public void expandColumn(short columnNumber)

createColInfo

public static Record createColInfo()
creates the ColumnInfo Record and sets it to a default column/width

Returns:
record containing a ColumnInfoRecord
See Also:
ColumnInfoRecord

setColumn

public void setColumn(short column,
                      java.lang.Short xfIndex,
                      java.lang.Short width,
                      java.lang.Integer level,
                      java.lang.Boolean hidden,
                      java.lang.Boolean collapsed)

findColumnIdx

public int findColumnIdx(int column,
                         int fromIdx)

collapseColInfoRecords

public void collapseColInfoRecords(int columnIdx)

groupColumnRange

public void groupColumnRange(short fromColumn,
                             short toColumn,
                             boolean indent)
Creates an outline group for the specified columns.

Parameters:
fromColumn - group from this column (inclusive)
toColumn - group to this column (inclusive)
indent - if true the group will be indented by one level, if false indenting will be removed by one level.


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