Fields Summary |
---|
public static final short | sid |
private short | field_1_options |
private BitField | reserved1 |
private BitField | HorizontalTextAlignment |
public static final short | HORIZONTAL_TEXT_ALIGNMENT_LEFT_ALIGNED |
public static final short | HORIZONTAL_TEXT_ALIGNMENT_CENTERED |
public static final short | HORIZONTAL_TEXT_ALIGNMENT_RIGHT_ALIGNED |
public static final short | HORIZONTAL_TEXT_ALIGNMENT_JUSTIFIED |
private BitField | VerticalTextAlignment |
public static final short | VERTICAL_TEXT_ALIGNMENT_TOP |
public static final short | VERTICAL_TEXT_ALIGNMENT_CENTER |
public static final short | VERTICAL_TEXT_ALIGNMENT_BOTTOM |
public static final short | VERTICAL_TEXT_ALIGNMENT_JUSTIFY |
private BitField | reserved2 |
private BitField | textLocked |
private BitField | reserved3 |
private short | field_2_textOrientation |
public static final short | TEXT_ORIENTATION_NONE |
public static final short | TEXT_ORIENTATION_TOP_TO_BOTTOM |
public static final short | TEXT_ORIENTATION_ROT_RIGHT |
public static final short | TEXT_ORIENTATION_ROT_LEFT |
private short | field_3_reserved4 |
private short | field_4_reserved5 |
private short | field_5_reserved6 |
private short | field_6_textLength |
private short | field_7_formattingRunLength |
private int | field_8_reserved7 |
Methods Summary |
---|
public java.lang.Object | clone()
TextObjectBaseRecord rec = new TextObjectBaseRecord();
rec.field_1_options = field_1_options;
rec.field_2_textOrientation = field_2_textOrientation;
rec.field_3_reserved4 = field_3_reserved4;
rec.field_4_reserved5 = field_4_reserved5;
rec.field_5_reserved6 = field_5_reserved6;
rec.field_6_textLength = field_6_textLength;
rec.field_7_formattingRunLength = field_7_formattingRunLength;
rec.field_8_reserved7 = field_8_reserved7;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_options = in.readShort();
field_2_textOrientation = in.readShort();
field_3_reserved4 = in.readShort();
field_4_reserved5 = in.readShort();
field_5_reserved6 = in.readShort();
field_6_textLength = in.readShort();
field_7_formattingRunLength = in.readShort();
field_8_reserved7 = in.readInt();
|
public short | getFormattingRunLength()Get the formatting run length field for the TextObjectBase record.
return field_7_formattingRunLength;
|
public short | getHorizontalTextAlignment()
return HorizontalTextAlignment.getShortValue(field_1_options);
|
public short | getOptions()Get the options field for the TextObjectBase record.
return field_1_options;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 2 + 2 + 2 + 2 + 2 + 2 + 2 + 4;
|
public short | getReserved2()
return reserved2.getShortValue(field_1_options);
|
public short | getReserved3()
return reserved3.getShortValue(field_1_options);
|
public short | getReserved4()Get the reserved4 field for the TextObjectBase record.
return field_3_reserved4;
|
public short | getReserved5()Get the reserved5 field for the TextObjectBase record.
return field_4_reserved5;
|
public short | getReserved6()Get the reserved6 field for the TextObjectBase record.
return field_5_reserved6;
|
public int | getReserved7()Get the reserved7 field for the TextObjectBase record.
return field_8_reserved7;
|
public short | getSid()
return sid;
|
public short | getTextLength()Get the text length field for the TextObjectBase record.
return field_6_textLength;
|
public short | getTextOrientation()Get the text orientation field for the TextObjectBase record.
return field_2_textOrientation;
|
public short | getVerticalTextAlignment()
return VerticalTextAlignment.getShortValue(field_1_options);
|
public boolean | isReserved1()reserved field
return reserved1.isSet(field_1_options);
|
public boolean | isTextLocked()Text has been locked
return textLocked.isSet(field_1_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_options);
LittleEndian.putShort(data, 6 + offset + pos, field_2_textOrientation);
LittleEndian.putShort(data, 8 + offset + pos, field_3_reserved4);
LittleEndian.putShort(data, 10 + offset + pos, field_4_reserved5);
LittleEndian.putShort(data, 12 + offset + pos, field_5_reserved6);
LittleEndian.putShort(data, 14 + offset + pos, field_6_textLength);
LittleEndian.putShort(data, 16 + offset + pos, field_7_formattingRunLength);
LittleEndian.putInt(data, 18 + offset + pos, field_8_reserved7);
return getRecordSize();
|
public void | setFormattingRunLength(short field_7_formattingRunLength)Set the formatting run length field for the TextObjectBase record.
this.field_7_formattingRunLength = field_7_formattingRunLength;
|
public void | setHorizontalTextAlignment(short value)Sets the Horizontal text alignment field value.
field_1_options = HorizontalTextAlignment.setShortValue(field_1_options, value);
|
public void | setOptions(short field_1_options)Set the options field for the TextObjectBase record.
this.field_1_options = field_1_options;
|
public void | setReserved1(boolean value)Sets the reserved1 field value.
reserved field
field_1_options = reserved1.setShortBoolean(field_1_options, value);
|
public void | setReserved2(short value)Sets the reserved2 field value.
field_1_options = reserved2.setShortValue(field_1_options, value);
|
public void | setReserved3(short value)Sets the reserved3 field value.
field_1_options = reserved3.setShortValue(field_1_options, value);
|
public void | setReserved4(short field_3_reserved4)Set the reserved4 field for the TextObjectBase record.
this.field_3_reserved4 = field_3_reserved4;
|
public void | setReserved5(short field_4_reserved5)Set the reserved5 field for the TextObjectBase record.
this.field_4_reserved5 = field_4_reserved5;
|
public void | setReserved6(short field_5_reserved6)Set the reserved6 field for the TextObjectBase record.
this.field_5_reserved6 = field_5_reserved6;
|
public void | setReserved7(int field_8_reserved7)Set the reserved7 field for the TextObjectBase record.
this.field_8_reserved7 = field_8_reserved7;
|
public void | setTextLength(short field_6_textLength)Set the text length field for the TextObjectBase record.
this.field_6_textLength = field_6_textLength;
|
public void | setTextLocked(boolean value)Sets the text locked field value.
Text has been locked
field_1_options = textLocked.setShortBoolean(field_1_options, value);
|
public void | setTextOrientation(short field_2_textOrientation)Set the text orientation field for the TextObjectBase record.
this.field_2_textOrientation = field_2_textOrientation;
|
public void | setVerticalTextAlignment(short value)Sets the Vertical text alignment field value.
field_1_options = VerticalTextAlignment.setShortValue(field_1_options, value);
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[TXO]\n");
buffer.append(" .options = ")
.append("0x").append(HexDump.toHex( getOptions ()))
.append(" (").append( getOptions() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .reserved1 = ").append(isReserved1()).append('\n");
buffer.append(" .HorizontalTextAlignment = ").append(getHorizontalTextAlignment()).append('\n");
buffer.append(" .VerticalTextAlignment = ").append(getVerticalTextAlignment()).append('\n");
buffer.append(" .reserved2 = ").append(getReserved2()).append('\n");
buffer.append(" .textLocked = ").append(isTextLocked()).append('\n");
buffer.append(" .reserved3 = ").append(getReserved3()).append('\n");
buffer.append(" .textOrientation = ")
.append("0x").append(HexDump.toHex( getTextOrientation ()))
.append(" (").append( getTextOrientation() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .reserved4 = ")
.append("0x").append(HexDump.toHex( getReserved4 ()))
.append(" (").append( getReserved4() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .reserved5 = ")
.append("0x").append(HexDump.toHex( getReserved5 ()))
.append(" (").append( getReserved5() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .reserved6 = ")
.append("0x").append(HexDump.toHex( getReserved6 ()))
.append(" (").append( getReserved6() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .textLength = ")
.append("0x").append(HexDump.toHex( getTextLength ()))
.append(" (").append( getTextLength() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .formattingRunLength = ")
.append("0x").append(HexDump.toHex( getFormattingRunLength ()))
.append(" (").append( getFormattingRunLength() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .reserved7 = ")
.append("0x").append(HexDump.toHex( getReserved7 ()))
.append(" (").append( getReserved7() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/TXO]\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 TextObjectBase record");
}
|