Fields Summary |
---|
public static final short | sid |
private byte | field_1_horizontalAlignment |
public static final byte | HORIZONTAL_ALIGNMENT_LEFT |
public static final byte | HORIZONTAL_ALIGNMENT_CENTER |
public static final byte | HORIZONTAL_ALIGNMENT_BOTTOM |
public static final byte | HORIZONTAL_ALIGNMENT_JUSTIFY |
private byte | field_2_verticalAlignment |
public static final byte | VERTICAL_ALIGNMENT_TOP |
public static final byte | VERTICAL_ALIGNMENT_CENTER |
public static final byte | VERTICAL_ALIGNMENT_BOTTOM |
public static final byte | VERTICAL_ALIGNMENT_JUSTIFY |
private short | field_3_displayMode |
public static final short | DISPLAY_MODE_TRANSPARENT |
public static final short | DISPLAY_MODE_OPAQUE |
private int | field_4_rgbColor |
private int | field_5_x |
private int | field_6_y |
private int | field_7_width |
private int | field_8_height |
private short | field_9_options1 |
private BitField | autoColor |
private BitField | showKey |
private BitField | showValue |
private BitField | vertical |
private BitField | autoGeneratedText |
private BitField | generated |
private BitField | autoLabelDeleted |
private BitField | autoBackground |
private BitField | rotation |
public static final short | ROTATION_NONE |
public static final short | ROTATION_TOP_TO_BOTTOM |
public static final short | ROTATION_ROTATED_90_DEGREES |
public static final short | ROTATION_ROTATED_90_DEGREES_CLOCKWISE |
private BitField | showCategoryLabelAsPercentage |
private BitField | showValueAsPercentage |
private BitField | showBubbleSizes |
private BitField | showLabel |
private short | field_10_indexOfColorValue |
private short | field_11_options2 |
private BitField | dataLabelPlacement |
public static final short | DATA_LABEL_PLACEMENT_CHART_DEPENDENT |
public static final short | DATA_LABEL_PLACEMENT_OUTSIDE |
public static final short | DATA_LABEL_PLACEMENT_INSIDE |
public static final short | DATA_LABEL_PLACEMENT_CENTER |
public static final short | DATA_LABEL_PLACEMENT_AXIS |
public static final short | DATA_LABEL_PLACEMENT_ABOVE |
public static final short | DATA_LABEL_PLACEMENT_BELOW |
public static final short | DATA_LABEL_PLACEMENT_LEFT |
public static final short | DATA_LABEL_PLACEMENT_RIGHT |
public static final short | DATA_LABEL_PLACEMENT_AUTO |
public static final short | DATA_LABEL_PLACEMENT_USER_MOVED |
private short | field_12_textRotation |
Methods Summary |
---|
public java.lang.Object | clone()
TextRecord rec = new TextRecord();
rec.field_1_horizontalAlignment = field_1_horizontalAlignment;
rec.field_2_verticalAlignment = field_2_verticalAlignment;
rec.field_3_displayMode = field_3_displayMode;
rec.field_4_rgbColor = field_4_rgbColor;
rec.field_5_x = field_5_x;
rec.field_6_y = field_6_y;
rec.field_7_width = field_7_width;
rec.field_8_height = field_8_height;
rec.field_9_options1 = field_9_options1;
rec.field_10_indexOfColorValue = field_10_indexOfColorValue;
rec.field_11_options2 = field_11_options2;
rec.field_12_textRotation = field_12_textRotation;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_horizontalAlignment = in.readByte();
field_2_verticalAlignment = in.readByte();
field_3_displayMode = in.readShort();
field_4_rgbColor = in.readInt();
field_5_x = in.readInt();
field_6_y = in.readInt();
field_7_width = in.readInt();
field_8_height = in.readInt();
field_9_options1 = in.readShort();
field_10_indexOfColorValue = in.readShort();
field_11_options2 = in.readShort();
field_12_textRotation = in.readShort();
|
public short | getDataLabelPlacement()
return dataLabelPlacement.getShortValue(field_11_options2);
|
public short | getDisplayMode()Get the display mode field for the Text record.
return field_3_displayMode;
|
public int | getHeight()Get the height field for the Text record.
return field_8_height;
|
public byte | getHorizontalAlignment()Get the horizontal alignment field for the Text record.
return field_1_horizontalAlignment;
|
public short | getIndexOfColorValue()Get the index of color value field for the Text record.
return field_10_indexOfColorValue;
|
public short | getOptions1()Get the options1 field for the Text record.
return field_9_options1;
|
public short | getOptions2()Get the options2 field for the Text record.
return field_11_options2;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 1 + 1 + 2 + 4 + 4 + 4 + 4 + 4 + 2 + 2 + 2 + 2;
|
public int | getRgbColor()Get the rgbColor field for the Text record.
return field_4_rgbColor;
|
public short | getRotation()
return rotation.getShortValue(field_9_options1);
|
public short | getSid()
return sid;
|
public short | getTextRotation()Get the text rotation field for the Text record.
return field_12_textRotation;
|
public byte | getVerticalAlignment()Get the vertical alignment field for the Text record.
return field_2_verticalAlignment;
|
public int | getWidth()Get the width field for the Text record.
return field_7_width;
|
public int | getX()Get the x field for the Text record.
return field_5_x;
|
public int | getY()Get the y field for the Text record.
return field_6_y;
|
public boolean | isAutoBackground()
return autoBackground.isSet(field_9_options1);
|
public boolean | isAutoColor()true = automaticly selected colour, false = user-selected
return autoColor.isSet(field_9_options1);
|
public boolean | isAutoGeneratedText()
return autoGeneratedText.isSet(field_9_options1);
|
public boolean | isAutoLabelDeleted()
return autoLabelDeleted.isSet(field_9_options1);
|
public boolean | isGenerated()
return generated.isSet(field_9_options1);
|
public boolean | isShowBubbleSizes()
return showBubbleSizes.isSet(field_9_options1);
|
public boolean | isShowCategoryLabelAsPercentage()
return showCategoryLabelAsPercentage.isSet(field_9_options1);
|
public boolean | isShowKey()true = draw legend
return showKey.isSet(field_9_options1);
|
public boolean | isShowLabel()
return showLabel.isSet(field_9_options1);
|
public boolean | isShowValue()false = text is category label
return showValue.isSet(field_9_options1);
|
public boolean | isShowValueAsPercentage()
return showValueAsPercentage.isSet(field_9_options1);
|
public boolean | isVertical()true = text is vertical
return vertical.isSet(field_9_options1);
|
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_horizontalAlignment;
data[ 5 + offset + pos ] = field_2_verticalAlignment;
LittleEndian.putShort(data, 6 + offset + pos, field_3_displayMode);
LittleEndian.putInt(data, 8 + offset + pos, field_4_rgbColor);
LittleEndian.putInt(data, 12 + offset + pos, field_5_x);
LittleEndian.putInt(data, 16 + offset + pos, field_6_y);
LittleEndian.putInt(data, 20 + offset + pos, field_7_width);
LittleEndian.putInt(data, 24 + offset + pos, field_8_height);
LittleEndian.putShort(data, 28 + offset + pos, field_9_options1);
LittleEndian.putShort(data, 30 + offset + pos, field_10_indexOfColorValue);
LittleEndian.putShort(data, 32 + offset + pos, field_11_options2);
LittleEndian.putShort(data, 34 + offset + pos, field_12_textRotation);
return getRecordSize();
|
public void | setAutoBackground(boolean value)Sets the auto background field value.
field_9_options1 = autoBackground.setShortBoolean(field_9_options1, value);
|
public void | setAutoColor(boolean value)Sets the auto color field value.
true = automaticly selected colour, false = user-selected
field_9_options1 = autoColor.setShortBoolean(field_9_options1, value);
|
public void | setAutoGeneratedText(boolean value)Sets the auto generated text field value.
field_9_options1 = autoGeneratedText.setShortBoolean(field_9_options1, value);
|
public void | setAutoLabelDeleted(boolean value)Sets the auto label deleted field value.
field_9_options1 = autoLabelDeleted.setShortBoolean(field_9_options1, value);
|
public void | setDataLabelPlacement(short value)Sets the data label placement field value.
field_11_options2 = dataLabelPlacement.setShortValue(field_11_options2, value);
|
public void | setDisplayMode(short field_3_displayMode)Set the display mode field for the Text record.
this.field_3_displayMode = field_3_displayMode;
|
public void | setGenerated(boolean value)Sets the generated field value.
field_9_options1 = generated.setShortBoolean(field_9_options1, value);
|
public void | setHeight(int field_8_height)Set the height field for the Text record.
this.field_8_height = field_8_height;
|
public void | setHorizontalAlignment(byte field_1_horizontalAlignment)Set the horizontal alignment field for the Text record.
this.field_1_horizontalAlignment = field_1_horizontalAlignment;
|
public void | setIndexOfColorValue(short field_10_indexOfColorValue)Set the index of color value field for the Text record.
this.field_10_indexOfColorValue = field_10_indexOfColorValue;
|
public void | setOptions1(short field_9_options1)Set the options1 field for the Text record.
this.field_9_options1 = field_9_options1;
|
public void | setOptions2(short field_11_options2)Set the options2 field for the Text record.
this.field_11_options2 = field_11_options2;
|
public void | setRgbColor(int field_4_rgbColor)Set the rgbColor field for the Text record.
this.field_4_rgbColor = field_4_rgbColor;
|
public void | setRotation(short value)Sets the rotation field value.
field_9_options1 = rotation.setShortValue(field_9_options1, value);
|
public void | setShowBubbleSizes(boolean value)Sets the show bubble sizes field value.
field_9_options1 = showBubbleSizes.setShortBoolean(field_9_options1, value);
|
public void | setShowCategoryLabelAsPercentage(boolean value)Sets the show category label as percentage field value.
field_9_options1 = showCategoryLabelAsPercentage.setShortBoolean(field_9_options1, value);
|
public void | setShowKey(boolean value)Sets the show key field value.
true = draw legend
field_9_options1 = showKey.setShortBoolean(field_9_options1, value);
|
public void | setShowLabel(boolean value)Sets the show label field value.
field_9_options1 = showLabel.setShortBoolean(field_9_options1, value);
|
public void | setShowValue(boolean value)Sets the show value field value.
false = text is category label
field_9_options1 = showValue.setShortBoolean(field_9_options1, value);
|
public void | setShowValueAsPercentage(boolean value)Sets the show value as percentage field value.
field_9_options1 = showValueAsPercentage.setShortBoolean(field_9_options1, value);
|
public void | setTextRotation(short field_12_textRotation)Set the text rotation field for the Text record.
this.field_12_textRotation = field_12_textRotation;
|
public void | setVertical(boolean value)Sets the vertical field value.
true = text is vertical
field_9_options1 = vertical.setShortBoolean(field_9_options1, value);
|
public void | setVerticalAlignment(byte field_2_verticalAlignment)Set the vertical alignment field for the Text record.
this.field_2_verticalAlignment = field_2_verticalAlignment;
|
public void | setWidth(int field_7_width)Set the width field for the Text record.
this.field_7_width = field_7_width;
|
public void | setX(int field_5_x)Set the x field for the Text record.
this.field_5_x = field_5_x;
|
public void | setY(int field_6_y)Set the y field for the Text record.
this.field_6_y = field_6_y;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[TEXT]\n");
buffer.append(" .horizontalAlignment = ")
.append("0x").append(HexDump.toHex( getHorizontalAlignment ()))
.append(" (").append( getHorizontalAlignment() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .verticalAlignment = ")
.append("0x").append(HexDump.toHex( getVerticalAlignment ()))
.append(" (").append( getVerticalAlignment() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .displayMode = ")
.append("0x").append(HexDump.toHex( getDisplayMode ()))
.append(" (").append( getDisplayMode() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .rgbColor = ")
.append("0x").append(HexDump.toHex( getRgbColor ()))
.append(" (").append( getRgbColor() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .x = ")
.append("0x").append(HexDump.toHex( getX ()))
.append(" (").append( getX() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .y = ")
.append("0x").append(HexDump.toHex( getY ()))
.append(" (").append( getY() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .width = ")
.append("0x").append(HexDump.toHex( getWidth ()))
.append(" (").append( getWidth() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .height = ")
.append("0x").append(HexDump.toHex( getHeight ()))
.append(" (").append( getHeight() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .options1 = ")
.append("0x").append(HexDump.toHex( getOptions1 ()))
.append(" (").append( getOptions1() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .autoColor = ").append(isAutoColor()).append('\n");
buffer.append(" .showKey = ").append(isShowKey()).append('\n");
buffer.append(" .showValue = ").append(isShowValue()).append('\n");
buffer.append(" .vertical = ").append(isVertical()).append('\n");
buffer.append(" .autoGeneratedText = ").append(isAutoGeneratedText()).append('\n");
buffer.append(" .generated = ").append(isGenerated()).append('\n");
buffer.append(" .autoLabelDeleted = ").append(isAutoLabelDeleted()).append('\n");
buffer.append(" .autoBackground = ").append(isAutoBackground()).append('\n");
buffer.append(" .rotation = ").append(getRotation()).append('\n");
buffer.append(" .showCategoryLabelAsPercentage = ").append(isShowCategoryLabelAsPercentage()).append('\n");
buffer.append(" .showValueAsPercentage = ").append(isShowValueAsPercentage()).append('\n");
buffer.append(" .showBubbleSizes = ").append(isShowBubbleSizes()).append('\n");
buffer.append(" .showLabel = ").append(isShowLabel()).append('\n");
buffer.append(" .indexOfColorValue = ")
.append("0x").append(HexDump.toHex( getIndexOfColorValue ()))
.append(" (").append( getIndexOfColorValue() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .options2 = ")
.append("0x").append(HexDump.toHex( getOptions2 ()))
.append(" (").append( getOptions2() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .dataLabelPlacement = ").append(getDataLabelPlacement()).append('\n");
buffer.append(" .textRotation = ")
.append("0x").append(HexDump.toHex( getTextRotation ()))
.append(" (").append( getTextRotation() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/TEXT]\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 Text record");
}
|