| Method from org.apache.cocoon.poi.hssf.record.ExtendedFormatRecord Detail: |
protected void fillFields(byte[] data,
short size,
int offset) {
field_1_font_index = LittleEndian.getShort(data,
0 + offset);
field_2_format_index = LittleEndian.getShort(data,
2 + offset);
field_3_cell_options = LittleEndian.getShort(data,
4 + offset);
field_4_alignment_options = LittleEndian.getShort(data,
6 + offset);
field_5_indention_options = LittleEndian.getShort(data,
8 + offset);
field_6_border_options = LittleEndian.getShort(data,
10 + offset);
field_7_palette_options = LittleEndian.getShort(data,
12 + offset);
field_8_adtl_palette_options = LittleEndian.getInt(data, 14 + offset);
field_9_fill_palette_options = LittleEndian.getShort(data,
18 + offset);
}
|
public boolean get123Prefix() {
return _123_prefix.isSet(field_3_cell_options);
}
get some old holdover from lotus 123. Who cares, its all over for Lotus.
RIP Lotus. |
public short getAdtlDiag() {
return ( short ) _adtl_diag.getValue(field_8_adtl_palette_options);
}
get for diagonal borders? No idea (its a palette color for the other function
we didn't know what was?) |
public short getAdtlDiagLineStyle() {
return ( short ) _adtl_diag_line_style
.getValue(field_8_adtl_palette_options);
}
get the diagonal border line style? Who the heck ever heard of a diagonal border? |
public short getAdtlFillPattern() {
return ( short ) _adtl_fill_pattern
.getValue(field_8_adtl_palette_options);
}
get the additional fill pattern - ??? |
public int getAdtlPaletteOptions() {
return field_8_adtl_palette_options;
}
get the additional palette options bitmask (see individual bit getter methods
that reference this method) |
public short getAlignment() {
return _alignment.getShortValue(field_4_alignment_options);
}
get the horizontal alignment of the cell. |
public short getAlignmentOptions() {
return field_4_alignment_options;
}
get the alignment options bitmask. See corresponding bitgetter methods
that reference this one. |
public short getBorderBottom() {
return _border_bottom.getShortValue(field_6_border_options);
}
get the borderline style for the bottom border |
public short getBorderLeft() {
return _border_left.getShortValue(field_6_border_options);
}
get the borderline style for the left border |
public short getBorderOptions() {
return field_6_border_options;
}
get the border options bitmask (see the corresponding bit getter methods
that reference back to this one) |
public short getBorderRight() {
return _border_right.getShortValue(field_6_border_options);
}
get the borderline style for the right border |
public short getBorderTop() {
return _border_top.getShortValue(field_6_border_options);
}
get the borderline style for the top border |
public short getBottomBorderPaletteIdx() {
return ( short ) _bottom_border_palette_idx
.getValue(field_8_adtl_palette_options);
}
get the palette index for the bottom border |
public short getCellOptions() {
return field_3_cell_options;
}
gets the options bitmask - you can also use corresponding option bit getters
(see other methods that reference this one) |
public short getDiag() {
return _diag.getShortValue(field_7_palette_options);
}
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. |
public short getFillBackground() {
return _fill_background.getShortValue(field_9_fill_palette_options);
}
get the background palette color index |
public short getFillForeground() {
return _fill_foreground.getShortValue(field_9_fill_palette_options);
}
get the foreground palette color index |
public short getFillPaletteOptions() {
return field_9_fill_palette_options;
}
get the fill palette options bitmask (see indivdual bit getters that
reference this method) |
public short getFontIndex() {
return field_1_font_index;
}
get the index to the FONT record (which font to use 0 based) |
public short getFormatIndex() {
return field_2_format_index;
}
get the index to the Format record (which FORMAT to use 0-based) |
public short getIndent() {
return _indent.getShortValue(field_5_indention_options);
}
get indention (not sure of the units, think its spaces) |
public short getIndentionOptions() {
return field_5_indention_options;
}
get the indent options bitmask (see corresponding bit getters that reference
this field) |
public short getJustifyLast() {
// for far east languages supported only for format always 0 for US
return _justify_last.getShortValue(field_4_alignment_options);
}
Dunno. Docs just say this is for far east versions.. (I'm guessing it
justifies for right-to-left read languages) |
public short getLeftBorderPaletteIdx() {
return _left_border_palette_idx
.getShortValue(field_7_palette_options);
}
get the palette index for the left border color |
public boolean getMergeCells() {
return _merge_cells.isSet(field_5_indention_options);
}
get whether to merge cells |
public short getPaletteOptions() {
return field_7_palette_options;
}
get the palette options bitmask (see the individual bit getter methods that
reference this one) |
public short getParentIndex() {
return _parent_index.getShortValue(field_3_cell_options);
}
for cell XF types this is the parent style (usually 0/normal). For
style this should be NULL. |
public short getReadingOrder() {
// only for far east always 0 in US
return _reading_order.getShortValue(field_5_indention_options);
}
get the reading order for far east versions (0 - Context, 1 - Left to right,
2 - right to left) - We could use some help with support for the far east. |
public short getRightBorderPaletteIdx() {
return _right_border_palette_idx
.getShortValue(field_7_palette_options);
}
get the palette index for the right border color |
public short getRotation() {
return _rotation.getShortValue(field_4_alignment_options);
}
get the degree of rotation. (I've not actually seen this used anywhere) |
public boolean getShrinkToFit() {
return _shrink_to_fit.isSet(field_5_indention_options);
}
get whether to shrink the text to fit |
public short getSid() {
return this.sid;
}
|
public short getTopBorderPaletteIdx() {
return ( short ) _top_border_palette_idx
.getValue(field_8_adtl_palette_options);
}
get the palette index for the top border |
public short getVerticalAlignment() {
return _vertical_alignment.getShortValue(field_4_alignment_options);
}
get the vertical alignment of text in the cell |
public boolean getWrapText() {
return _wrap_text.isSet(field_4_alignment_options);
}
get whether to wrap the text in the cell |
public short getXFType() {
return _xf_type.getShortValue(field_3_cell_options);
}
get whether the cell is a cell or style XFRecord |
public boolean isHidden() {
return _hidden.isSet(field_3_cell_options);
}
get whether the cell is hidden or not |
public boolean isIndentNotParentAlignment() {
return _indent_not_parent_alignment.isSet(field_5_indention_options);
}
get whether or not to use the alignment in this XF instead of the parent XF. |
public boolean isIndentNotParentBorder() {
return _indent_not_parent_border.isSet(field_5_indention_options);
}
get whether or not to use the border in this XF instead of the parent XF. |
public boolean isIndentNotParentCellOptions() {
return _indent_not_parent_cell_options
.isSet(field_5_indention_options);
}
get whether or not to use the locking/hidden in this XF instead of the parent XF. |
public boolean isIndentNotParentFont() {
return _indent_not_parent_font.isSet(field_5_indention_options);
}
get whether or not to use the font in this XF instead of the parent XF. |
public boolean isIndentNotParentFormat() {
return _indent_not_parent_format.isSet(field_5_indention_options);
}
get whether or not to use the format in this XF instead of the parent XF. |
public boolean isIndentNotParentPattern() {
return _indent_not_parent_pattern.isSet(field_5_indention_options);
}
get whether or not to use the pattern in this XF instead of the parent XF.
(foregrount/background) |
public boolean isLocked() {
return _locked.isSet(field_3_cell_options);
}
get whether the cell is locked or not |
public byte[] serialize() {
byte[] retval = new byte[ 24 ];
LittleEndian.putShort(retval, 0, sid);
LittleEndian.putShort(retval, 2, ( short ) (20)); // 24 - 4(sid/len)
LittleEndian.putShort(retval, 4, getFontIndex());
LittleEndian.putShort(retval, 6, getFormatIndex());
LittleEndian.putShort(retval, 8, getCellOptions());
LittleEndian.putShort(retval, 10, getAlignmentOptions());
LittleEndian.putShort(retval, 12, getIndentionOptions());
LittleEndian.putShort(retval, 14, getBorderOptions());
LittleEndian.putShort(retval, 16, getPaletteOptions());
LittleEndian.putInt(retval, 18, getAdtlPaletteOptions());
LittleEndian.putShort(retval, 22, getFillPaletteOptions());
return retval;
}
|
public void set123Prefix(boolean prefix) {
field_3_cell_options =
_123_prefix.setShortBoolean(field_3_cell_options, prefix);
}
set some old holdover from lotus 123. Who cares, its all over for Lotus.
RIP Lotus. |
public void setAdtlDiag(short diag) {
field_8_adtl_palette_options =
_adtl_diag.setValue(field_8_adtl_palette_options, diag);
}
set for diagonal borders? No idea (its a palette color for the other function
we didn't know what was?) |
public void setAdtlDiagLineStyle(short diag) {
field_8_adtl_palette_options =
_adtl_diag_line_style.setValue(field_8_adtl_palette_options,
diag);
}
set the diagonal border line style? Who the heck ever heard of a diagonal border? |
public void setAdtlFillPattern(short fill) {
field_8_adtl_palette_options =
_adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
}
set the fill pattern - ??? |
public void setAdtlPaletteOptions(short options) {
field_8_adtl_palette_options = options;
}
set the additional palette options bitmask (see individual bitsetter methods
that reference this method) |
public void setAlignment(short align) {
field_4_alignment_options =
_alignment.setShortValue(field_4_alignment_options, align);
}
set the horizontal alignment of the cell. |
public void setAlignmentOptions(short options) {
field_4_alignment_options = options;
}
set the alignment options bitmask. See corresponding bitsetter methods
that reference this one. |
public void setBorderBottom(short border) {
field_6_border_options =
_border_bottom.setShortValue(field_6_border_options, border);
}
set the border line style for the bottom border |
public void setBorderLeft(short border) {
field_6_border_options =
_border_left.setShortValue(field_6_border_options, border);
}
set the borderline style for the left border |
public void setBorderOptions(short options) {
field_6_border_options = options;
}
set the border options bitmask (see the corresponding bitsetter methods
that reference back to this one) |
public void setBorderRight(short border) {
field_6_border_options =
_border_right.setShortValue(field_6_border_options, border);
}
set the border line style for the right border |
public void setBorderTop(short border) {
field_6_border_options =
_border_top.setShortValue(field_6_border_options, border);
}
set the border line style for the top border |
public void setBottomBorderPaletteIdx(short border) {
field_8_adtl_palette_options =
_bottom_border_palette_idx.setValue(field_8_adtl_palette_options,
border);
}
set the palette index for the bottom border |
public void setCellOptions(short options) {
field_3_cell_options = options;
}
sets the options bitmask - you can also use corresponding option bit setters
(see other methods that reference this one) |
public void setDiag(short diag) {
field_7_palette_options = _diag.setShortValue(field_7_palette_options,
diag);
}
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none.. |
public void setFillBackground(short color) {
field_9_fill_palette_options =
_fill_background.setShortValue(field_9_fill_palette_options,
color);
}
set the background palette color index |
public void setFillForeground(short color) {
field_9_fill_palette_options =
_fill_foreground.setShortValue(field_9_fill_palette_options,
color);
}
set the foreground palette color index |
public void setFillPaletteOptions(short options) {
field_9_fill_palette_options = options;
}
set the fill palette options bitmask (see |
public void setFontIndex(short index) {
field_1_font_index = index;
}
set the index to the FONT record (which font to use 0 based) |
public void setFormatIndex(short index) {
field_2_format_index = index;
}
set the index to the Format record (which FORMAT to use 0-based) |
public void setHidden(boolean hidden) {
field_3_cell_options = _hidden.setShortBoolean(field_3_cell_options,
hidden);
}
set whether the cell is hidden or not |
public void setIndent(short indent) {
field_5_indention_options =
_indent.setShortValue(field_5_indention_options, indent);
}
set indention (not sure of the units, think its spaces) |
public void setIndentNotParentAlignment(boolean alignment) {
field_5_indention_options =
_indent_not_parent_alignment
.setShortBoolean(field_5_indention_options, alignment);
}
set whether or not to use the alignment in this XF instead of the parent XF. |
public void setIndentNotParentBorder(boolean border) {
field_5_indention_options =
_indent_not_parent_border
.setShortBoolean(field_5_indention_options, border);
}
set whether or not to use the border in this XF instead of the parent XF. |
public void setIndentNotParentCellOptions(boolean options) {
field_5_indention_options =
_indent_not_parent_cell_options
.setShortBoolean(field_5_indention_options, options);
}
set whether or not to use the locking/hidden in this XF instead of the parent XF. |
public void setIndentNotParentFont(boolean font) {
field_5_indention_options =
_indent_not_parent_font.setShortBoolean(field_5_indention_options,
font);
}
set whether or not to use the font in this XF instead of the parent XF. |
public void setIndentNotParentFormat(boolean parent) {
field_5_indention_options =
_indent_not_parent_format
.setShortBoolean(field_5_indention_options, parent);
}
set whether or not to use the format in this XF instead of the parent XF. |
public void setIndentNotParentPattern(boolean pattern) {
field_5_indention_options =
_indent_not_parent_pattern
.setShortBoolean(field_5_indention_options, pattern);
}
set whether or not to use the pattern in this XF instead of the parent XF.
(foregrount/background) |
public void setIndentionOptions(short options) {
field_5_indention_options = options;
}
set the indent options bitmask (see corresponding bitmask setters that reference
this field) |
public void setJustifyLast(short justify) {
// for far east languages supported only for format always 0 for US
field_4_alignment_options =
_justify_last.setShortValue(field_4_alignment_options, justify);
}
Dunno. Docs just say this is for far east versions.. (I'm guessing it
justifies for right-to-left read languages) |
public void setLeftBorderPaletteIdx(short border) {
field_7_palette_options =
_left_border_palette_idx.setShortValue(field_7_palette_options,
border);
}
set the palette index for the left border color |
public void setLocked(boolean locked) {
field_3_cell_options = _locked.setShortBoolean(field_3_cell_options,
locked);
}
set whether the cell is locked or not |
public void setMergeCells(boolean merge) {
field_5_indention_options =
_merge_cells.setShortBoolean(field_5_indention_options, merge);
}
set whether to merge cells |
public void setPaletteOptions(short options) {
field_7_palette_options = options;
}
set the palette options bitmask (see the individual bitsetter methods that
reference this one) |
public void setParentIndex(short parent) {
field_3_cell_options =
_parent_index.setShortValue(field_3_cell_options, parent);
}
for cell XF types this is the parent style (usually 0/normal). For
style this should be NULL. |
public void setReadingOrder(short order) {
// only for far east always 0 in US
field_5_indention_options =
_reading_order.setShortValue(field_5_indention_options, order);
}
set the reading order for far east versions (0 - Context, 1 - Left to right,
2 - right to left) - We could use some help with support for the far east. |
public void setRightBorderPaletteIdx(short border) {
field_7_palette_options =
_right_border_palette_idx.setShortValue(field_7_palette_options,
border);
}
set the palette index for the right border color |
public void setRotation(short rotation) {
field_4_alignment_options =
_rotation.setShortValue(field_4_alignment_options, rotation);
}
set the degree of rotation. (I've not actually seen this used anywhere) |
public void setShrinkToFit(boolean shrink) {
field_5_indention_options =
_shrink_to_fit.setShortBoolean(field_5_indention_options, shrink);
}
set whether to shrink the text to fit |
public void setTopBorderPaletteIdx(short border) {
field_8_adtl_palette_options =
_top_border_palette_idx.setValue(field_8_adtl_palette_options,
border);
}
set the palette index for the top border |
public void setVerticalAlignment(short align) {
field_4_alignment_options =
_vertical_alignment.setShortValue(field_4_alignment_options,
align);
}
set the vertical alignment of text in the cell |
public void setWrapText(boolean wrapped) {
field_4_alignment_options =
_wrap_text.setShortBoolean(field_4_alignment_options, wrapped);
}
set whether to wrap the text in the cell |
public void setXFType(short type) {
field_3_cell_options = _xf_type.setShortValue(field_3_cell_options,
type);
}
set whether the cell is a cell or style XFRecord |
public String toString() {
StringBuffer buffer = new StringBuffer();
buffer.append("[EXTENDEDFORMAT]\n");
if (getXFType() == XF_STYLE)
{
buffer.append(" STYLE_RECORD_TYPE\n");
}
else if (getXFType() == XF_CELL)
{
buffer.append(" CELL_RECORD_TYPE\n");
}
buffer.append(" .fontindex = ")
.append(Integer.toHexString(getFontIndex())).append("\n");
buffer.append(" .formatindex = ")
.append(Integer.toHexString(getFormatIndex())).append("\n");
buffer.append(" .celloptions = ")
.append(Integer.toHexString(getCellOptions())).append("\n");
buffer.append(" .islocked = ").append(isLocked())
.append("\n");
buffer.append(" .ishidden = ").append(isHidden())
.append("\n");
buffer.append(" .recordtype= ")
.append(Integer.toHexString(getXFType())).append("\n");
buffer.append(" .parentidx = ")
.append(Integer.toHexString(getParentIndex())).append("\n");
buffer.append(" .alignmentoptions= ")
.append(Integer.toHexString(getAlignmentOptions())).append("\n");
buffer.append(" .alignment = ").append(getAlignment())
.append("\n");
buffer.append(" .wraptext = ").append(getWrapText())
.append("\n");
buffer.append(" .valignment= ")
.append(Integer.toHexString(getVerticalAlignment())).append("\n");
buffer.append(" .justlast = ")
.append(Integer.toHexString(getJustifyLast())).append("\n");
buffer.append(" .rotation = ")
.append(Integer.toHexString(getRotation())).append("\n");
buffer.append(" .indentionoptions= ")
.append(Integer.toHexString(getIndentionOptions())).append("\n");
buffer.append(" .indent = ")
.append(Integer.toHexString(getIndent())).append("\n");
buffer.append(" .shrinktoft= ").append(getShrinkToFit())
.append("\n");
buffer.append(" .mergecells= ").append(getMergeCells())
.append("\n");
buffer.append(" .readngordr= ")
.append(Integer.toHexString(getReadingOrder())).append("\n");
buffer.append(" .formatflag= ")
.append(isIndentNotParentFormat()).append("\n");
buffer.append(" .fontflag = ")
.append(isIndentNotParentFont()).append("\n");
buffer.append(" .prntalgnmt= ")
.append(isIndentNotParentAlignment()).append("\n");
buffer.append(" .borderflag= ")
.append(isIndentNotParentBorder()).append("\n");
buffer.append(" .paternflag= ")
.append(isIndentNotParentPattern()).append("\n");
buffer.append(" .celloption= ")
.append(isIndentNotParentCellOptions()).append("\n");
buffer.append(" .borderoptns = ")
.append(Integer.toHexString(getBorderOptions())).append("\n");
buffer.append(" .lftln = ")
.append(Integer.toHexString(getBorderLeft())).append("\n");
buffer.append(" .rgtln = ")
.append(Integer.toHexString(getBorderRight())).append("\n");
buffer.append(" .topln = ")
.append(Integer.toHexString(getBorderTop())).append("\n");
buffer.append(" .btmln = ")
.append(Integer.toHexString(getBorderBottom())).append("\n");
buffer.append(" .paleteoptns = ")
.append(Integer.toHexString(getPaletteOptions())).append("\n");
buffer.append(" .leftborder= ")
.append(Integer.toHexString(getLeftBorderPaletteIdx()))
.append("\n");
buffer.append(" .rghtborder= ")
.append(Integer.toHexString(getRightBorderPaletteIdx()))
.append("\n");
buffer.append(" .diag = ")
.append(Integer.toHexString(getDiag())).append("\n");
buffer.append(" .paleteoptn2 = ")
.append(Integer.toHexString(getAdtlPaletteOptions()))
.append("\n");
buffer.append(" .topborder = ")
.append(Integer.toHexString(getTopBorderPaletteIdx()))
.append("\n");
buffer.append(" .botmborder= ")
.append(Integer.toHexString(getBottomBorderPaletteIdx()))
.append("\n");
buffer.append(" .adtldiag = ")
.append(Integer.toHexString(getAdtlDiag())).append("\n");
buffer.append(" .diaglnstyl= ")
.append(Integer.toHexString(getAdtlDiagLineStyle())).append("\n");
buffer.append(" .fillpattrn= ")
.append(Integer.toHexString(getAdtlFillPattern())).append("\n");
buffer.append(" .fillpaloptn = ")
.append(Integer.toHexString(getFillPaletteOptions()))
.append("\n");
buffer.append(" .foreground= ")
.append(Integer.toHexString(getFillForeground())).append("\n");
buffer.append(" .background= ")
.append(Integer.toHexString(getFillBackground())).append("\n");
buffer.append("[/EXTENDEDFORMAT]\n");
return buffer.toString();
}
|
protected void validateSid(short id) {
if (id != sid)
{
throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
}
}
|