FileDocCategorySizeDatePackage
AxisLineFormatRecord.javaAPI DocApache Poi 3.0.14576Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

AxisLineFormatRecord

public class AxisLineFormatRecord extends Record
The axis line format record defines the axis type details. 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)

Fields Summary
public static final short
sid
private short
field_1_axisType
public static final short
AXIS_TYPE_AXIS_LINE
public static final short
AXIS_TYPE_MAJOR_GRID_LINE
public static final short
AXIS_TYPE_MINOR_GRID_LINE
public static final short
AXIS_TYPE_WALLS_OR_FLOOR
Constructors Summary
public AxisLineFormatRecord()



     
    

    
public AxisLineFormatRecord(RecordInputStream in)
Constructs a AxisLineFormat record and sets its fields appropriately.

param
id id must be 0x1021 or an exception will be throw upon validation
param
size size the size of the data area of the record
param
data data of the record (should not contain sid/len)

        super(in);
    
    
Methods Summary
public java.lang.Objectclone()

        AxisLineFormatRecord rec = new AxisLineFormatRecord();
    
        rec.field_1_axisType = field_1_axisType;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_axisType               = in.readShort();
    
public shortgetAxisType()
Get the axis type field for the AxisLineFormat record.

return
One of AXIS_TYPE_AXIS_LINE AXIS_TYPE_MAJOR_GRID_LINE AXIS_TYPE_MINOR_GRID_LINE AXIS_TYPE_WALLS_OR_FLOOR

        return field_1_axisType;
    
public intgetRecordSize()
Size of record (exluding 4 byte header)

        return 4  + 2;
    
public shortgetSid()

        return sid;
    
public intserialize(int offset, byte[] data)

        int pos = 0;

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, (short)(getRecordSize() - 4));

        LittleEndian.putShort(data, 4 + offset + pos, field_1_axisType);

        return getRecordSize();
    
public voidsetAxisType(short field_1_axisType)
Set the axis type field for the AxisLineFormat record.

param
field_1_axisType One of AXIS_TYPE_AXIS_LINE AXIS_TYPE_MAJOR_GRID_LINE AXIS_TYPE_MINOR_GRID_LINE AXIS_TYPE_WALLS_OR_FLOOR

        this.field_1_axisType = field_1_axisType;
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[AXISLINEFORMAT]\n");
        buffer.append("    .axisType             = ")
            .append("0x").append(HexDump.toHex(  getAxisType ()))
            .append(" (").append( getAxisType() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 

        buffer.append("[/AXISLINEFORMAT]\n");
        return buffer.toString();
    
protected voidvalidateSid(short id)
Checks the sid matches the expected side for this record

param
id the expected sid.

        if (id != sid)
        {
            throw new RecordFormatException("Not a AxisLineFormat record");
        }