Methods Summary |
---|
public java.lang.Object | clone()
ReferencePtg ptg = new ReferencePtg();
ptg.field_1_row = field_1_row;
ptg.field_2_col = field_2_col;
ptg.setClass(ptgClass);
return ptg;
|
public short | getColumn()
return column.getShortValue(field_2_col);
|
public short | getColumnRaw()
return field_2_col;
|
public byte | getDefaultOperandClass()
return Ptg.CLASS_REF;
|
public java.lang.String | getRefPtgName()
return "ReferencePtg";
|
public short | getRow()
return field_1_row;
|
public int | getSize()
return SIZE;
|
public boolean | isColRelative()
return colRelative.isSet(field_2_col);
|
public boolean | isRowRelative()
return rowRelative.isSet(field_2_col);
|
public void | setColRelative(boolean rel)
field_2_col=colRelative.setShortBoolean(field_2_col,rel);
|
public void | setColumn(short col)
field_2_col = column.setShortValue(field_2_col, col);
|
public void | setColumnRaw(short col)
field_2_col = col;
|
public void | setRow(short row)
field_1_row = row;
|
public void | setRowRelative(boolean rel)
field_2_col=rowRelative.setShortBoolean(field_2_col,rel);
|
public java.lang.String | toFormulaString(org.apache.poi.hssf.model.Workbook book)
//TODO -- should we store a cellreference instance in this ptg?? but .. memory is an issue, i believe!
return (new CellReference(getRow(),getColumn(),!isRowRelative(),!isColRelative())).toString();
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer("[");
buffer.append(getRefPtgName());
buffer.append("]\n");
buffer.append("row = ").append(getRow()).append("\n");
buffer.append("col = ").append(getColumn()).append("\n");
buffer.append("rowrelative = ").append(isRowRelative()).append("\n");
buffer.append("colrelative = ").append(isColRelative()).append("\n");
return buffer.toString();
|
public void | writeBytes(byte[] array, int offset)
array[offset] = (byte) (sid + ptgClass);
LittleEndian.putShort(array,offset+1,field_1_row);
LittleEndian.putShort(array,offset+3,field_2_col);
|