Methods Summary |
---|
public java.lang.Object | clone()
LegendRecord rec = new LegendRecord();
rec.field_1_xAxisUpperLeft = field_1_xAxisUpperLeft;
rec.field_2_yAxisUpperLeft = field_2_yAxisUpperLeft;
rec.field_3_xSize = field_3_xSize;
rec.field_4_ySize = field_4_ySize;
rec.field_5_type = field_5_type;
rec.field_6_spacing = field_6_spacing;
rec.field_7_options = field_7_options;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
field_1_xAxisUpperLeft = in.readInt();
field_2_yAxisUpperLeft = in.readInt();
field_3_xSize = in.readInt();
field_4_ySize = in.readInt();
field_5_type = in.readByte();
field_6_spacing = in.readByte();
field_7_options = in.readShort();
|
public short | getOptions()Get the options field for the Legend record.
return field_7_options;
|
public int | getRecordSize()Size of record (exluding 4 byte header)
return 4 + 4 + 4 + 4 + 4 + 1 + 1 + 2;
|
public short | getSid()
return sid;
|
public byte | getSpacing()Get the spacing field for the Legend record.
return field_6_spacing;
|
public byte | getType()Get the type field for the Legend record.
return field_5_type;
|
public int | getXAxisUpperLeft()Get the x axis upper left field for the Legend record.
return field_1_xAxisUpperLeft;
|
public int | getXSize()Get the x size field for the Legend record.
return field_3_xSize;
|
public int | getYAxisUpperLeft()Get the y axis upper left field for the Legend record.
return field_2_yAxisUpperLeft;
|
public int | getYSize()Get the y size field for the Legend record.
return field_4_ySize;
|
public boolean | isAutoPosition()automatic positioning (1=docked)
return autoPosition.isSet(field_7_options);
|
public boolean | isAutoSeries()excel 5 only (true)
return autoSeries.isSet(field_7_options);
|
public boolean | isAutoXPositioning()position of legend on the x axis is automatic
return autoXPositioning.isSet(field_7_options);
|
public boolean | isAutoYPositioning()position of legend on the y axis is automatic
return autoYPositioning.isSet(field_7_options);
|
public boolean | isDataTable()1 if chart contains data table
return dataTable.isSet(field_7_options);
|
public boolean | isVertical()vertical or horizontal legend (1 or 0 respectively). Always 0 if not automatic.
return vertical.isSet(field_7_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.putInt(data, 4 + offset + pos, field_1_xAxisUpperLeft);
LittleEndian.putInt(data, 8 + offset + pos, field_2_yAxisUpperLeft);
LittleEndian.putInt(data, 12 + offset + pos, field_3_xSize);
LittleEndian.putInt(data, 16 + offset + pos, field_4_ySize);
data[ 20 + offset + pos ] = field_5_type;
data[ 21 + offset + pos ] = field_6_spacing;
LittleEndian.putShort(data, 22 + offset + pos, field_7_options);
return getRecordSize();
|
public void | setAutoPosition(boolean value)Sets the auto position field value.
automatic positioning (1=docked)
field_7_options = autoPosition.setShortBoolean(field_7_options, value);
|
public void | setAutoSeries(boolean value)Sets the auto series field value.
excel 5 only (true)
field_7_options = autoSeries.setShortBoolean(field_7_options, value);
|
public void | setAutoXPositioning(boolean value)Sets the auto x positioning field value.
position of legend on the x axis is automatic
field_7_options = autoXPositioning.setShortBoolean(field_7_options, value);
|
public void | setAutoYPositioning(boolean value)Sets the auto y positioning field value.
position of legend on the y axis is automatic
field_7_options = autoYPositioning.setShortBoolean(field_7_options, value);
|
public void | setDataTable(boolean value)Sets the data table field value.
1 if chart contains data table
field_7_options = dataTable.setShortBoolean(field_7_options, value);
|
public void | setOptions(short field_7_options)Set the options field for the Legend record.
this.field_7_options = field_7_options;
|
public void | setSpacing(byte field_6_spacing)Set the spacing field for the Legend record.
this.field_6_spacing = field_6_spacing;
|
public void | setType(byte field_5_type)Set the type field for the Legend record.
this.field_5_type = field_5_type;
|
public void | setVertical(boolean value)Sets the vertical field value.
vertical or horizontal legend (1 or 0 respectively). Always 0 if not automatic.
field_7_options = vertical.setShortBoolean(field_7_options, value);
|
public void | setXAxisUpperLeft(int field_1_xAxisUpperLeft)Set the x axis upper left field for the Legend record.
this.field_1_xAxisUpperLeft = field_1_xAxisUpperLeft;
|
public void | setXSize(int field_3_xSize)Set the x size field for the Legend record.
this.field_3_xSize = field_3_xSize;
|
public void | setYAxisUpperLeft(int field_2_yAxisUpperLeft)Set the y axis upper left field for the Legend record.
this.field_2_yAxisUpperLeft = field_2_yAxisUpperLeft;
|
public void | setYSize(int field_4_ySize)Set the y size field for the Legend record.
this.field_4_ySize = field_4_ySize;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[LEGEND]\n");
buffer.append(" .xAxisUpperLeft = ")
.append("0x").append(HexDump.toHex( getXAxisUpperLeft ()))
.append(" (").append( getXAxisUpperLeft() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .yAxisUpperLeft = ")
.append("0x").append(HexDump.toHex( getYAxisUpperLeft ()))
.append(" (").append( getYAxisUpperLeft() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .xSize = ")
.append("0x").append(HexDump.toHex( getXSize ()))
.append(" (").append( getXSize() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .ySize = ")
.append("0x").append(HexDump.toHex( getYSize ()))
.append(" (").append( getYSize() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .type = ")
.append("0x").append(HexDump.toHex( getType ()))
.append(" (").append( getType() ).append(" )");
buffer.append(System.getProperty("line.separator"));
buffer.append(" .spacing = ")
.append("0x").append(HexDump.toHex( getSpacing ()))
.append(" (").append( getSpacing() ).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(" .autoPosition = ").append(isAutoPosition()).append('\n");
buffer.append(" .autoSeries = ").append(isAutoSeries()).append('\n");
buffer.append(" .autoXPositioning = ").append(isAutoXPositioning()).append('\n");
buffer.append(" .autoYPositioning = ").append(isAutoYPositioning()).append('\n");
buffer.append(" .vertical = ").append(isVertical()).append('\n");
buffer.append(" .dataTable = ").append(isDataTable()).append('\n");
buffer.append("[/LEGEND]\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 Legend record");
}
|