org.apache.poi.hssf.record
Class WindowTwoRecord

java.lang.Object
  extended by org.apache.poi.hssf.record.Record
      extended by org.apache.poi.hssf.record.WindowTwoRecord

public class WindowTwoRecord
extends Record

Title: Window Two Record

Description: sheet window settings

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

Version:
2.0-pre
Author:
Andrew C. Oliver (acoliver at apache dot org), Jason Height (jheight at chariot dot net dot au)

Field Summary
static short sid
           
 
Constructor Summary
WindowTwoRecord()
           
WindowTwoRecord(RecordInputStream in)
          Constructs a WindowTwo record and sets its fields appropriately.
 
Method Summary
 java.lang.Object clone()
           
protected  void fillFields(RecordInputStream in)
          called by the constructor, should set class level fields.
 boolean getArabic()
          is this arabic?
 boolean getDefaultHeader()
          get whether the window should display a default header
 boolean getDisplayFormulas()
          get whether the window should display formulas
 boolean getDisplayGridlines()
          get whether the window should display gridlines
 boolean getDisplayGuts()
          get whether the outline symbols are displaed
 boolean getDisplayRowColHeadings()
          get whether the window should display row and column headings
 boolean getDisplayZeros()
          get whether the window should display zero values
 boolean getFreezePanes()
          get whether the window should freeze panes
 boolean getFreezePanesNoSplit()
          freeze unsplit panes or not
 int getHeaderColor()
          get the palette index for the header color
 short getLeftCol()
          get the leftmost column displayed in the window
 short getNormalZoom()
          get the zoom magnification in normal view
 short getOptions()
          get the options bitmask or just use the bit setters.
 short getPageBreakZoom()
          zoom magification in page break view
 boolean getPaged()
          Deprecated. use isActive()
 int getRecordSize()
          gives the current serialized size of the record.
 int getReserved()
          get the reserved bits - why would you do this?
 boolean getSavedInPageBreakPreview()
          was the sheet saved in page break view
 boolean getSelected()
          sheet tab is selected
 short getSid()
          return the non static version of the id for this record.
 short getTopRow()
          get the top row visible in the window
 boolean isActive()
          is the sheet currently displayed in the window
 int serialize(int offset, byte[] data)
          called by the class that is responsible for writing this sucker.
 void setActive(boolean p)
          is the sheet currently displayed in the window
 void setArabic(boolean isarabic)
          is this arabic?
 void setDefaultHeader(boolean header)
          set whether the window should display a default header
 void setDisplayFormulas(boolean formulas)
          set whether the window should display formulas
 void setDisplayGridlines(boolean gridlines)
          set whether the window should display gridlines
 void setDisplayGuts(boolean guts)
          set whether the outline symbols are displaed
 void setDisplayRowColHeadings(boolean headings)
          set whether the window should display row and column headings
 void setDisplayZeros(boolean zeros)
          set whether the window should display zero values
 void setFreezePanes(boolean freezepanes)
          set whether the window should freeze panes
 void setFreezePanesNoSplit(boolean freeze)
          freeze unsplit panes or not
 void setHeaderColor(int color)
          set the palette index for the header color
 void setLeftCol(short leftCol)
          set the leftmost column displayed in the window
 void setNormalZoom(short zoom)
          set the zoom magnification in normal view
 void setOptions(short options)
          set the options bitmask or just use the bit setters.
 void setPageBreakZoom(short zoom)
          zoom magification in page break view
 void setPaged(boolean p)
          Deprecated. use setActive()
 void setReserved(int reserved)
          set the reserved (don't do this) value
 void setSavedInPageBreakPreview(boolean p)
          was the sheet saved in page break view
 void setSelected(boolean sel)
          sheet tab is selected
 void setTopRow(short topRow)
          set the top row visible in the window
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
protected  void validateSid(short id)
          called by constructor, should throw runtime exception in the event of a record passed with a differing ID.
 
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, isInValueSection, isValue, serialize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid
See Also:
Constant Field Values
Constructor Detail

WindowTwoRecord

public WindowTwoRecord()

WindowTwoRecord

public WindowTwoRecord(RecordInputStream in)
Constructs a WindowTwo record and sets its fields appropriately.

Parameters:
in - the RecordInputstream to read the record from
Method Detail

validateSid

protected void validateSid(short id)
Description copied from class: Record
called by constructor, should throw runtime exception in the event of a record passed with a differing ID.

Specified by:
validateSid in class Record
Parameters:
id - alleged id for this record

fillFields

protected void fillFields(RecordInputStream in)
Description copied from class: Record
called by the constructor, should set class level fields. Should throw runtime exception for bad/icomplete data.

Specified by:
fillFields in class Record
Parameters:
in - the RecordInputstream to read the record from

setOptions

public void setOptions(short options)
set the options bitmask or just use the bit setters.

Parameters:
options -

setDisplayFormulas

public void setDisplayFormulas(boolean formulas)
set whether the window should display formulas

Parameters:
formulas - or not

setDisplayGridlines

public void setDisplayGridlines(boolean gridlines)
set whether the window should display gridlines

Parameters:
gridlines - or not

setDisplayRowColHeadings

public void setDisplayRowColHeadings(boolean headings)
set whether the window should display row and column headings

Parameters:
headings - or not

setFreezePanes

public void setFreezePanes(boolean freezepanes)
set whether the window should freeze panes

Parameters:
freezepanes - freeze panes or not

setDisplayZeros

public void setDisplayZeros(boolean zeros)
set whether the window should display zero values

Parameters:
zeros - or not

setDefaultHeader

public void setDefaultHeader(boolean header)
set whether the window should display a default header

Parameters:
header - or not

setArabic

public void setArabic(boolean isarabic)
is this arabic?

Parameters:
isarabic - arabic or not

setDisplayGuts

public void setDisplayGuts(boolean guts)
set whether the outline symbols are displaed

Parameters:
guts - symbols or not

setFreezePanesNoSplit

public void setFreezePanesNoSplit(boolean freeze)
freeze unsplit panes or not

Parameters:
freeze - or not

setSelected

public void setSelected(boolean sel)
sheet tab is selected

Parameters:
sel - selected or not

setActive

public void setActive(boolean p)
is the sheet currently displayed in the window

Parameters:
p - displayed or not

setPaged

public void setPaged(boolean p)
Deprecated. use setActive()

deprecated May 2008


setSavedInPageBreakPreview

public void setSavedInPageBreakPreview(boolean p)
was the sheet saved in page break view

Parameters:
p - pagebreaksaved or not

setTopRow

public void setTopRow(short topRow)
set the top row visible in the window

Parameters:
topRow - top row visible

setLeftCol

public void setLeftCol(short leftCol)
set the leftmost column displayed in the window

Parameters:
leftCol - leftmost column

setHeaderColor

public void setHeaderColor(int color)
set the palette index for the header color

Parameters:
color -

setPageBreakZoom

public void setPageBreakZoom(short zoom)
zoom magification in page break view

Parameters:
zoom -

setNormalZoom

public void setNormalZoom(short zoom)
set the zoom magnification in normal view

Parameters:
zoom -

setReserved

public void setReserved(int reserved)
set the reserved (don't do this) value


getOptions

public short getOptions()
get the options bitmask or just use the bit setters.

Returns:
options

getDisplayFormulas

public boolean getDisplayFormulas()
get whether the window should display formulas

Returns:
formulas or not

getDisplayGridlines

public boolean getDisplayGridlines()
get whether the window should display gridlines

Returns:
gridlines or not

getDisplayRowColHeadings

public boolean getDisplayRowColHeadings()
get whether the window should display row and column headings

Returns:
headings or not

getFreezePanes

public boolean getFreezePanes()
get whether the window should freeze panes

Returns:
freeze panes or not

getDisplayZeros

public boolean getDisplayZeros()
get whether the window should display zero values

Returns:
zeros or not

getDefaultHeader

public boolean getDefaultHeader()
get whether the window should display a default header

Returns:
header or not

getArabic

public boolean getArabic()
is this arabic?

Returns:
arabic or not

getDisplayGuts

public boolean getDisplayGuts()
get whether the outline symbols are displaed

Returns:
symbols or not

getFreezePanesNoSplit

public boolean getFreezePanesNoSplit()
freeze unsplit panes or not

Returns:
freeze or not

getSelected

public boolean getSelected()
sheet tab is selected

Returns:
selected or not

isActive

public boolean isActive()
is the sheet currently displayed in the window

Returns:
displayed or not

getPaged

public boolean getPaged()
Deprecated. use isActive()

deprecated May 2008


getSavedInPageBreakPreview

public boolean getSavedInPageBreakPreview()
was the sheet saved in page break view

Returns:
pagebreaksaved or not

getTopRow

public short getTopRow()
get the top row visible in the window

Returns:
toprow

getLeftCol

public short getLeftCol()
get the leftmost column displayed in the window

Returns:
leftmost

getHeaderColor

public int getHeaderColor()
get the palette index for the header color

Returns:
color

getPageBreakZoom

public short getPageBreakZoom()
zoom magification in page break view

Returns:
zoom

getNormalZoom

public short getNormalZoom()
get the zoom magnification in normal view

Returns:
zoom

getReserved

public int getReserved()
get the reserved bits - why would you do this?

Returns:
reserved stuff -probably garbage

toString

public java.lang.String toString()
Description copied from class: Record
get a string representation of the record (for biffview/debugging)

Overrides:
toString in class Record

serialize

public int serialize(int offset,
                     byte[] data)
Description copied from class: Record
called by the class that is responsible for writing this sucker. Subclasses should implement this so that their data is passed back in a byte array.

Specified by:
serialize in class Record
Parameters:
offset - to begin writing at
data - byte array containing instance data
Returns:
number of bytes written

getRecordSize

public int getRecordSize()
Description copied from class: Record
gives the current serialized size of the record. Should include the sid and reclength (4 bytes).

Overrides:
getRecordSize in class Record

getSid

public short getSid()
Description copied from class: Record
return the non static version of the id for this record.

Specified by:
getSid in class Record

clone

public java.lang.Object clone()
Overrides:
clone in class Record


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.