org.apache.poi.hssf.util
Class HSSFCellRangeAddress

java.lang.Object
  extended by org.apache.poi.hssf.util.HSSFCellRangeAddress

public class HSSFCellRangeAddress
extends java.lang.Object

Title: HSSFCellRangeAddress

Description: Implementation of the cell range address lists,like is described in OpenOffice.org's Excel Documentation . In BIFF8 there is a common way to store absolute cell range address lists in several records (not formulas). A cell range address list consists of a field with the number of ranges and the list of the range addresses. Each cell range address (called an ADDR structure) contains 4 16-bit-values.

Copyright: Copyright (c) 2004

Company:

Version:
2.0-pre
Author:
Dragos Buleandra (dragos.buleandra@trade2b.ro)

Nested Class Summary
 class HSSFCellRangeAddress.AddrStructure
           
 
Constructor Summary
HSSFCellRangeAddress()
           
HSSFCellRangeAddress(RecordInputStream in)
          Construct a new HSSFCellRangeAddress object and sets its fields appropriately .
 
Method Summary
 int addADDRStructure(short first_row, short first_col, short last_row, short last_col)
          Add an ADDR structure .
 void fillFields(RecordInputStream in)
           
 HSSFCellRangeAddress.AddrStructure getADDRStructureAt(int index)
          return the ADDR structure at the given index.
 short getADDRStructureNumber()
          Get the number of following ADDR structures.
 int getSize()
           
 void removeADDRStructureAt(int index)
          Remove the ADDR structure stored at the passed in index
 int serialize(int offset, byte[] data)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HSSFCellRangeAddress

public HSSFCellRangeAddress()

HSSFCellRangeAddress

public HSSFCellRangeAddress(RecordInputStream in)
Construct a new HSSFCellRangeAddress object and sets its fields appropriately . Even this isn't an Excel record , I kept the same behavior for reading/writing the object's data as for a regular record .

Parameters:
in - the RecordInputstream to read the record from
Method Detail

fillFields

public void fillFields(RecordInputStream in)

getADDRStructureNumber

public short getADDRStructureNumber()
Get the number of following ADDR structures. The number of this structures is automatically set when reading an Excel file and/or increased when you manually add a new ADDR structure . This is the reason there isn't a set method for this field .

Returns:
number of ADDR structures

addADDRStructure

public int addADDRStructure(short first_row,
                            short first_col,
                            short last_row,
                            short last_col)
Add an ADDR structure .

Parameters:
first_row - - the upper left hand corner's row
first_col - - the upper left hand corner's col
last_row - - the lower right hand corner's row
last_col - - the lower right hand corner's col
Returns:
the index of this ADDR structure

removeADDRStructureAt

public void removeADDRStructureAt(int index)
Remove the ADDR structure stored at the passed in index

Parameters:
index - The ADDR structure's index

getADDRStructureAt

public HSSFCellRangeAddress.AddrStructure getADDRStructureAt(int index)
return the ADDR structure at the given index.

Returns:
AddrStructure representing

serialize

public int serialize(int offset,
                     byte[] data)

getSize

public int getSize()


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