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

RightMarginRecord

public class RightMarginRecord extends Record implements Margin
Record for the right margin. * NOTE: This source was automatically generated. * @author Shawn Laubach (slaubach at apache dot org)

Fields Summary
public static final short
sid
private double
field_1_margin
Constructors Summary
public RightMarginRecord()


             
public RightMarginRecord(RecordInputStream in)
Constructs a RightMargin record and sets its fields appropriately. * * @param id id must be 0x27 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()

        RightMarginRecord rec = new RightMarginRecord();
        rec.field_1_margin = this.field_1_margin;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_margin = in.readDouble();
    
public doublegetMargin()
Get the margin field for the RightMargin record.

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

        return 4 + 8;    
public shortgetSid()

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

        LittleEndian.putShort( data, 0 + offset, sid );
        LittleEndian.putShort( data, 2 + offset, (short) ( getRecordSize() - 4 ) );
        LittleEndian.putDouble( data, 4 + offset, field_1_margin );
        return getRecordSize();
    
public voidsetMargin(double field_1_margin)
Set the margin field for the RightMargin record.

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

        StringBuffer buffer = new StringBuffer();
        buffer.append( "[RightMargin]\n" );
        buffer.append( "    .margin               = " ).append( " (" ).append( getMargin() ).append( " )\n" );
        buffer.append( "[/RightMargin]\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 RightMargin record" );
        }