| Method from org.apache.cocoon.poi.hssf.record.WindowOneRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_h_hold = LittleEndian.getShort(data, 0 + offset);
field_2_v_hold = LittleEndian.getShort(data, 2 + offset);
field_3_width = LittleEndian.getShort(data, 4 + offset);
field_4_height = LittleEndian.getShort(data, 6 + offset);
field_5_options = LittleEndian.getShort(data, 8 + offset);
field_6_selected_tab = LittleEndian.getShort(data, 10 + offset);
field_7_displayed_tab = LittleEndian.getShort(data, 12 + offset);
field_8_num_selected_tabs = LittleEndian.getShort(data, 14 + offset);
field_9_tab_width_ratio = LittleEndian.getShort(data, 16 + offset);
}
|
public boolean getDisplayHorizontalScrollbar() {
return hscroll.isSet(field_5_options);
}
get whether to display the horizontal scrollbar or not |
public boolean getDisplayTabs() {
return tabs.isSet(field_5_options);
}
get whether to display the tabs or not |
public boolean getDisplayVerticalScrollbar() {
return vscroll.isSet(field_5_options);
}
get whether to display the vertical scrollbar or not |
public short getDisplayedTab() {
return field_7_displayed_tab;
}
get the displayed tab number |
public short getHeight() {
return field_4_height;
}
get the height of the window |
public boolean getHidden() {
return hidden.isSet(field_5_options);
}
get whether the window is hidden or not |
public short getHorizontalHold() {
return field_1_h_hold;
}
get the horizontal position of the window (in 1/20ths of a point) |
public boolean getIconic() {
return iconic.isSet(field_5_options);
}
get whether the window has been iconized or not |
public short getNumSelectedTabs() {
return field_8_num_selected_tabs;
}
get the number of selected tabs |
public short getOptions() {
return field_5_options;
}
get the options bitmask (see bit setters) |
public short getSelectedTab() {
return field_6_selected_tab;
}
get the selected tab number |
public short getSid() {
return this.sid;
}
|
public short getTabWidthRatio() {
return field_9_tab_width_ratio;
}
ratio of the width of the tabs to the horizontal scrollbar |
public short getVerticalHold() {
return field_2_v_hold;
}
get the vertical position of the window (in 1/20ths of a point) |
public short getWidth() {
return field_3_width;
}
get the width of the window |
public byte[] serialize() {
byte[] retval = new byte[ 22 ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2,
(( short ) 0x12)); // 18 bytes (22 total)
LittleEndian.putShort(retval, 4, getHorizontalHold());
LittleEndian.putShort(retval, 6, getVerticalHold());
LittleEndian.putShort(retval, 8, getWidth());
LittleEndian.putShort(retval, 10, getHeight());
LittleEndian.putShort(retval, 12, getOptions());
LittleEndian.putShort(retval, 14, getSelectedTab());
LittleEndian.putShort(retval, 16, getDisplayedTab());
LittleEndian.putShort(retval, 18, getNumSelectedTabs());
LittleEndian.putShort(retval, 20, getTabWidthRatio());
return retval;
}
|
public void setDisplayHorizonalScrollbar(boolean scroll) {
hscroll.setShortBoolean(field_5_options, scroll);
}
set whether to display the horizontal scrollbar or not |
public void setDisplayTabs(boolean disptabs) {
tabs.setShortBoolean(field_5_options, disptabs);
}
set whether to display the tabs or not |
public void setDisplayVerticalScrollbar(boolean scroll) {
vscroll.setShortBoolean(field_5_options, scroll);
}
set whether to display the vertical scrollbar or not |
public void setDisplayedTab(short t) {
field_7_displayed_tab = t;
}
set the displayed tab number |
public void setHeight(short h) {
field_4_height = h;
}
set teh height of the window |
public void setHidden(boolean ishidden) {
hidden.setShortBoolean(field_5_options, ishidden);
}
set whether the window is hidden or not |
public void setHorizontalHold(short h) {
field_1_h_hold = h;
}
set the horizontal position of the window (in 1/20ths of a point) |
public void setIconic(boolean isiconic) {
iconic.setShortBoolean(field_5_options, isiconic);
}
set whether the window has been iconized or not |
public void setNumSelectedTabs(short n) {
field_8_num_selected_tabs = n;
}
set the number of selected tabs |
public void setOptions(short o) {
field_5_options = o;
}
set the options bitmask (see bit setters) |
public void setSelectedTab(short s) {
field_6_selected_tab = s;
}
set the selected tab number |
public void setTabWidthRatio(short r) {
field_9_tab_width_ratio = r;
}
ratio of the width of the tabs to the horizontal scrollbar |
public void setVerticalHold(short v) {
field_2_v_hold = v;
}
set the vertical position of the window (in 1/20ths of a point) |
public void setWidth(short w) {
field_3_width = w;
}
set the width of the window |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[WINDOW1]\n");
buffer.append(" .h_hold = ")
.append(Integer.toHexString(getHorizontalHold())).append("\n");
buffer.append(" .v_hold = ")
.append(Integer.toHexString(getVerticalHold())).append("\n");
buffer.append(" .width = ")
.append(Integer.toHexString(getWidth())).append("\n");
buffer.append(" .height = ")
.append(Integer.toHexString(getHeight())).append("\n");
buffer.append(" .options = ")
.append(Integer.toHexString(getOptions())).append("\n");
buffer.append(" .hidden = ").append(getHidden())
.append("\n");
buffer.append(" .iconic = ").append(getIconic())
.append("\n");
buffer.append(" .hscroll = ")
.append(getDisplayHorizontalScrollbar()).append("\n");
buffer.append(" .vscroll = ")
.append(getDisplayVerticalScrollbar()).append("\n");
buffer.append(" .tabs = ").append(getDisplayTabs())
.append("\n");
buffer.append(" .selectedtab = ")
.append(Integer.toHexString(getSelectedTab())).append("\n");
buffer.append(" .displayedtab = ")
.append(Integer.toHexString(getDisplayedTab())).append("\n");
buffer.append(" .numselectedtabs = ")
.append(Integer.toHexString(getNumSelectedTabs())).append("\n");
buffer.append(" .tabwidthratio = ")
.append(Integer.toHexString(getTabWidthRatio())).append("\n");
buffer.append("[/WINDOW1]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A WINDOW1 RECORD");
}
}
|