Package org.apache.poi.hssf.record
Class WindowOneRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.WindowOneRecord
-
- All Implemented Interfaces:
Duplicatable,GenericRecord
public final class WindowOneRecord extends StandardRecord
Stores the attributes of the workbook window. This is basically so the gui knows how big to make the window holding the spreadsheet document.- Version:
- 2.0-pre
-
-
Field Summary
Fields Modifier and Type Field Description static shortsid
-
Constructor Summary
Constructors Constructor Description WindowOneRecord()WindowOneRecord(RecordInputStream in)WindowOneRecord(WindowOneRecord other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WindowOneRecordcopy()intgetActiveSheetIndex()protected intgetDataSize()booleangetDisplayHorizontalScrollbar()get whether to display the horizontal scrollbar or notbooleangetDisplayTabs()get whether to display the tabs or notbooleangetDisplayVerticalScrollbar()get whether to display the vertical scrollbar or notintgetFirstVisibleTab()Map<String,Supplier<?>>getGenericProperties()HSSFRecordTypesgetGenericRecordType()shortgetHeight()get the height of the windowbooleangetHidden()get whether the window is hidden or notshortgetHorizontalHold()get the horizontal position of the window (in 1/20ths of a point)booleangetIconic()get whether the window has been iconized or notshortgetNumSelectedTabs()get the number of selected tabsshortgetOptions()get the options bitmask (see bit setters)shortgetSid()return the non static version of the id for this record.shortgetTabWidthRatio()ratio of the width of the tabs to the horizontal scrollbarshortgetVerticalHold()get the vertical position of the window (in 1/20ths of a point)shortgetWidth()get the width of the windowvoidserialize(LittleEndianOutput out)Write the data content of this BIFF record.voidsetActiveSheetIndex(int index)voidsetDisplayHorizonalScrollbar(boolean scroll)set whether to display the horizontal scrollbar or notvoidsetDisplayTabs(boolean disptabs)set whether to display the tabs or notvoidsetDisplayVerticalScrollbar(boolean scroll)set whether to display the vertical scrollbar or notvoidsetFirstVisibleTab(int t)Sets the first visible sheet in the worksheet tab-bar.voidsetHeight(short h)set teh height of the windowvoidsetHidden(boolean ishidden)set whether the window is hidden or notvoidsetHorizontalHold(short h)set the horizontal position of the window (in 1/20ths of a point)voidsetIconic(boolean isiconic)set whether the window has been iconized or notvoidsetNumSelectedTabs(short n)set the number of selected tabsvoidsetOptions(short o)set the options bitmask (see bit setters)voidsetTabWidthRatio(short r)ratio of the width of the tabs to the horizontal scrollbarvoidsetVerticalHold(short v)set the vertical position of the window (in 1/20ths of a point)voidsetWidth(short w)set the width of the window-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WindowOneRecord
public WindowOneRecord()
-
WindowOneRecord
public WindowOneRecord(WindowOneRecord other)
-
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)
-
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
-
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
-
getFirstVisibleTab
public int getFirstVisibleTab()
- Returns:
- the first visible sheet in the worksheet tab-bar. I.E. the scroll position of the tab-bar.
-
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
-
serialize
public void serialize(LittleEndianOutput out)
Description copied from class:StandardRecordWrite 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 consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).- Specified by:
serializein classStandardRecord- Parameters:
out- the output object
-
getDataSize
protected int getDataSize()
- Specified by:
getDataSizein classStandardRecord
-
getSid
public short getSid()
Description copied from class:Recordreturn the non static version of the id for this record.
-
copy
public WindowOneRecord copy()
- Specified by:
copyin interfaceDuplicatable- Specified by:
copyin classStandardRecord- Returns:
- a deep copy of the implementing class / instance
-
getGenericRecordType
public HSSFRecordTypes getGenericRecordType()
- Specified by:
getGenericRecordTypein interfaceGenericRecord- Specified by:
getGenericRecordTypein classRecord
-
-