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

GridsetRecord

public class GridsetRecord extends Record
Title: Gridset Record.

Description: flag denoting whether the user specified that gridlines are used when printing.

REFERENCE: PG 320 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

author
Andrew C. Oliver (acoliver at apache dot org)
author
Glen Stampoultzis (glens at apache.org)
author
Jason Height (jheight at chariot dot net dot au)
version
2.0-pre

Fields Summary
public static final short
sid
public short
field_1_gridset_flag
Constructors Summary
public GridsetRecord()


     
    
    
public GridsetRecord(RecordInputStream in)
Constructs a GridSet record and sets its fields appropriately.

param
id id must be 0x82 or an exception will be throw upon validation
param
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()

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

        field_1_gridset_flag = in.readShort();
    
public booleangetGridset()
get whether the gridlines are shown during printing.

return
gridset - true if gridlines are NOT printed, false if they are.

        return (field_1_gridset_flag == 1);
    
public intgetRecordSize()

        return 6;
    
public shortgetSid()

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

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset, ( short ) 0x2);
        LittleEndian.putShort(data, 4 + offset, field_1_gridset_flag);
        return getRecordSize();
    
public voidsetGridset(boolean gridset)
set whether gridlines are visible when printing

param
gridset - true if no gridlines are print, false if gridlines are not print.

        if (gridset == true)
        {
            field_1_gridset_flag = 1;
        }
        else
        {
            field_1_gridset_flag = 0;
        }
    
public java.lang.StringtoString()

        StringBuffer buffer = new StringBuffer();

        buffer.append("[GRIDSET]\n");
        buffer.append("    .gridset        = ").append(getGridset())
            .append("\n");
        buffer.append("[/GRIDSET]\n");
        return buffer.toString();
    
protected voidvalidateSid(short id)

        if (id != sid)
        {
            throw new RecordFormatException("NOT A Gridset RECORD");
        }