Fields Summary |
---|
public static final short | sid |
private int | field_1_lineColor |
private short | field_2_linePattern |
public static final short | LINE_PATTERN_SOLID |
public static final short | LINE_PATTERN_DASH |
public static final short | LINE_PATTERN_DOT |
public static final short | LINE_PATTERN_DASH_DOT |
public static final short | LINE_PATTERN_DASH_DOT_DOT |
public static final short | LINE_PATTERN_NONE |
public static final short | LINE_PATTERN_DARK_GRAY_PATTERN |
public static final short | LINE_PATTERN_MEDIUM_GRAY_PATTERN |
public static final short | LINE_PATTERN_LIGHT_GRAY_PATTERN |
private short | field_3_weight |
public static final short | WEIGHT_HAIRLINE |
public static final short | WEIGHT_NARROW |
public static final short | WEIGHT_MEDIUM |
public static final short | WEIGHT_WIDE |
private short | field_4_format |
private BitField | auto |
private BitField | drawTicks |
private BitField | unknown |
private short | field_5_colourPaletteIndex |
Methods Summary |
---|
public java.lang.Object | clone()
LineFormatRecord rec = new LineFormatRecord();
rec.field_1_lineColor = field_1_lineColor;
rec.field_2_linePattern = field_2_linePattern;
rec.field_3_weight = field_3_weight;
rec.field_4_format = field_4_format;
rec.field_5_colourPaletteIndex = field_5_colourPaletteIndex;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_lineColor = in.readInt();
field_2_linePattern = in.readShort();
field_3_weight = in.readShort();
field_4_format = in.readShort();
field_5_colourPaletteIndex = in.readShort();
|
public short | getColourPaletteIndex()Get the colour palette index field for the LineFormat record.
return field_5_colourPaletteIndex;
|
public short | getFormat()Get the format field for the LineFormat record.
return field_4_format;
|
public int | getLineColor()Get the line color field for the LineFormat record.
return field_1_lineColor;
|
public short | getLinePattern()Get the line pattern field for the LineFormat record.
return field_2_linePattern;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 4 + 2 + 2 + 2 + 2;
|
public short | getSid()
return sid;
|
public short | getWeight()Get the weight field for the LineFormat record.
return field_3_weight;
|
public boolean | isAuto()automatic format
return auto.isSet(field_4_format);
|
public boolean | isDrawTicks()draw tick marks
return drawTicks.isSet(field_4_format);
|
public boolean | isUnknown()book marks this as reserved = 0 but it seems to do something
return unknown.isSet(field_4_format);
|
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.putInt(data, 4 + offset + pos, field_1_lineColor);
LittleEndian.putShort(data, 8 + offset + pos, field_2_linePattern);
LittleEndian.putShort(data, 10 + offset + pos, field_3_weight);
LittleEndian.putShort(data, 12 + offset + pos, field_4_format);
LittleEndian.putShort(data, 14 + offset + pos, field_5_colourPaletteIndex);
return getRecordSize();
|
public void | setAuto(boolean value)Sets the auto field value.
automatic format
field_4_format = auto.setShortBoolean(field_4_format, value);
|
public void | setColourPaletteIndex(short field_5_colourPaletteIndex)Set the colour palette index field for the LineFormat record.
this.field_5_colourPaletteIndex = field_5_colourPaletteIndex;
|
public void | setDrawTicks(boolean value)Sets the draw ticks field value.
draw tick marks
field_4_format = drawTicks.setShortBoolean(field_4_format, value);
|
public void | setFormat(short field_4_format)Set the format field for the LineFormat record.
this.field_4_format = field_4_format;
|
public void | setLineColor(int field_1_lineColor)Set the line color field for the LineFormat record.
this.field_1_lineColor = field_1_lineColor;
|
public void | setLinePattern(short field_2_linePattern)Set the line pattern field for the LineFormat record.
this.field_2_linePattern = field_2_linePattern;
|
public void | setUnknown(boolean value)Sets the unknown field value.
book marks this as reserved = 0 but it seems to do something
field_4_format = unknown.setShortBoolean(field_4_format, value);
|
public void | setWeight(short field_3_weight)Set the weight field for the LineFormat record.
this.field_3_weight = field_3_weight;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[LINEFORMAT]\n");
buffer.append(" .lineColor = ")
.append("0x").append(HexDump.toHex( getLineColor ()))
.append(" (").append( getLineColor() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .linePattern = ")
.append("0x").append(HexDump.toHex( getLinePattern ()))
.append(" (").append( getLinePattern() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .weight = ")
.append("0x").append(HexDump.toHex( getWeight ()))
.append(" (").append( getWeight() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .format = ")
.append("0x").append(HexDump.toHex( getFormat ()))
.append(" (").append( getFormat() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .auto = ").append(isAuto()).append('\n");
buffer.append(" .drawTicks = ").append(isDrawTicks()).append('\n");
buffer.append(" .unknown = ").append(isUnknown()).append('\n");
buffer.append(" .colourPaletteIndex = ")
.append("0x").append(HexDump.toHex( getColourPaletteIndex ()))
.append(" (").append( getColourPaletteIndex() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append("[/LINEFORMAT]\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 LineFormat record");
}
|