Methods Summary |
---|
public java.lang.Object | clone()
RowRecord rec = new RowRecord();
rec.field_1_row_number = field_1_row_number;
rec.field_2_first_col = field_2_first_col;
rec.field_3_last_col = field_3_last_col;
rec.field_4_height = field_4_height;
rec.field_5_optimize = field_5_optimize;
rec.field_6_reserved = field_6_reserved;
rec.field_7_option_flags = field_7_option_flags;
rec.field_8_xf_index = field_8_xf_index;
return rec;
|
public int | compareTo(java.lang.Object obj)
RowRecord loc = ( RowRecord ) obj;
if (this.getRowNumber() == loc.getRowNumber())
{
return 0;
}
if (this.getRowNumber() < loc.getRowNumber())
{
return -1;
}
if (this.getRowNumber() > loc.getRowNumber())
{
return 1;
}
return -1;
|
public boolean | equals(java.lang.Object obj)
if (!(obj instanceof RowRecord))
{
return false;
}
RowRecord loc = ( RowRecord ) obj;
if (this.getRowNumber() == loc.getRowNumber())
{
return true;
}
return false;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
//field_1_row_number = LittleEndian.getShort(data, 0 + offset);
field_1_row_number = in.readUShort();
field_2_first_col = in.readShort();
field_3_last_col = in.readShort();
field_4_height = in.readShort();
field_5_optimize = in.readShort();
field_6_reserved = in.readShort();
field_7_option_flags = in.readShort();
field_8_xf_index = in.readShort();
|
public boolean | getBadFontHeight()get whether the font and row height are not compatible
return badFontHeight.isSet(field_7_option_flags);
|
public boolean | getColapsed()get whether or not to colapse this row
return (colapsed.isSet(field_7_option_flags));
|
public short | getFirstCol()get the logical col number for the first cell this row (0 based index)
return field_2_first_col;
|
public boolean | getFormatted()get whether the row has been formatted (even if its got all blank cells)
return formatted.isSet(field_7_option_flags);
|
public short | getHeight()get the height of the row
return field_4_height;
|
public short | getLastCol()get the logical col number for the last cell this row plus one (0 based index)
return field_3_last_col;
|
public short | getOptimize()get whether to optimize or not (set to 0)
return field_5_optimize;
|
public short | getOptionFlags()gets the option bitmask. (use the individual bit setters that refer to this
method)
return field_7_option_flags;
|
public short | getOutlineLevel()get the outline level of this row
return outlineLevel.getShortValue(field_7_option_flags);
|
public int | getRecordSize()
return 20;
|
public int | getRowNumber()get the logical row number for this row (0 based index)
return field_1_row_number;
|
public short | getSid()
return sid;
|
public short | getXFIndex()if the row is formatted then this is the index to the extended format record
return field_8_xf_index;
|
public boolean | getZeroHeight()get whether or not to display this row with 0 height
return zeroHeight.isSet(field_7_option_flags);
|
public boolean | isInValueSection()
return true;
|
public int | serialize(int offset, byte[] data)
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, ( short ) 16);
//LittleEndian.putShort(data, 4 + offset, getRowNumber());
LittleEndian.putShort(data, 4 + offset, ( short ) getRowNumber());
LittleEndian.putShort(data, 6 + offset, getFirstCol() == -1 ? (short)0 : getFirstCol());
LittleEndian.putShort(data, 8 + offset, getLastCol() == -1 ? (short)0 : getLastCol());
LittleEndian.putShort(data, 10 + offset, getHeight());
LittleEndian.putShort(data, 12 + offset, getOptimize());
LittleEndian.putShort(data, 14 + offset, field_6_reserved);
LittleEndian.putShort(data, 16 + offset, getOptionFlags());
// LittleEndian.putShort(data,18,getOutlineLevel());
LittleEndian.putShort(data, 18 + offset, getXFIndex());
return getRecordSize();
|
public void | setBadFontHeight(boolean f)set whether the font and row height are not compatible
field_7_option_flags =
badFontHeight.setShortBoolean(field_7_option_flags, f);
|
public void | setColapsed(boolean c)set whether or not to colapse this row
field_7_option_flags = colapsed.setShortBoolean(field_7_option_flags,
c);
|
public void | setFirstCol(short col)set the logical col number for the first cell this row (0 based index)
field_2_first_col = col;
|
public void | setFormatted(boolean f)set whether the row has been formatted (even if its got all blank cells)
field_7_option_flags = formatted.setShortBoolean(field_7_option_flags,
f);
|
public void | setHeight(short height)set the height of the row
field_4_height = height;
|
public void | setLastCol(short col)set the logical col number for the last cell this row (0 based index)
field_3_last_col = col;
|
public void | setOptimize(short optimize)set whether to optimize or not (set to 0)
field_5_optimize = optimize;
|
public void | setOptionFlags(short options)sets the option bitmask. (use the individual bit setters that refer to this
method)
field_7_option_flags = options;
|
public void | setOutlineLevel(short ol)set the outline level of this row
field_7_option_flags =
outlineLevel.setShortValue(field_7_option_flags, ol);
|
public void | setRowNumber(int row)set the logical row number for this row (0 based index)
field_1_row_number = row;
|
public void | setXFIndex(short index)if the row is formatted then this is the index to the extended format record
field_8_xf_index = index;
|
public void | setZeroHeight(boolean z)set whether or not to display this row with 0 height
field_7_option_flags =
zeroHeight.setShortBoolean(field_7_option_flags, z);
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[ROW]\n");
buffer.append(" .rownumber = ")
.append(Integer.toHexString(getRowNumber())).append("\n");
buffer.append(" .firstcol = ")
.append(Integer.toHexString(getFirstCol())).append("\n");
buffer.append(" .lastcol = ")
.append(Integer.toHexString(getLastCol())).append("\n");
buffer.append(" .height = ")
.append(Integer.toHexString(getHeight())).append("\n");
buffer.append(" .optimize = ")
.append(Integer.toHexString(getOptimize())).append("\n");
buffer.append(" .reserved = ")
.append(Integer.toHexString(field_6_reserved)).append("\n");
buffer.append(" .optionflags = ")
.append(Integer.toHexString(getOptionFlags())).append("\n");
buffer.append(" .outlinelvl = ")
.append(Integer.toHexString(getOutlineLevel())).append("\n");
buffer.append(" .colapsed = ").append(getColapsed())
.append("\n");
buffer.append(" .zeroheight = ").append(getZeroHeight())
.append("\n");
buffer.append(" .badfontheig= ").append(getBadFontHeight())
.append("\n");
buffer.append(" .formatted = ").append(getFormatted())
.append("\n");
buffer.append(" .xfindex = ")
.append(Integer.toHexString(getXFIndex())).append("\n");
buffer.append("[/ROW]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT A valid ROW RECORD");
}
|