Constructors Summary |
---|
protected AreaPtg()
//Required for clone methods
|
public AreaPtg(String arearef)
AreaReference ar = new AreaReference(arearef);
setFirstRow((short)ar.getCells()[0].getRow());
setFirstColumn((short)ar.getCells()[0].getCol());
setLastRow((short)ar.getCells()[1].getRow());
setLastColumn((short)ar.getCells()[1].getCol());
setFirstColRelative(!ar.getCells()[0].isColAbsolute());
setLastColRelative(!ar.getCells()[1].isColAbsolute());
setFirstRowRelative(!ar.getCells()[0].isRowAbsolute());
setLastRowRelative(!ar.getCells()[1].isRowAbsolute());
|
public AreaPtg(short firstRow, short lastRow, short firstColumn, short lastColumn, boolean firstRowRelative, boolean lastRowRelative, boolean firstColRelative, boolean lastColRelative)
setFirstRow(firstRow);
setLastRow(lastRow);
setFirstColumn(firstColumn);
setLastColumn(lastColumn);
setFirstRowRelative(firstRowRelative);
setLastRowRelative(lastRowRelative);
setFirstColRelative(firstColRelative);
setLastColRelative(lastColRelative);
|
public AreaPtg(RecordInputStream in)
field_1_first_row = in.readShort();
field_2_last_row = in.readShort();
field_3_first_column = in.readShort();
field_4_last_column = in.readShort();
//System.out.println(toString());
|
Methods Summary |
---|
public java.lang.Object | clone()
AreaPtg ptg = new AreaPtg();
ptg.field_1_first_row = field_1_first_row;
ptg.field_2_last_row = field_2_last_row;
ptg.field_3_first_column = field_3_first_column;
ptg.field_4_last_column = field_4_last_column;
ptg.setClass(ptgClass);
return ptg;
|
public java.lang.String | getAreaPtgName()
return "AreaPtg";
|
public byte | getDefaultOperandClass()
return Ptg.CLASS_REF;
|
public short | getFirstColumn()
return column.getShortValue(field_3_first_column);
|
public short | getFirstColumnRaw()
return field_3_first_column;
|
public short | getFirstRow()
return field_1_first_row;
|
public short | getLastColumn()
return column.getShortValue(field_4_last_column);
|
public short | getLastColumnRaw()
return field_4_last_column;
|
public short | getLastRow()
return field_2_last_row;
|
public int | getSize()
return SIZE;
|
public boolean | isFirstColRelative()
return colRelative.isSet(field_3_first_column);
|
public boolean | isFirstRowRelative()
return rowRelative.isSet(field_3_first_column);
|
public boolean | isLastColRelative()
return colRelative.isSet(field_4_last_column);
|
public boolean | isLastRowRelative()
return rowRelative.isSet(field_4_last_column);
|
public void | setFirstColRelative(boolean rel)set whether the first column is relative
field_3_first_column=colRelative.setShortBoolean(field_3_first_column,rel);
|
public void | setFirstColumn(short column)set the first column in the area
field_3_first_column = column; // fixme
|
public void | setFirstColumnRaw(short column)set the first column irespective of the bitmasks
field_3_first_column = column;
|
public void | setFirstRow(short row)sets the first row
field_1_first_row = row;
|
public void | setFirstRowRelative(boolean rel)sets the first row to relative or not
field_3_first_column=rowRelative.setShortBoolean(field_3_first_column,rel);
|
public void | setLastColRelative(boolean rel)set whether the last column should be relative or not
field_4_last_column=colRelative.setShortBoolean(field_4_last_column,rel);
|
public void | setLastColumn(short column)set the last column in the area
field_4_last_column = column; // fixme
|
public void | setLastColumnRaw(short column)set the last column irrespective of the bitmasks
field_4_last_column = column;
|
public void | setLastRow(short row)
field_2_last_row = row;
|
public void | setLastRowRelative(boolean rel)set whether the last row is relative or not
field_4_last_column=rowRelative.setShortBoolean(field_4_last_column,rel);
|
public java.lang.String | toFormulaString(org.apache.poi.hssf.model.Workbook book)
return (new CellReference(getFirstRow(),getFirstColumn(),!isFirstRowRelative(),!isFirstColRelative())).toString() + ":" +
(new CellReference(getLastRow(),getLastColumn(),!isLastRowRelative(),!isLastColRelative())).toString();
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append(getAreaPtgName());
buffer.append("\n");
buffer.append("firstRow = " + getFirstRow()).append("\n");
buffer.append("lastRow = " + getLastRow()).append("\n");
buffer.append("firstCol = " + getFirstColumn()).append("\n");
buffer.append("lastCol = " + getLastColumn()).append("\n");
buffer.append("firstColRowRel= "
+ isFirstRowRelative()).append("\n");
buffer.append("lastColRowRel = "
+ isLastRowRelative()).append("\n");
buffer.append("firstColRel = " + isFirstColRelative()).append("\n");
buffer.append("lastColRel = " + isLastColRelative()).append("\n");
return buffer.toString();
|
public void | writeBytes(byte[] array, int offset)
array[offset] = (byte) (sid + ptgClass);
LittleEndian.putShort(array,offset+1,field_1_first_row);
LittleEndian.putShort(array,offset+3,field_2_last_row);
LittleEndian.putShort(array,offset+5,field_3_first_column);
LittleEndian.putShort(array,offset+7,field_4_last_column);
|