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

AreaRecord

public class AreaRecord extends Record
The area record is used to define a area chart. 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_formatFlags
private BitField
stacked
private BitField
displayAsPercentage
private BitField
shadow
Constructors Summary
public AreaRecord()



     
    

    
public AreaRecord(RecordInputStream in)
Constructs a Area record and sets its fields appropriately.

param
id id must be 0x101A 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()

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


        field_1_formatFlags            = in.readShort();
    
public shortgetFormatFlags()
Get the format flags field for the Area record.

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

        return 4  + 2;
    
public shortgetSid()

        return sid;
    
public booleanisDisplayAsPercentage()
results displayed as percentages

return
the display as percentage field value.

        return displayAsPercentage.isSet(field_1_formatFlags);
    
public booleanisShadow()
display a shadow for the chart

return
the shadow field value.

        return shadow.isSet(field_1_formatFlags);
    
public booleanisStacked()
series is stacked

return
the stacked field value.

        return stacked.isSet(field_1_formatFlags);
    
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_formatFlags);

        return getRecordSize();
    
public voidsetDisplayAsPercentage(boolean value)
Sets the display as percentage field value. results displayed as percentages

        field_1_formatFlags = displayAsPercentage.setShortBoolean(field_1_formatFlags, value);
    
public voidsetFormatFlags(short field_1_formatFlags)
Set the format flags field for the Area record.

        this.field_1_formatFlags = field_1_formatFlags;
    
public voidsetShadow(boolean value)
Sets the shadow field value. display a shadow for the chart

        field_1_formatFlags = shadow.setShortBoolean(field_1_formatFlags, value);
    
public voidsetStacked(boolean value)
Sets the stacked field value. series is stacked

        field_1_formatFlags = stacked.setShortBoolean(field_1_formatFlags, value);
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[AREA]\n");
        buffer.append("    .formatFlags          = ")
            .append("0x").append(HexDump.toHex(  getFormatFlags ()))
            .append(" (").append( getFormatFlags() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("         .stacked                  = ").append(isStacked()).append('\n"); 
        buffer.append("         .displayAsPercentage      = ").append(isDisplayAsPercentage()).append('\n"); 
        buffer.append("         .shadow                   = ").append(isShadow()).append('\n"); 

        buffer.append("[/AREA]\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 Area record");
        }