| Method from org.apache.cocoon.poi.hssf.record.BlankRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_row = LittleEndian.getShort(data, 0 + offset);
field_2_col = LittleEndian.getShort(data, 2 + offset);
field_3_xf = LittleEndian.getShort(data, 4 + offset);
}
|
public short getColumn() {
return field_2_col;
}
get the column this cell defines within the row |
public short getRow() {
return field_1_row;
}
get the row this cell occurs on |
public short getSid() {
return BlankRecord.sid;
}
return the non static version of the id for this record. |
public short getXFIndex() {
return field_3_xf;
}
get the index of the extended format record to style this cell with |
public boolean isAfter(CellValueRecordInterface i) {
if (this.getRow() < i.getRow())
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() < i.getColumn()))
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()))
{
return false;
}
return true;
}
|
public boolean isBefore(CellValueRecordInterface i) {
if (this.getRow() > i.getRow())
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() > i.getColumn()))
{
return false;
}
if ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()))
{
return false;
}
return true;
}
|
public boolean isEqual(CellValueRecordInterface i) {
return ((this.getRow() == i.getRow())
&& (this.getColumn() == i.getColumn()));
}
|
public boolean isInValueSection() {
return true;
}
|
public boolean isValue() {
return true;
}
|
public byte[] serialize() {
byte[] retval = new byte[ 10 ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2, ( short ) 6);
LittleEndian.putShort(retval, 4, getRow());
LittleEndian.putShort(retval, 6, getColumn());
LittleEndian.putShort(retval, 8, getXFIndex());
return retval;
}
called by the class that is responsible for writing this sucker.
Subclasses should implement this so that their data is passed back in a
byte array. |
public void setColumn(short col) {
field_2_col = col;
}
set the column this cell defines within the row |
public void setRow(short row) {
field_1_row = row;
}
set the row this cell occurs on |
public void setXFIndex(short xf) {
field_3_xf = xf;
}
set the index of the extended format record to style this cell with |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[BLANK]\n");
buffer.append("row = ").append(Integer.toHexString(getRow()))
.append("\n");
buffer.append("col = ").append(Integer.toHexString(getColumn()))
.append("\n");
buffer.append("xf = ")
.append(Integer.toHexString(getXFIndex())).append("\n");
buffer.append("[/BLANK]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A BLANKRECORD!");
}
}
called by constructor, should throw runtime exception in the event of a
record passed with a differing ID. |