| Method from org.apache.cocoon.poi.hssf.record.WindowTwoRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_options = LittleEndian.getShort(data, 0 + offset);
field_2_top_row = LittleEndian.getShort(data, 2 + offset);
field_3_left_col = LittleEndian.getShort(data, 4 + offset);
field_4_header_color = LittleEndian.getInt(data, 6 + offset);
if (size > 10)
{
field_5_page_break_zoom = LittleEndian.getShort(data,
10 + offset);
field_6_normal_zoom = LittleEndian.getShort(data,
12 + offset);
}
if (size > 14)
{ // there is a special case of this record that has only 14 bytes...undocumented!
field_7_reserved = LittleEndian.getInt(data, 14 + offset);
}
}
|
public boolean getArabic() {
return arabic.isSet(field_1_options);
}
|
public boolean getDefaultHeader() {
return defaultHeader.isSet(field_1_options);
}
get whether the window should display a default header |
public boolean getDisplayFormulas() {
return displayFormulas.isSet(field_1_options);
}
get whether the window should display formulas |
public boolean getDisplayGridlines() {
return displayGridlines.isSet(field_1_options);
}
get whether the window should display gridlines |
public boolean getDisplayGuts() {
return displayGuts.isSet(field_1_options);
}
get whether the outline symbols are displaed |
public boolean getDisplayRowColHeadings() {
return displayRowColHeadings.isSet(field_1_options);
}
get whether the window should display row and column headings |
public boolean getDisplayZeros() {
return displayZeros.isSet(field_1_options);
}
get whether the window should display zero values |
public boolean getFreezePanes() {
return freezePanes.isSet(field_1_options);
}
get whether the window should freeze panes |
public boolean getFreezePanesNoSplit() {
return freezePanesNoSplit.isSet(field_1_options);
}
freeze unsplit panes or not |
public int getHeaderColor() {
return field_4_header_color;
}
get the palette index for the header color |
public short getLeftCol() {
return field_3_left_col;
}
get the leftmost column displayed in the window |
public short getNormalZoom() {
return field_6_normal_zoom;
}
get the zoom magnification in normal view |
public short getOptions() {
return field_1_options;
}
get the options bitmask or just use the bit setters. |
public short getPageBreakZoom() {
return field_5_page_break_zoom;
}
zoom magification in page break view |
public boolean getPaged() {
return paged.isSet(field_1_options);
}
is the sheet currently displayed in the window |
public int getReserved() {
return field_7_reserved;
}
get the reserved bits - why would you do this? |
public boolean getSavedInPageBreakPreview() {
return savedInPageBreakPreview.isSet(field_1_options);
}
was the sheet saved in page break view |
public boolean getSelected() {
return selected.isSet(field_1_options);
}
|
public short getSid() {
return this.sid;
}
|
public short getTopRow() {
return field_2_top_row;
}
get the top row visible in the window |
public byte[] serialize() {
byte[] retval = new byte[ 22 ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2, ( short ) 18);
LittleEndian.putShort(retval, 4, getOptions());
LittleEndian.putShort(retval, 6, getTopRow());
LittleEndian.putShort(retval, 8, getLeftCol());
LittleEndian.putInt(retval, 10, getHeaderColor());
LittleEndian.putShort(retval, 14, getPageBreakZoom());
LittleEndian.putShort(retval, 16, getNormalZoom());
LittleEndian.putInt(retval, 18, getReserved());
return retval;
}
|
public void setArabic(boolean isarabic) {
arabic.setBoolean(field_1_options, isarabic);
}
|
public void setDefaultHeader(boolean header) {
defaultHeader.setBoolean(field_1_options, header);
}
set whether the window should display a default header |
public void setDisplayFormulas(boolean formulas) {
displayFormulas.setBoolean(field_1_options, formulas);
}
set whether the window should display formulas |
public void setDisplayGridlines(boolean gridlines) {
displayGridlines.setBoolean(field_1_options, gridlines);
}
set whether the window should display gridlines |
public void setDisplayGuts(boolean guts) {
displayGuts.setBoolean(field_1_options, guts);
}
set whether the outline symbols are displaed |
public void setDisplayRowColHeadings(boolean headings) {
displayRowColHeadings.setBoolean(field_1_options, headings);
}
set whether the window should display row and column headings |
public void setDisplayZeros(boolean zeros) {
displayZeros.setBoolean(field_1_options, zeros);
}
set whether the window should display zero values |
public void setFreezePanes(boolean freezepanes) {
freezePanes.setBoolean(field_1_options, freezepanes);
}
set whether the window should freeze panes |
public void setFreezePanesNoSplit(boolean freeze) {
freezePanesNoSplit.setBoolean(field_1_options, freeze);
}
freeze unsplit panes or not |
public void setHeaderColor(int color) {
field_4_header_color = color;
}
set the palette index for the header color |
public void setLeftCol(short leftCol) {
field_3_left_col = leftCol;
}
set the leftmost column displayed in the window |
public void setNormalZoom(short zoom) {
field_6_normal_zoom = zoom;
}
set the zoom magnification in normal view |
public void setOptions(short options) {
field_1_options = options;
}
set the options bitmask or just use the bit setters. |
public void setPageBreakZoom(short zoom) {
field_5_page_break_zoom = zoom;
}
zoom magification in page break view |
public void setPaged(boolean p) {
paged.setBoolean(field_1_options, p);
}
is the sheet currently displayed in the window |
public void setReserved(int reserved) {
field_7_reserved = reserved;
}
set the reserved (don't do this) value |
public void setSavedInPageBreakPreview(boolean p) {
savedInPageBreakPreview.setBoolean(field_1_options, p);
}
was the sheet saved in page break view |
public void setSelected(boolean sel) {
selected.setBoolean(field_1_options, sel);
}
|
public void setTopRow(short topRow) {
field_2_top_row = topRow;
}
set the top row visible in the window |
public 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");
}
}
|