Methods Summary |
---|
public java.lang.Object | clone()
TickRecord rec = new TickRecord();
rec.field_1_majorTickType = field_1_majorTickType;
rec.field_2_minorTickType = field_2_minorTickType;
rec.field_3_labelPosition = field_3_labelPosition;
rec.field_4_background = field_4_background;
rec.field_5_labelColorRgb = field_5_labelColorRgb;
rec.field_6_zero1 = field_6_zero1;
rec.field_7_zero2 = field_7_zero2;
rec.field_8_zero3 = field_8_zero3;
rec.field_9_zero4 = field_9_zero4;
rec.field_10_options = field_10_options;
rec.field_11_tickColor = field_11_tickColor;
rec.field_12_zero5 = field_12_zero5;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_majorTickType = in.readByte();
field_2_minorTickType = in.readByte();
field_3_labelPosition = in.readByte();
field_4_background = in.readByte();
field_5_labelColorRgb = in.readInt();
field_6_zero1 = in.readInt();
field_7_zero2 = in.readInt();
field_8_zero3 = in.readInt();
field_9_zero4 = in.readInt();
field_10_options = in.readShort();
field_11_tickColor = in.readShort();
field_12_zero5 = in.readShort();
|
public byte | getBackground()Get the background field for the Tick record.
return field_4_background;
|
public int | getLabelColorRgb()Get the label color rgb field for the Tick record.
return field_5_labelColorRgb;
|
public byte | getLabelPosition()Get the label position field for the Tick record.
return field_3_labelPosition;
|
public byte | getMajorTickType()Get the major tick type field for the Tick record.
return field_1_majorTickType;
|
public byte | getMinorTickType()Get the minor tick type field for the Tick record.
return field_2_minorTickType;
|
public short | getOptions()Get the options field for the Tick record.
return field_10_options;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 1 + 1 + 1 + 1 + 4 + 8 + 8 + 2 + 2 + 2;
|
public short | getRotation()rotate text (0=none, 1=normal, 2=90 degrees counterclockwise, 3=90 degrees clockwise)
return rotation.getShortValue(field_10_options);
|
public short | getSid()
return sid;
|
public short | getTickColor()Get the tick color field for the Tick record.
return field_11_tickColor;
|
public int | getZero1()Get the zero 1 field for the Tick record.
return field_6_zero1;
|
public int | getZero2()Get the zero 2 field for the Tick record.
return field_7_zero2;
|
public short | getZero3()Get the zero 3 field for the Tick record.
return field_12_zero5;
|
public boolean | isAutoTextBackground()use the quote unquote automatic color for text background
return autoTextBackground.isSet(field_10_options);
|
public boolean | isAutoTextColor()use the quote unquote automatic color for text
return autoTextColor.isSet(field_10_options);
|
public boolean | isAutorotate()automatically rotate the text
return autorotate.isSet(field_10_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));
data[ 4 + offset + pos ] = field_1_majorTickType;
data[ 5 + offset + pos ] = field_2_minorTickType;
data[ 6 + offset + pos ] = field_3_labelPosition;
data[ 7 + offset + pos ] = field_4_background;
LittleEndian.putInt(data, 8 + offset + pos, field_5_labelColorRgb);
LittleEndian.putInt(data, 12 + offset + pos, field_6_zero1);
LittleEndian.putInt(data, 16 + offset + pos, field_7_zero2);
LittleEndian.putInt(data, 20 + offset + pos, field_8_zero3);
LittleEndian.putInt(data, 24 + offset + pos, field_9_zero4);
LittleEndian.putShort(data, 28 + offset + pos, field_10_options);
LittleEndian.putShort(data, 30 + offset + pos, field_11_tickColor);
LittleEndian.putShort(data, 32 + offset + pos, field_12_zero5);
return getRecordSize();
|
public void | setAutoTextBackground(boolean value)Sets the auto text background field value.
use the quote unquote automatic color for text background
field_10_options = autoTextBackground.setShortBoolean(field_10_options, value);
|
public void | setAutoTextColor(boolean value)Sets the auto text color field value.
use the quote unquote automatic color for text
field_10_options = autoTextColor.setShortBoolean(field_10_options, value);
|
public void | setAutorotate(boolean value)Sets the autorotate field value.
automatically rotate the text
field_10_options = autorotate.setShortBoolean(field_10_options, value);
|
public void | setBackground(byte field_4_background)Set the background field for the Tick record.
this.field_4_background = field_4_background;
|
public void | setLabelColorRgb(int field_5_labelColorRgb)Set the label color rgb field for the Tick record.
this.field_5_labelColorRgb = field_5_labelColorRgb;
|
public void | setLabelPosition(byte field_3_labelPosition)Set the label position field for the Tick record.
this.field_3_labelPosition = field_3_labelPosition;
|
public void | setMajorTickType(byte field_1_majorTickType)Set the major tick type field for the Tick record.
this.field_1_majorTickType = field_1_majorTickType;
|
public void | setMinorTickType(byte field_2_minorTickType)Set the minor tick type field for the Tick record.
this.field_2_minorTickType = field_2_minorTickType;
|
public void | setOptions(short field_10_options)Set the options field for the Tick record.
this.field_10_options = field_10_options;
|
public void | setRotation(short value)Sets the rotation field value.
rotate text (0=none, 1=normal, 2=90 degrees counterclockwise, 3=90 degrees clockwise)
field_10_options = rotation.setShortValue(field_10_options, value);
|
public void | setTickColor(short field_11_tickColor)Set the tick color field for the Tick record.
this.field_11_tickColor = field_11_tickColor;
|
public void | setZero1(int field_6_zero1)Set the zero 1 field for the Tick record.
this.field_6_zero1 = field_6_zero1;
|
public void | setZero2(int field_7_zero2)Set the zero 2 field for the Tick record.
this.field_7_zero2 = field_7_zero2;
|
public void | setZero3(short field_12_zero3)Set the zero 3 field for the Tick record.
this.field_12_zero5 = field_12_zero3;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[TICK]\n");
buffer.append(" .majorTickType = ")
.append("0x").append(HexDump.toHex( getMajorTickType ()))
.append(" (").append( getMajorTickType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .minorTickType = ")
.append("0x").append(HexDump.toHex( getMinorTickType ()))
.append(" (").append( getMinorTickType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .labelPosition = ")
.append("0x").append(HexDump.toHex( getLabelPosition ()))
.append(" (").append( getLabelPosition() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .background = ")
.append("0x").append(HexDump.toHex( getBackground ()))
.append(" (").append( getBackground() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .labelColorRgb = ")
.append("0x").append(HexDump.toHex( getLabelColorRgb ()))
.append(" (").append( getLabelColorRgb() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .zero1 = ")
.append("0x").append(HexDump.toHex( getZero1 ()))
.append(" (").append( getZero1() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .zero2 = ")
.append("0x").append(HexDump.toHex( getZero2 ()))
.append(" (").append( getZero2() ).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(" .autoTextColor = ").append(isAutoTextColor()).append('\n");
buffer.append(" .autoTextBackground = ").append(isAutoTextBackground()).append('\n");
buffer.append(" .rotation = ").append(getRotation()).append('\n");
buffer.append(" .autorotate = ").append(isAutorotate()).append('\n");
buffer.append(" .tickColor = ")
.append("0x").append(HexDump.toHex( getTickColor ()))
.append(" (").append( getTickColor() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .zero3 = ")
.append("0x").append(HexDump.toHex( getZero3 ()))
.append(" (").append( getZero3() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/TICK]\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 Tick record");
}
|