Methods Summary |
---|
public java.lang.Object | clone()
WindowTwoRecord rec = new WindowTwoRecord();
rec.field_1_options = field_1_options;
rec.field_2_top_row = field_2_top_row;
rec.field_3_left_col = field_3_left_col;
rec.field_4_header_color = field_4_header_color;
rec.field_5_page_break_zoom = field_5_page_break_zoom;
rec.field_6_normal_zoom = field_6_normal_zoom;
rec.field_7_reserved = field_7_reserved;
return rec;
|
protected void | fillFields(org.apache.poi.hssf.record.RecordInputStream in)
int size = in.remaining();
field_1_options = in.readShort();
field_2_top_row = in.readShort();
field_3_left_col = in.readShort();
field_4_header_color = in.readInt();
if (size > 10)
{
field_5_page_break_zoom = in.readShort();
field_6_normal_zoom = in.readShort();
}
if (size > 14)
{ // there is a special case of this record that has only 14 bytes...undocumented!
field_7_reserved = in.readInt();
}
|
public boolean | getArabic()is this arabic?
return arabic.isSet(field_1_options);
|
public boolean | getDefaultHeader()get whether the window should display a default header
return defaultHeader.isSet(field_1_options);
|
public boolean | getDisplayFormulas()get whether the window should display formulas
return displayFormulas.isSet(field_1_options);
|
public boolean | getDisplayGridlines()get whether the window should display gridlines
return displayGridlines.isSet(field_1_options);
|
public boolean | getDisplayGuts()get whether the outline symbols are displaed
return displayGuts.isSet(field_1_options);
|
public boolean | getDisplayRowColHeadings()get whether the window should display row and column headings
return displayRowColHeadings.isSet(field_1_options);
|
public boolean | getDisplayZeros()get whether the window should display zero values
return displayZeros.isSet(field_1_options);
|
public boolean | getFreezePanes()get whether the window should freeze panes
return freezePanes.isSet(field_1_options);
|
public boolean | getFreezePanesNoSplit()freeze unsplit panes or not
return freezePanesNoSplit.isSet(field_1_options);
|
public int | getHeaderColor()get the palette index for the header color
return field_4_header_color;
|
public short | getLeftCol()get the leftmost column displayed in the window
return field_3_left_col;
|
public short | getNormalZoom()get the zoom magnification in normal view
return field_6_normal_zoom;
|
public short | getOptions()get the options bitmask or just use the bit setters.
return field_1_options;
|
public short | getPageBreakZoom()zoom magification in page break view
return field_5_page_break_zoom;
|
public boolean | getPaged()is the sheet currently displayed in the window
return paged.isSet(field_1_options);
|
public int | getRecordSize()
return 22;
|
public int | getReserved()get the reserved bits - why would you do this?
return field_7_reserved;
|
public boolean | getSavedInPageBreakPreview()was the sheet saved in page break view
return savedInPageBreakPreview.isSet(field_1_options);
|
public boolean | getSelected()sheet tab is selected
return selected.isSet(field_1_options);
|
public short | getSid()
return sid;
|
public short | getTopRow()get the top row visible in the window
return field_2_top_row;
|
public int | serialize(int offset, byte[] data)
LittleEndian.putShort(data, 0 + offset, sid);
LittleEndian.putShort(data, 2 + offset, ( short ) 18);
LittleEndian.putShort(data, 4 + offset, getOptions());
LittleEndian.putShort(data, 6 + offset, getTopRow());
LittleEndian.putShort(data, 8 + offset, getLeftCol());
LittleEndian.putInt(data, 10 + offset, getHeaderColor());
LittleEndian.putShort(data, 14 + offset, getPageBreakZoom());
LittleEndian.putShort(data, 16 + offset, getNormalZoom());
LittleEndian.putInt(data, 18 + offset, getReserved());
return getRecordSize();
|
public void | setArabic(boolean isarabic)is this arabic?
field_1_options = arabic.setShortBoolean(field_1_options, isarabic);
|
public void | setDefaultHeader(boolean header)set whether the window should display a default header
field_1_options = defaultHeader.setShortBoolean(field_1_options, header);
|
public void | setDisplayFormulas(boolean formulas)set whether the window should display formulas
field_1_options = displayFormulas.setShortBoolean(field_1_options, formulas);
|
public void | setDisplayGridlines(boolean gridlines)set whether the window should display gridlines
field_1_options = displayGridlines.setShortBoolean(field_1_options, gridlines);
|
public void | setDisplayGuts(boolean guts)set whether the outline symbols are displaed
field_1_options = displayGuts.setShortBoolean(field_1_options, guts);
|
public void | setDisplayRowColHeadings(boolean headings)set whether the window should display row and column headings
field_1_options = displayRowColHeadings.setShortBoolean(field_1_options, headings);
|
public void | setDisplayZeros(boolean zeros)set whether the window should display zero values
field_1_options = displayZeros.setShortBoolean(field_1_options, zeros);
|
public void | setFreezePanes(boolean freezepanes)set whether the window should freeze panes
field_1_options = freezePanes.setShortBoolean(field_1_options, freezepanes);
|
public void | setFreezePanesNoSplit(boolean freeze)freeze unsplit panes or not
field_1_options = freezePanesNoSplit.setShortBoolean(field_1_options, freeze);
|
public void | setHeaderColor(int color)set the palette index for the header color
field_4_header_color = color;
|
public void | setLeftCol(short leftCol)set the leftmost column displayed in the window
field_3_left_col = leftCol;
|
public void | setNormalZoom(short zoom)set the zoom magnification in normal view
field_6_normal_zoom = zoom;
|
public void | setOptions(short options)set the options bitmask or just use the bit setters.
field_1_options = options;
|
public void | setPageBreakZoom(short zoom)zoom magification in page break view
field_5_page_break_zoom = zoom;
|
public void | setPaged(boolean p)is the sheet currently displayed in the window
field_1_options = paged.setShortBoolean(field_1_options, p);
|
public void | setReserved(int reserved)set the reserved (don't do this) value
field_7_reserved = reserved;
|
public void | setSavedInPageBreakPreview(boolean p)was the sheet saved in page break view
field_1_options = savedInPageBreakPreview.setShortBoolean(field_1_options, p);
|
public void | setSelected(boolean sel)sheet tab is selected
field_1_options = selected.setShortBoolean(field_1_options, sel);
|
public void | setTopRow(short topRow)set the top row visible in the window
field_2_top_row = topRow;
|
public java.lang.String | toString()
StringBuffer buffer = new StringBuffer();
buffer.append("[WINDOW2]\n");
buffer.append(" .options = ")
.append(Integer.toHexString(getOptions())).append("\n");
buffer.append(" .dispformulas= ").append(getDisplayFormulas())
.append("\n");
buffer.append(" .dispgridlins= ").append(getDisplayGridlines())
.append("\n");
buffer.append(" .disprcheadin= ")
.append(getDisplayRowColHeadings()).append("\n");
buffer.append(" .freezepanes = ").append(getFreezePanes())
.append("\n");
buffer.append(" .displayzeros= ").append(getDisplayZeros())
.append("\n");
buffer.append(" .defaultheadr= ").append(getDefaultHeader())
.append("\n");
buffer.append(" .arabic = ").append(getArabic())
.append("\n");
buffer.append(" .displayguts = ").append(getDisplayGuts())
.append("\n");
buffer.append(" .frzpnsnosplt= ")
.append(getFreezePanesNoSplit()).append("\n");
buffer.append(" .selected = ").append(getSelected())
.append("\n");
buffer.append(" .paged = ").append(getPaged())
.append("\n");
buffer.append(" .svdinpgbrkpv= ")
.append(getSavedInPageBreakPreview()).append("\n");
buffer.append(" .toprow = ")
.append(Integer.toHexString(getTopRow())).append("\n");
buffer.append(" .leftcol = ")
.append(Integer.toHexString(getLeftCol())).append("\n");
buffer.append(" .headercolor = ")
.append(Integer.toHexString(getHeaderColor())).append("\n");
buffer.append(" .pagebreakzoom = ")
.append(Integer.toHexString(getPageBreakZoom())).append("\n");
buffer.append(" .normalzoom = ")
.append(Integer.toHexString(getNormalZoom())).append("\n");
buffer.append(" .reserved = ")
.append(Integer.toHexString(getReserved())).append("\n");
buffer.append("[/WINDOW2]\n");
return buffer.toString();
|
protected void | validateSid(short id)
if (id != sid)
{
throw new RecordFormatException("NOT A valid WindowTwo RECORD");
}
|