org.apache.poi.hssf.record
Class LegendRecord

java.lang.Object
  |
  +--org.apache.poi.hssf.record.Record
        |
        +--org.apache.poi.hssf.record.LegendRecord

public class LegendRecord
extends Record

The legend record specifies the location of legend on a chart and it's overall size. NOTE: This source is automatically generated please do not modify this file. Either subclass or remove the record in src/records/definitions.

Author:
Glen Stampoultzis (glens at apache.org)

Field Summary
static short sid
           
static byte SPACING_CLOSE
           
static byte SPACING_MEDIUM
           
static byte SPACING_OPEN
           
static byte TYPE_BOTTOM
           
static byte TYPE_CORNER
           
static byte TYPE_LEFT
           
static byte TYPE_NOT_DOCKED
           
static byte TYPE_RIGHT
           
static byte TYPE_TOP
           
 
Constructor Summary
LegendRecord()
           
LegendRecord(short id, short size, byte[] data)
          Constructs a Legend record and sets its fields appropriately.
LegendRecord(short id, short size, byte[] data, int offset)
          Constructs a Legend record and sets its fields appropriately.
 
Method Summary
protected  void fillFields(byte[] data, short size, int offset)
          called by the constructor, should set class level fields.
 short getOptions()
          Get the options field for the Legend record.
 int getRecordSize()
          Size of record (exluding 4 byte header)
 short getSid()
          return the non static version of the id for this record.
 byte getSpacing()
          Get the spacing field for the Legend record.
 byte getType()
          Get the type field for the Legend record.
 int getXPosition()
          Get the x position field for the Legend record.
 int getXSize()
          Get the x size field for the Legend record.
 int getYPosition()
          Get the y position field for the Legend record.
 int getYSize()
          Get the y size field for the Legend record.
 boolean isAutoPosition()
          set to true if legend is docked
 boolean isAutoPosX()
          x positioning is done automatically
 boolean isAutoPosY()
          y positioning is done automatically
 boolean isAutoSeries()
          automatic series distribution
 boolean isContainsDataTable()
          true if the chart contains the data table
 boolean isVert()
          if true legend is vertical (otherwise it's horizonal)
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
 void setAutoPosition(boolean value)
          Sets the auto position field value.
 void setAutoPosX(boolean value)
          Sets the auto pos x field value.
 void setAutoPosY(boolean value)
          Sets the auto pos y field value.
 void setAutoSeries(boolean value)
          Sets the auto series field value.
 void setContainsDataTable(boolean value)
          Sets the contains data table field value.
 void setOptions(short field_7_options)
          Set the options field for the Legend record.
 void setSpacing(byte field_6_spacing)
          Set the spacing field for the Legend record.
 void setType(byte field_5_type)
          Set the type field for the Legend record.
 void setVert(boolean value)
          Sets the vert field value.
 void setXPosition(int field_1_xPosition)
          Set the x position field for the Legend record.
 void setXSize(int field_3_xSize)
          Set the x size field for the Legend record.
 void setYPosition(int field_2_yPosition)
          Set the y position field for the Legend record.
 void setYSize(int field_4_ySize)
          Set the y size field for the Legend record.
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
protected  void validateSid(short id)
          Checks the sid matches the expected side for this record
 
Methods inherited from class org.apache.poi.hssf.record.Record
fillFields, isInValueSection, isValue, processContinueRecord, serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid

TYPE_BOTTOM

public static final byte TYPE_BOTTOM

TYPE_CORNER

public static final byte TYPE_CORNER

TYPE_TOP

public static final byte TYPE_TOP

TYPE_RIGHT

public static final byte TYPE_RIGHT

TYPE_LEFT

public static final byte TYPE_LEFT

TYPE_NOT_DOCKED

public static final byte TYPE_NOT_DOCKED

SPACING_CLOSE

public static final byte SPACING_CLOSE

SPACING_MEDIUM

public static final byte SPACING_MEDIUM

SPACING_OPEN

public static final byte SPACING_OPEN
Constructor Detail

LegendRecord

public LegendRecord()

LegendRecord

public LegendRecord(short id,
                    short size,
                    byte[] data)
Constructs a Legend record and sets its fields appropriately.
Parameters:
id - id must be 0x1015 or an exception will be throw upon validation
size - size the size of the data area of the record
data - data of the record (should not contain sid/len)

LegendRecord

public LegendRecord(short id,
                    short size,
                    byte[] data,
                    int offset)
Constructs a Legend record and sets its fields appropriately.
Parameters:
id - id must be 0x1015 or an exception will be throw upon validation
size - size the size of the data area of the record
data - data of the record (should not contain sid/len)
offset - of the record's data
Method Detail

validateSid

protected void validateSid(short id)
Checks the sid matches the expected side for this record
Overrides:
validateSid in class Record
Parameters:
id - the expected sid.

fillFields

protected void fillFields(byte[] data,
                          short size,
                          int offset)
Description copied from class: Record
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.
Overrides:
fillFields in class Record
Following copied from class: org.apache.poi.hssf.record.Record
Parameters:
data - raw data
size - size of data
offset - of the record's data (provided a big array of the file)

toString

public java.lang.String toString()
Description copied from class: Record
get a string representation of the record (for biffview/debugging)
Overrides:
toString in class Record

serialize

public int serialize(int offset,
                     byte[] data)
Description copied from class: Record
called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.
Overrides:
serialize in class Record
Following copied from class: org.apache.poi.hssf.record.Record
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

getRecordSize

public int getRecordSize()
Size of record (exluding 4 byte header)
Overrides:
getRecordSize in class Record

getSid

public short getSid()
Description copied from class: Record
return the non static version of the id for this record.
Overrides:
getSid in class Record

getXPosition

public int getXPosition()
Get the x position field for the Legend record.

setXPosition

public void setXPosition(int field_1_xPosition)
Set the x position field for the Legend record.

getYPosition

public int getYPosition()
Get the y position field for the Legend record.

setYPosition

public void setYPosition(int field_2_yPosition)
Set the y position field for the Legend record.

getXSize

public int getXSize()
Get the x size field for the Legend record.

setXSize

public void setXSize(int field_3_xSize)
Set the x size field for the Legend record.

getYSize

public int getYSize()
Get the y size field for the Legend record.

setYSize

public void setYSize(int field_4_ySize)
Set the y size field for the Legend record.

getType

public byte getType()
Get the type field for the Legend record.
Returns:
One of TYPE_BOTTOM TYPE_CORNER TYPE_TOP TYPE_RIGHT TYPE_LEFT TYPE_NOT_DOCKED

setType

public void setType(byte field_5_type)
Set the type field for the Legend record.
Parameters:
field_5_type - One of TYPE_BOTTOM TYPE_CORNER TYPE_TOP TYPE_RIGHT TYPE_LEFT TYPE_NOT_DOCKED

getSpacing

public byte getSpacing()
Get the spacing field for the Legend record.
Returns:
One of SPACING_CLOSE SPACING_MEDIUM SPACING_OPEN

setSpacing

public void setSpacing(byte field_6_spacing)
Set the spacing field for the Legend record.
Parameters:
field_6_spacing - One of SPACING_CLOSE SPACING_MEDIUM SPACING_OPEN

getOptions

public short getOptions()
Get the options field for the Legend record.

setOptions

public void setOptions(short field_7_options)
Set the options field for the Legend record.

setAutoPosition

public void setAutoPosition(boolean value)
Sets the auto position field value. set to true if legend is docked

isAutoPosition

public boolean isAutoPosition()
set to true if legend is docked
Returns:
the auto position field value.

setAutoSeries

public void setAutoSeries(boolean value)
Sets the auto series field value. automatic series distribution

isAutoSeries

public boolean isAutoSeries()
automatic series distribution
Returns:
the auto series field value.

setAutoPosX

public void setAutoPosX(boolean value)
Sets the auto pos x field value. x positioning is done automatically

isAutoPosX

public boolean isAutoPosX()
x positioning is done automatically
Returns:
the auto pos x field value.

setAutoPosY

public void setAutoPosY(boolean value)
Sets the auto pos y field value. y positioning is done automatically

isAutoPosY

public boolean isAutoPosY()
y positioning is done automatically
Returns:
the auto pos y field value.

setVert

public void setVert(boolean value)
Sets the vert field value. if true legend is vertical (otherwise it's horizonal)

isVert

public boolean isVert()
if true legend is vertical (otherwise it's horizonal)
Returns:
the vert field value.

setContainsDataTable

public void setContainsDataTable(boolean value)
Sets the contains data table field value. true if the chart contains the data table

isContainsDataTable

public boolean isContainsDataTable()
true if the chart contains the data table
Returns:
the contains data table field value.


Copyright © 2002 Apache jakarta-poi project. All Rights Reserved.