Package loci.poi.hssf.record.formula
Class AreaPtg
- java.lang.Object
-
- loci.poi.hssf.record.formula.Ptg
-
- loci.poi.hssf.record.formula.AreaPtg
-
-
Field Summary
Fields Modifier and Type Field Description static short
sid
-
Fields inherited from class loci.poi.hssf.record.formula.Ptg
CLASS_ARRAY, CLASS_REF, CLASS_VALUE, ptgClass
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AreaPtg()
AreaPtg(short firstRow, short lastRow, short firstColumn, short lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative)
AreaPtg(String arearef)
AreaPtg(RecordInputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
clone()
String
getAreaPtgName()
byte
getDefaultOperandClass()
short
getFirstColumn()
short
getFirstColumnRaw()
short
getFirstRow()
short
getLastColumn()
short
getLastColumnRaw()
short
getLastRow()
int
getSize()
boolean
isFirstColRelative()
boolean
isFirstRowRelative()
boolean
isLastColRelative()
boolean
isLastRowRelative()
void
setFirstColRelative(boolean rel)
set whether the first column is relativevoid
setFirstColumn(short column)
set the first column in the areavoid
setFirstColumnRaw(short column)
set the first column irespective of the bitmasksvoid
setFirstRow(short row)
sets the first rowvoid
setFirstRowRelative(boolean rel)
sets the first row to relative or notvoid
setLastColRelative(boolean rel)
set whether the last column should be relative or notvoid
setLastColumn(short column)
set the last column in the areavoid
setLastColumnRaw(short column)
set the last column irrespective of the bitmasksvoid
setLastRow(short row)
void
setLastRowRelative(boolean rel)
set whether the last row is relative or notString
toFormulaString(Workbook book)
return a string representation of this token aloneString
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 loci.poi.hssf.record.formula.Ptg
createParsedExpressionTokens, createPtg, getBytes, getPtgClass, serializePtgStack, setClass, toDebugString
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AreaPtg
protected AreaPtg()
-
AreaPtg
public AreaPtg(String arearef)
-
AreaPtg
public AreaPtg(short firstRow, short lastRow, short firstColumn, short lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative)
-
AreaPtg
public AreaPtg(RecordInputStream in)
-
-
Method Detail
-
getAreaPtgName
public String getAreaPtgName()
-
toString
public 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
-
writeBytes
public void writeBytes(byte[] array, int offset)
Description copied from class:Ptg
write this Ptg to a byte array- Specified by:
writeBytes
in classPtg
-
getFirstRow
public short getFirstRow()
- Returns:
- the first row in the area
-
setFirstRow
public void setFirstRow(short row)
sets the first row- Parameters:
row
- number (0-based)
-
getLastRow
public short getLastRow()
- Returns:
- last row in the range (x2 in x1,y1-x2,y2)
-
setLastRow
public void setLastRow(short row)
- Parameters:
row
- last row number in the area
-
getFirstColumn
public short getFirstColumn()
- Returns:
- the first column number in the area.
-
getFirstColumnRaw
public short getFirstColumnRaw()
- Returns:
- the first column number + the options bit settings unstripped
-
isFirstRowRelative
public boolean isFirstRowRelative()
- Returns:
- whether or not the first row is a relative reference or not.
-
setFirstRowRelative
public void setFirstRowRelative(boolean rel)
sets the first row to relative or not- Parameters:
rel
- is relative or not.
-
isFirstColRelative
public boolean isFirstColRelative()
- Returns:
- isrelative first column to relative or not
-
setFirstColRelative
public void setFirstColRelative(boolean rel)
set whether the first column is relative
-
setFirstColumn
public void setFirstColumn(short column)
set the first column in the area
-
setFirstColumnRaw
public void setFirstColumnRaw(short column)
set the first column irespective of the bitmasks
-
getLastColumn
public short getLastColumn()
- Returns:
- lastcolumn in the area
-
getLastColumnRaw
public short getLastColumnRaw()
- Returns:
- last column and bitmask (the raw field)
-
isLastRowRelative
public boolean isLastRowRelative()
- Returns:
- last row relative or not
-
setLastRowRelative
public void setLastRowRelative(boolean rel)
set whether the last row is relative or not- Parameters:
rel
-true
if the last row relative, elsefalse
-
isLastColRelative
public boolean isLastColRelative()
- Returns:
- lastcol relative or not
-
setLastColRelative
public void setLastColRelative(boolean rel)
set whether the last column should be relative or not
-
setLastColumn
public void setLastColumn(short column)
set the last column in the area
-
setLastColumnRaw
public void setLastColumnRaw(short column)
set the last column irrespective of the bitmasks
-
toFormulaString
public String toFormulaString(Workbook book)
Description copied from class:Ptg
return a string representation of this token alone- Specified by:
toFormulaString
in classPtg
-
getDefaultOperandClass
public byte getDefaultOperandClass()
- Specified by:
getDefaultOperandClass
in classPtg
-
-