org.apache.poi.hssf.record
Class WindowOneRecord

java.lang.Object
  extended by org.apache.poi.hssf.record.RecordBase
      extended by org.apache.poi.hssf.record.Record
          extended by org.apache.poi.hssf.record.StandardRecord
              extended by org.apache.poi.hssf.record.WindowOneRecord

public final class WindowOneRecord
extends StandardRecord

Title: Window1 Record

Description: Stores the attributes of the workbook window. This is basically so the gui knows how big to make the window holding the spreadsheet document.

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

Version:
2.0-pre
Author:
Andrew C. Oliver (acoliver at apache dot org)

Field Summary
static short sid
           
 
Constructor Summary
WindowOneRecord()
           
WindowOneRecord(RecordInputStream in)
           
 
Method Summary
 int getActiveSheetIndex()
           
protected  int getDataSize()
           
 short getDisplayedTab()
          Deprecated. - Misleading name - use getFirstVisibleTab()
 boolean getDisplayHorizontalScrollbar()
          get whether to display the horizontal scrollbar or not
 boolean getDisplayTabs()
          get whether to display the tabs or not
 boolean getDisplayVerticalScrollbar()
          get whether to display the vertical scrollbar or not
 int getFirstVisibleTab()
           
 short getHeight()
          get the height of the window
 boolean getHidden()
          get whether the window is hidden or not
 short getHorizontalHold()
          get the horizontal position of the window (in 1/20ths of a point)
 boolean getIconic()
          get whether the window has been iconized or not
 short getNumSelectedTabs()
          get the number of selected tabs
 short getOptions()
          get the options bitmask (see bit setters)
 short getSelectedTab()
          Deprecated. - Misleading name - use getActiveSheetIndex()
 short getSid()
          return the non static version of the id for this record.
 short getTabWidthRatio()
          ratio of the width of the tabs to the horizontal scrollbar
 short getVerticalHold()
          get the vertical position of the window (in 1/20ths of a point)
 short getWidth()
          get the width of the window
 void serialize(LittleEndianOutput out)
          Write the data content of this BIFF record.
 void setActiveSheetIndex(int index)
           
 void setDisplayedTab(short t)
          Deprecated. - Misleading name - use setFirstVisibleTab()
 void setDisplayHorizonalScrollbar(boolean scroll)
          set whether to display the horizontal scrollbar or not
 void setDisplayTabs(boolean disptabs)
          set whether to display the tabs or not
 void setDisplayVerticalScrollbar(boolean scroll)
          set whether to display the vertical scrollbar or not
 void setFirstVisibleTab(int t)
          Sets the first visible sheet in the worksheet tab-bar.
 void setHeight(short h)
          set teh height of the window
 void setHidden(boolean ishidden)
          set whether the window is hidden or not
 void setHorizontalHold(short h)
          set the horizontal position of the window (in 1/20ths of a point)
 void setIconic(boolean isiconic)
          set whether the window has been iconized or not
 void setNumSelectedTabs(short n)
          set the number of selected tabs
 void setOptions(short o)
          set the options bitmask (see bit setters)
 void setSelectedTab(short s)
          Deprecated. - Misleading name - use setActiveSheetIndex()
 void setTabWidthRatio(short r)
          ratio of the width of the tabs to the horizontal scrollbar
 void setVerticalHold(short v)
          set the vertical position of the window (in 1/20ths of a point)
 void setWidth(short w)
          set the width of the window
 java.lang.String toString()
          get a string representation of the record (for biffview/debugging)
 
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
 
Methods inherited from class org.apache.poi.hssf.record.Record
clone, cloneViaReserialise, 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

WindowOneRecord

public WindowOneRecord()

WindowOneRecord

public WindowOneRecord(RecordInputStream in)
Method Detail

setHorizontalHold

public void setHorizontalHold(short h)
set the horizontal position of the window (in 1/20ths of a point)

Parameters:
h - - horizontal location

setVerticalHold

public void setVerticalHold(short v)
set the vertical position of the window (in 1/20ths of a point)

Parameters:
v - - vertical location

setWidth

public void setWidth(short w)
set the width of the window

Parameters:
w - width

setHeight

public void setHeight(short h)
set teh height of the window

Parameters:
h - height

setOptions

public void setOptions(short o)
set the options bitmask (see bit setters)

Parameters:
o - - the bitmask

setHidden

public void setHidden(boolean ishidden)
set whether the window is hidden or not

Parameters:
ishidden - or not

setIconic

public void setIconic(boolean isiconic)
set whether the window has been iconized or not

Parameters:
isiconic - iconize or not

setDisplayHorizonalScrollbar

public void setDisplayHorizonalScrollbar(boolean scroll)
set whether to display the horizontal scrollbar or not

Parameters:
scroll - display or not

setDisplayVerticalScrollbar

public void setDisplayVerticalScrollbar(boolean scroll)
set whether to display the vertical scrollbar or not

Parameters:
scroll - display or not

setDisplayTabs

public void setDisplayTabs(boolean disptabs)
set whether to display the tabs or not

Parameters:
disptabs - display or not

setActiveSheetIndex

public void setActiveSheetIndex(int index)

setSelectedTab

public void setSelectedTab(short s)
Deprecated. - Misleading name - use setActiveSheetIndex()

deprecated May 2008


setFirstVisibleTab

public void setFirstVisibleTab(int t)
Sets the first visible sheet in the worksheet tab-bar. This method does not hide, select or focus sheets. It just sets the scroll position in the tab-bar.

Parameters:
t - the sheet index of the tab that will become the first in the tab-bar

setDisplayedTab

public void setDisplayedTab(short t)
Deprecated. - Misleading name - use setFirstVisibleTab()

deprecated May 2008


setNumSelectedTabs

public void setNumSelectedTabs(short n)
set the number of selected tabs

Parameters:
n - number of tabs

setTabWidthRatio

public void setTabWidthRatio(short r)
ratio of the width of the tabs to the horizontal scrollbar

Parameters:
r - ratio

getHorizontalHold

public short getHorizontalHold()
get the horizontal position of the window (in 1/20ths of a point)

Returns:
h - horizontal location

getVerticalHold

public short getVerticalHold()
get the vertical position of the window (in 1/20ths of a point)

Returns:
v - vertical location

getWidth

public short getWidth()
get the width of the window

Returns:
width

getHeight

public short getHeight()
get the height of the window

Returns:
height

getOptions

public short getOptions()
get the options bitmask (see bit setters)

Returns:
o - the bitmask

getHidden

public boolean getHidden()
get whether the window is hidden or not

Returns:
ishidden or not

getIconic

public boolean getIconic()
get whether the window has been iconized or not

Returns:
iconize or not

getDisplayHorizontalScrollbar

public boolean getDisplayHorizontalScrollbar()
get whether to display the horizontal scrollbar or not

Returns:
display or not

getDisplayVerticalScrollbar

public boolean getDisplayVerticalScrollbar()
get whether to display the vertical scrollbar or not

Returns:
display or not

getDisplayTabs

public boolean getDisplayTabs()
get whether to display the tabs or not

Returns:
display or not

getActiveSheetIndex

public int getActiveSheetIndex()
Returns:
the index of the currently displayed sheet

getSelectedTab

public short getSelectedTab()
Deprecated. - Misleading name - use getActiveSheetIndex()

deprecated May 2008


getFirstVisibleTab

public int getFirstVisibleTab()
Returns:
the first visible sheet in the worksheet tab-bar. I.E. the scroll position of the tab-bar.

getDisplayedTab

public short getDisplayedTab()
Deprecated. - Misleading name - use getFirstVisibleTab()

deprecated May 2008


getNumSelectedTabs

public short getNumSelectedTabs()
get the number of selected tabs

Returns:
number of tabs

getTabWidthRatio

public short getTabWidthRatio()
ratio of the width of the tabs to the horizontal scrollbar

Returns:
ratio

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 void serialize(LittleEndianOutput out)
Description copied from class: StandardRecord
Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.
The number of bytes written must equal the record size reported by RecordBase.getRecordSize()} minus four ( record header consiting of a 'ushort sid' and 'ushort reclength' has already been written by thye superclass).

Specified by:
serialize in class StandardRecord

getDataSize

protected int getDataSize()
Specified by:
getDataSize in class StandardRecord

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


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