Methods Summary |
---|
public java.lang.Object | clone()
FrameRecord rec = new FrameRecord();
rec.field_1_borderType = field_1_borderType;
rec.field_2_options = field_2_options;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_borderType = in.readShort();
field_2_options = in.readShort();
|
public short | getBorderType()Get the border type field for the Frame record.
return field_1_borderType;
|
public short | getOptions()Get the options field for the Frame record.
return field_2_options;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 2 + 2;
|
public short | getSid()
return sid;
|
public boolean | isAutoPosition()excel calculates the position automatically
return autoPosition.isSet(field_2_options);
|
public boolean | isAutoSize()excel calculates the size automatically if true
return autoSize.isSet(field_2_options);
|
public int | serialize(int offset, byte[] data)
int pos = 0;
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));
LittleEndian.putShort(data, 4 + offset + pos, field_1_borderType);
LittleEndian.putShort(data, 6 + offset + pos, field_2_options);
return getRecordSize();
|
public void | setAutoPosition(boolean value)Sets the auto position field value.
excel calculates the position automatically
field_2_options = autoPosition.setShortBoolean(field_2_options, value);
|
public void | setAutoSize(boolean value)Sets the auto size field value.
excel calculates the size automatically if true
field_2_options = autoSize.setShortBoolean(field_2_options, value);
|
public void | setBorderType(short field_1_borderType)Set the border type field for the Frame record.
this.field_1_borderType = field_1_borderType;
|
public void | setOptions(short field_2_options)Set the options field for the Frame record.
this.field_2_options = field_2_options;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[FRAME]\n");
buffer.append(" .borderType = ")
.append("0x").append(HexDump.toHex( getBorderType ()))
.append(" (").append( getBorderType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .options = ")
.append("0x").append(HexDump.toHex( getOptions ()))
.append(" (").append( getOptions() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .autoSize = ").append(isAutoSize()).append('\n");
buffer.append(" .autoPosition = ").append(isAutoPosition()).append('\n");
buffer.append("[/FRAME]\n");
return buffer.toString();
|
protected void | validateSid(short id)Checks the sid matches the expected side for this record
if (id != sid)
{
throw new RecordFormatException("Not a Frame record");
}
|