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

SeriesLabelsRecord

public class SeriesLabelsRecord extends Record
The series label record defines the type of label associated with the data format record. 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
showActual
private BitField
showPercent
private BitField
labelAsPercentage
private BitField
smoothedLine
private BitField
showLabel
private BitField
showBubbleSizes
Constructors Summary
public SeriesLabelsRecord()



     
    

    
public SeriesLabelsRecord(RecordInputStream in)
Constructs a SeriesLabels record and sets its fields appropriately.

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

        SeriesLabelsRecord rec = new SeriesLabelsRecord();
    
        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 SeriesLabels record.

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

        return 4  + 2;
    
public shortgetSid()

        return sid;
    
public booleanisLabelAsPercentage()
show category label/value as percentage (pie charts only)

return
the label as percentage field value.

        return labelAsPercentage.isSet(field_1_formatFlags);
    
public booleanisShowActual()
show actual value of the data point

return
the show actual field value.

        return showActual.isSet(field_1_formatFlags);
    
public booleanisShowBubbleSizes()
??

return
the show bubble sizes field value.

        return showBubbleSizes.isSet(field_1_formatFlags);
    
public booleanisShowLabel()
display category label

return
the show label field value.

        return showLabel.isSet(field_1_formatFlags);
    
public booleanisShowPercent()
show value as percentage of total (pie charts only)

return
the show percent field value.

        return showPercent.isSet(field_1_formatFlags);
    
public booleanisSmoothedLine()
show smooth line

return
the smoothed line field value.

        return smoothedLine.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 voidsetFormatFlags(short field_1_formatFlags)
Set the format flags field for the SeriesLabels record.

        this.field_1_formatFlags = field_1_formatFlags;
    
public voidsetLabelAsPercentage(boolean value)
Sets the label as percentage field value. show category label/value as percentage (pie charts only)

        field_1_formatFlags = labelAsPercentage.setShortBoolean(field_1_formatFlags, value);
    
public voidsetShowActual(boolean value)
Sets the show actual field value. show actual value of the data point

        field_1_formatFlags = showActual.setShortBoolean(field_1_formatFlags, value);
    
public voidsetShowBubbleSizes(boolean value)
Sets the show bubble sizes field value. ??

        field_1_formatFlags = showBubbleSizes.setShortBoolean(field_1_formatFlags, value);
    
public voidsetShowLabel(boolean value)
Sets the show label field value. display category label

        field_1_formatFlags = showLabel.setShortBoolean(field_1_formatFlags, value);
    
public voidsetShowPercent(boolean value)
Sets the show percent field value. show value as percentage of total (pie charts only)

        field_1_formatFlags = showPercent.setShortBoolean(field_1_formatFlags, value);
    
public voidsetSmoothedLine(boolean value)
Sets the smoothed line field value. show smooth line

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

        StringBuffer buffer = new StringBuffer();

        buffer.append("[ATTACHEDLABEL]\n");
        buffer.append("    .formatFlags          = ")
            .append("0x").append(HexDump.toHex(  getFormatFlags ()))
            .append(" (").append( getFormatFlags() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("         .showActual               = ").append(isShowActual()).append('\n"); 
        buffer.append("         .showPercent              = ").append(isShowPercent()).append('\n"); 
        buffer.append("         .labelAsPercentage        = ").append(isLabelAsPercentage()).append('\n"); 
        buffer.append("         .smoothedLine             = ").append(isSmoothedLine()).append('\n"); 
        buffer.append("         .showLabel                = ").append(isShowLabel()).append('\n"); 
        buffer.append("         .showBubbleSizes          = ").append(isShowBubbleSizes()).append('\n"); 

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