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

SheetPropertiesRecord

public class SheetPropertiesRecord extends Record
Describes a chart sheet properties 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_flags
private BitField
chartTypeManuallyFormatted
private BitField
plotVisibleOnly
private BitField
doNotSizeWithWindow
private BitField
defaultPlotDimensions
private BitField
autoPlotArea
private byte
field_2_empty
public static final byte
EMPTY_NOT_PLOTTED
public static final byte
EMPTY_ZERO
public static final byte
EMPTY_INTERPOLATED
Constructors Summary
public SheetPropertiesRecord()



     
    

    
public SheetPropertiesRecord(RecordInputStream in)
Constructs a SheetProperties record and sets its fields appropriately.

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

        SheetPropertiesRecord rec = new SheetPropertiesRecord();
    
        rec.field_1_flags = field_1_flags;
        rec.field_2_empty = field_2_empty;
        return rec;
    
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_flags                  = in.readShort();
        field_2_empty                  = in.readByte();
    
public bytegetEmpty()
Get the empty field for the SheetProperties record.

return
One of EMPTY_NOT_PLOTTED EMPTY_ZERO EMPTY_INTERPOLATED

        return field_2_empty;
    
public shortgetFlags()
Get the flags field for the SheetProperties record.

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

        return 4  + 2 + 1;
    
public shortgetSid()

        return sid;
    
public booleanisAutoPlotArea()
??

return
the auto plot area field value.

        return autoPlotArea.isSet(field_1_flags);
    
public booleanisChartTypeManuallyFormatted()
Has the chart type been manually formatted?

return
the chart type manually formatted field value.

        return chartTypeManuallyFormatted.isSet(field_1_flags);
    
public booleanisDefaultPlotDimensions()
Indicates that the default area dimensions should be used.

return
the default plot dimensions field value.

        return defaultPlotDimensions.isSet(field_1_flags);
    
public booleanisDoNotSizeWithWindow()
Do not size the chart when the window changes size

return
the do not size with window field value.

        return doNotSizeWithWindow.isSet(field_1_flags);
    
public booleanisPlotVisibleOnly()
Only show visible cells on the chart.

return
the plot visible only field value.

        return plotVisibleOnly.isSet(field_1_flags);
    
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_flags);
        data[ 6 + offset + pos ] = field_2_empty;

        return getRecordSize();
    
public voidsetAutoPlotArea(boolean value)
Sets the auto plot area field value. ??

        field_1_flags = autoPlotArea.setShortBoolean(field_1_flags, value);
    
public voidsetChartTypeManuallyFormatted(boolean value)
Sets the chart type manually formatted field value. Has the chart type been manually formatted?

        field_1_flags = chartTypeManuallyFormatted.setShortBoolean(field_1_flags, value);
    
public voidsetDefaultPlotDimensions(boolean value)
Sets the default plot dimensions field value. Indicates that the default area dimensions should be used.

        field_1_flags = defaultPlotDimensions.setShortBoolean(field_1_flags, value);
    
public voidsetDoNotSizeWithWindow(boolean value)
Sets the do not size with window field value. Do not size the chart when the window changes size

        field_1_flags = doNotSizeWithWindow.setShortBoolean(field_1_flags, value);
    
public voidsetEmpty(byte field_2_empty)
Set the empty field for the SheetProperties record.

param
field_2_empty One of EMPTY_NOT_PLOTTED EMPTY_ZERO EMPTY_INTERPOLATED

        this.field_2_empty = field_2_empty;
    
public voidsetFlags(short field_1_flags)
Set the flags field for the SheetProperties record.

        this.field_1_flags = field_1_flags;
    
public voidsetPlotVisibleOnly(boolean value)
Sets the plot visible only field value. Only show visible cells on the chart.

        field_1_flags = plotVisibleOnly.setShortBoolean(field_1_flags, value);
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[SHTPROPS]\n");
        buffer.append("    .flags                = ")
            .append("0x").append(HexDump.toHex(  getFlags ()))
            .append(" (").append( getFlags() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 
        buffer.append("         .chartTypeManuallyFormatted     = ").append(isChartTypeManuallyFormatted()).append('\n"); 
        buffer.append("         .plotVisibleOnly          = ").append(isPlotVisibleOnly()).append('\n"); 
        buffer.append("         .doNotSizeWithWindow      = ").append(isDoNotSizeWithWindow()).append('\n"); 
        buffer.append("         .defaultPlotDimensions     = ").append(isDefaultPlotDimensions()).append('\n"); 
        buffer.append("         .autoPlotArea             = ").append(isAutoPlotArea()).append('\n"); 
        buffer.append("    .empty                = ")
            .append("0x").append(HexDump.toHex(  getEmpty ()))
            .append(" (").append( getEmpty() ).append(" )");
        buffer.append(System.getProperty("line.separator")); 

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