org.apache.poi.hssf.record.formula
Class Area3DPtg

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.Ptg
      extended by org.apache.poi.hssf.record.formula.OperandPtg
          extended by org.apache.poi.hssf.record.formula.Area3DPtg
All Implemented Interfaces:
java.lang.Cloneable, AreaI

public final class Area3DPtg
extends OperandPtg
implements AreaI

Title: Area 3D Ptg - 3D reference (Sheet + Area)

Description: Defined a area in Extern Sheet.

REFERENCE:

Version:
1.0-pre
Author:
Libin Roman (Vista Portal LDT. Developer), avik, Jason Height (jheight at chariot dot net dot au)

Field Summary
static byte sid
           
 
Fields inherited from class org.apache.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE
 
Constructor Summary
Area3DPtg()
          Creates new AreaPtg
Area3DPtg(RecordInputStream in)
           
Area3DPtg(short firstRow, short lastRow, short firstColumn, short lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative, short externalSheetIndex)
           
Area3DPtg(java.lang.String arearef, short externIdx)
           
 
Method Summary
 boolean equals(java.lang.Object o)
           
 byte getDefaultOperandClass()
           
 short getExternSheetIndex()
           
 int getFirstColumn()
           
 int getFirstColumnRaw()
           
 int getFirstRow()
           
 int getLastColumn()
           
 int getLastColumnRaw()
           
 int getLastRow()
           
 int getSize()
           
 boolean isFirstColRelative()
           
 boolean isFirstRowRelative()
           
 boolean isLastColRelative()
           
 boolean isLastRowRelative()
           
 void setArea(java.lang.String ref)
           
 void setExternSheetIndex(short index)
           
 void setFirstColRelative(boolean rel)
          set whether the first column is relative
 void setFirstColumn(short column)
           
 void setFirstColumnRaw(short column)
           
 void setFirstRow(int row)
           
 void setFirstRowRelative(boolean rel)
          sets the first row to relative or not
 void setLastColRelative(boolean rel)
          set whether the last column should be relative or not
 void setLastColumn(short column)
           
 void setLastColumnRaw(short column)
           
 void setLastRow(int row)
           
 void setLastRowRelative(boolean rel)
          set whether the last row is relative or not
 java.lang.String toFormulaString(HSSFWorkbook book)
          return a string representation of this token alone
 java.lang.String toString()
          Overridden toString method to ensure object hash is not printed.
 void writeBytes(byte[] array, int offset)
          write this Ptg to a byte array
 
Methods inherited from class org.apache.poi.hssf.record.formula.OperandPtg
isBaseToken
 
Methods inherited from class org.apache.poi.hssf.record.formula.Ptg
clone, copy, createParsedExpressionTokens, createPtg, getBytes, getEncodedSize, getEncodedSize, getPtgClass, readTokens, serializePtgs, serializePtgStack, setClass, toDebugString
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final byte sid
See Also:
Constant Field Values
Constructor Detail

Area3DPtg

public Area3DPtg()
Creates new AreaPtg


Area3DPtg

public Area3DPtg(java.lang.String arearef,
                 short externIdx)

Area3DPtg

public Area3DPtg(RecordInputStream in)

Area3DPtg

public Area3DPtg(short firstRow,
                 short lastRow,
                 short firstColumn,
                 short lastColumn,
                 boolean firstRowRelative,
                 boolean lastRowRelative,
                 boolean firstColRelative,
                 boolean lastColRelative,
                 short externalSheetIndex)
Method Detail

toString

public java.lang.String toString()
Description copied from class: Ptg
Overridden toString method to ensure object hash is not printed. This helps get rid of gratuitous diffs when comparing two dumps Subclasses may output more relevant information by overriding this method

Overrides:
toString in class Ptg

writeBytes

public void writeBytes(byte[] array,
                       int offset)
Description copied from class: Ptg
write this Ptg to a byte array

Specified by:
writeBytes in class Ptg

getSize

public int getSize()
Specified by:
getSize in class Ptg
Returns:
the encoded length of this Ptg, including the initial Ptg type identifier byte.

getExternSheetIndex

public short getExternSheetIndex()

setExternSheetIndex

public void setExternSheetIndex(short index)

getFirstRow

public int getFirstRow()
Specified by:
getFirstRow in interface AreaI
Returns:
the first row in the area

setFirstRow

public void setFirstRow(int row)

getLastRow

public int getLastRow()
Specified by:
getLastRow in interface AreaI
Returns:
last row in the range (x2 in x1,y1-x2,y2)

setLastRow

public void setLastRow(int row)

getFirstColumn

public int getFirstColumn()
Specified by:
getFirstColumn in interface AreaI
Returns:
the first column number in the area.

getFirstColumnRaw

public int getFirstColumnRaw()

isFirstRowRelative

public boolean isFirstRowRelative()
Specified by:
isFirstRowRelative in interface AreaI
Returns:
whether or not the first row is a relative reference or not.

isFirstColRelative

public boolean isFirstColRelative()
Specified by:
isFirstColRelative in interface AreaI
Returns:
isrelative first column to relative or not

setFirstColumn

public void setFirstColumn(short column)

setFirstColumnRaw

public void setFirstColumnRaw(short column)

getLastColumn

public int getLastColumn()
Specified by:
getLastColumn in interface AreaI
Returns:
lastcolumn in the area

getLastColumnRaw

public int getLastColumnRaw()

isLastRowRelative

public boolean isLastRowRelative()
Specified by:
isLastRowRelative in interface AreaI
Returns:
last row relative or not

isLastColRelative

public boolean isLastColRelative()
Specified by:
isLastColRelative in interface AreaI
Returns:
lastcol relative or not

setLastColumn

public void setLastColumn(short column)

setLastColumnRaw

public void setLastColumnRaw(short column)

setFirstRowRelative

public void setFirstRowRelative(boolean rel)
sets the first row to relative or not

Parameters:
rel - FIXME: Document this!

setFirstColRelative

public void setFirstColRelative(boolean rel)
set whether the first column is relative


setLastRowRelative

public void setLastRowRelative(boolean rel)
set whether the last row is relative or not

Parameters:
rel - FIXME: Document this!

setLastColRelative

public void setLastColRelative(boolean rel)
set whether the last column should be relative or not


setArea

public void setArea(java.lang.String ref)

toFormulaString

public java.lang.String toFormulaString(HSSFWorkbook book)
Description copied from class: Ptg
return a string representation of this token alone

Specified by:
toFormulaString in class Ptg
Returns:
text representation of this area reference that can be used in text formulas. The sheet name will get properly delimited if required.

getDefaultOperandClass

public byte getDefaultOperandClass()
Specified by:
getDefaultOperandClass in class Ptg

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


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