FileDocCategorySizeDatePackage
ExtendedFormatRecord.javaAPI DocApache Poi 3.0.153155Mon Jan 01 12:39:40 GMT 2007org.apache.poi.hssf.record

ExtendedFormatRecord

public class ExtendedFormatRecord extends Record
Title: Extended Format Record Description: Probably one of the more complex records. There are two breeds: Style and Cell.

It should be noted that fields in the extended format record are somewhat arbitrary. Almost all of the fields are bit-level, but we name them as best as possible by functional group. In some places this is better than others.

REFERENCE: PG 426 Microsoft Excel 97 Developer's Kit (ISBN: 1-57231-498-2)

author
Andrew C. Oliver (acoliver at apache dot org)
version
2.0-pre

Fields Summary
public static final short
sid
public static final short
NULL
public static final short
XF_STYLE
public static final short
XF_CELL
public static final short
NONE
public static final short
THIN
public static final short
MEDIUM
public static final short
DASHED
public static final short
DOTTED
public static final short
THICK
public static final short
DOUBLE
public static final short
HAIR
public static final short
MEDIUM_DASHED
public static final short
DASH_DOT
public static final short
MEDIUM_DASH_DOT
public static final short
DASH_DOT_DOT
public static final short
MEDIUM_DASH_DOT_DOT
public static final short
SLANTED_DASH_DOT
public static final short
GENERAL
public static final short
LEFT
public static final short
CENTER
public static final short
RIGHT
public static final short
FILL
public static final short
JUSTIFY
public static final short
CENTER_SELECTION
public static final short
VERTICAL_TOP
public static final short
VERTICAL_CENTER
public static final short
VERTICAL_BOTTOM
public static final short
VERTICAL_JUSTIFY
public static final short
NO_FILL
public static final short
SOLID_FILL
public static final short
FINE_DOTS
public static final short
ALT_BARS
public static final short
SPARSE_DOTS
public static final short
THICK_HORZ_BANDS
public static final short
THICK_VERT_BANDS
public static final short
THICK_BACKWARD_DIAG
public static final short
THICK_FORWARD_DIAG
public static final short
BIG_SPOTS
public static final short
BRICKS
public static final short
THIN_HORZ_BANDS
public static final short
THIN_VERT_BANDS
public static final short
THIN_BACKWARD_DIAG
public static final short
THIN_FORWARD_DIAG
public static final short
SQUARES
public static final short
DIAMONDS
private short
field_1_font_index
private short
field_2_format_index
private static final BitField
_locked
private static final BitField
_hidden
private static final BitField
_xf_type
private static final BitField
_123_prefix
private static final BitField
_parent_index
private short
field_3_cell_options
private static final BitField
_alignment
private static final BitField
_wrap_text
private static final BitField
_vertical_alignment
private static final BitField
_justify_last
private static final BitField
_rotation
private short
field_4_alignment_options
private static final BitField
_indent
private static final BitField
_shrink_to_fit
private static final BitField
_merge_cells
private static final BitField
_reading_order
private static final BitField
_indent_not_parent_format
private static final BitField
_indent_not_parent_font
private static final BitField
_indent_not_parent_alignment
private static final BitField
_indent_not_parent_border
private static final BitField
_indent_not_parent_pattern
private static final BitField
_indent_not_parent_cell_options
private short
field_5_indention_options
private static final BitField
_border_left
private static final BitField
_border_right
private static final BitField
_border_top
private static final BitField
_border_bottom
private short
field_6_border_options
private static final BitField
_left_border_palette_idx
private static final BitField
_right_border_palette_idx
private static final BitField
_diag
private short
field_7_palette_options
private static final BitField
_top_border_palette_idx
private static final BitField
_bottom_border_palette_idx
private static final BitField
_adtl_diag
private static final BitField
_adtl_diag_line_style
private static final BitField
_adtl_fill_pattern
private int
field_8_adtl_palette_options
private static final BitField
_fill_foreground
private static final BitField
_fill_background
private short
field_9_fill_palette_options
Constructors Summary
public ExtendedFormatRecord()
Constructor ExtendedFormatRecord


           

     
    
    
public ExtendedFormatRecord(RecordInputStream in)
Constructs an ExtendedFormat record and sets its fields appropriately.

param
id id must be 0xE0 or an exception will be throw upon validation
param
size the size of the data area of the record
param
data data of the record (should not contain sid/len)

        super(in);
    
Methods Summary
protected voidfillFields(org.apache.poi.hssf.record.RecordInputStream in)

        field_1_font_index           = in.readShort();
        field_2_format_index         = in.readShort();
        field_3_cell_options         = in.readShort();
        field_4_alignment_options    = in.readShort();
        field_5_indention_options    = in.readShort();
        field_6_border_options       = in.readShort();
        field_7_palette_options      = in.readShort();
        field_8_adtl_palette_options = in.readInt();
        field_9_fill_palette_options = in.readShort();
    
public booleanget123Prefix()
get some old holdover from lotus 123. Who cares, its all over for Lotus. RIP Lotus.

return
prefix - the lotus thing
see
#getCellOptions()

        return _123_prefix.isSet(field_3_cell_options);
    
public shortgetAdtlDiag()
get for diagonal borders? No idea (its a palette color for the other function we didn't know what was?)

return
diag - the palette index?
see
#getAdtlPaletteOptions()

        return ( short ) _adtl_diag.getValue(field_8_adtl_palette_options);
    
public shortgetAdtlDiagLineStyle()
get the diagonal border line style? Who the heck ever heard of a diagonal border?

return
diag - the line style
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#getAdtlPaletteOptions()

        return ( short ) _adtl_diag_line_style
            .getValue(field_8_adtl_palette_options);
    
public shortgetAdtlFillPattern()
get the additional fill pattern

see
#NO_FILL
see
#SOLID_FILL
see
#FINE_DOTS
see
#ALT_BARS
see
#SPARSE_DOTS
see
#THICK_HORZ_BANDS
see
#THICK_VERT_BANDS
see
#THICK_BACKWARD_DIAG
see
#THICK_FORWARD_DIAG
see
#BIG_SPOTS
see
#BRICKS
see
#THIN_HORZ_BANDS
see
#THIN_VERT_BANDS
see
#THIN_BACKWARD_DIAG
see
#THIN_FORWARD_DIAG
see
#SQUARES
see
#DIAMONDS
return
fill - fill pattern??
see
#getAdtlPaletteOptions()

        return ( short ) _adtl_fill_pattern
            .getValue(field_8_adtl_palette_options);
    
public intgetAdtlPaletteOptions()
get the additional palette options bitmask (see individual bit getter methods that reference this method)

return
options - bitmask to set

        return field_8_adtl_palette_options;
    
public shortgetAlignment()
get the horizontal alignment of the cell.

return
align - how to align the cell (see constants)
see
#GENERAL
see
#LEFT
see
#CENTER
see
#RIGHT
see
#FILL
see
#JUSTIFY
see
#CENTER_SELECTION
see
#getAlignmentOptions()

        return _alignment.getShortValue(field_4_alignment_options);
    
public shortgetAlignmentOptions()
get the alignment options bitmask. See corresponding bitgetter methods that reference this one.

return
options - the bitmask

        return field_4_alignment_options;
    
public shortgetBorderBottom()
get the borderline style for the bottom border

return
border - type of border for the bottom of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#getBorderOptions()

        return _border_bottom.getShortValue(field_6_border_options);
    
public shortgetBorderLeft()
get the borderline style for the left border

return
border - type of border for the left side of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#getBorderOptions()

        return _border_left.getShortValue(field_6_border_options);
    
public shortgetBorderOptions()
get the border options bitmask (see the corresponding bit getter methods that reference back to this one)

return
options - the bit mask to set

        return field_6_border_options;
    
public shortgetBorderRight()
get the borderline style for the right border

return
border - type of border for the right side of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#getBorderOptions()

        return _border_right.getShortValue(field_6_border_options);
    
public shortgetBorderTop()
get the borderline style for the top border

return
border - type of border for the top of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#getBorderOptions()

        return _border_top.getShortValue(field_6_border_options);
    
public shortgetBottomBorderPaletteIdx()
get the palette index for the bottom border

return
border - palette index
see
#getAdtlPaletteOptions()

        return ( short ) _bottom_border_palette_idx
            .getValue(field_8_adtl_palette_options);
    
public shortgetCellOptions()
gets the options bitmask - you can also use corresponding option bit getters (see other methods that reference this one)

return
options bitmask

        return field_3_cell_options;
    
public shortgetDiag()
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..

return
diag - whatever it is that this is.
see
#getPaletteOptions()

        return _diag.getShortValue(field_7_palette_options);
    
public shortgetFillBackground()
get the background palette color index

return
color palette index
see
#getFillPaletteOptions()

        return _fill_background.getShortValue(field_9_fill_palette_options);
    
public shortgetFillForeground()
get the foreground palette color index

return
color - palette index
see
#getFillPaletteOptions()

        return _fill_foreground.getShortValue(field_9_fill_palette_options);
    
public shortgetFillPaletteOptions()
get the fill palette options bitmask (see indivdual bit getters that reference this method)

return
options

        return field_9_fill_palette_options;
    
public shortgetFontIndex()
get the index to the FONT record (which font to use 0 based)

return
index to the font
see
org.apache.poi.hssf.record.FontRecord

        return field_1_font_index;
    
public shortgetFormatIndex()
get the index to the Format record (which FORMAT to use 0-based)

return
index to the format record
see
org.apache.poi.hssf.record.FormatRecord

        return field_2_format_index;
    
public shortgetIndent()
get indention (not sure of the units, think its spaces)

return
indent - how far to indent the cell
see
#getIndentionOptions()

        return _indent.getShortValue(field_5_indention_options);
    
public shortgetIndentionOptions()
get the indent options bitmask (see corresponding bit getters that reference this field)

return
options bitmask

        return field_5_indention_options;
    
public shortgetJustifyLast()
Dunno. Docs just say this is for far east versions.. (I'm guessing it justifies for right-to-left read languages)

return
justify
see
#getAlignmentOptions()

   // for far east languages supported only for format always 0 for US
        return _justify_last.getShortValue(field_4_alignment_options);
    
public shortgetLeftBorderPaletteIdx()
get the palette index for the left border color

return
border - palette index
see
#getPaletteOptions()

        return _left_border_palette_idx
            .getShortValue(field_7_palette_options);
    
public booleangetMergeCells()
get whether to merge cells

return
merge - merge cells or not
see
#getIndentionOptions()

        return _merge_cells.isSet(field_5_indention_options);
    
public shortgetPaletteOptions()
get the palette options bitmask (see the individual bit getter methods that reference this one)

return
options - the bitmask

        return field_7_palette_options;
    
public shortgetParentIndex()
for cell XF types this is the parent style (usually 0/normal). For style this should be NULL.

return
index of parent XF
see
#NULL
see
#getCellOptions()

        return _parent_index.getShortValue(field_3_cell_options);
    
public shortgetReadingOrder()
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.

return
order - the reading order (0,1,2)
see
#getIndentionOptions()

   // only for far east  always 0 in US
        return _reading_order.getShortValue(field_5_indention_options);
    
public intgetRecordSize()

        return 24;
    
public shortgetRightBorderPaletteIdx()
get the palette index for the right border color

return
border - palette index
see
#getPaletteOptions()

        return _right_border_palette_idx
            .getShortValue(field_7_palette_options);
    
public shortgetRotation()
get the degree of rotation. (I've not actually seen this used anywhere)

return
rotation - the degree of rotation
see
#getAlignmentOptions()

        return _rotation.getShortValue(field_4_alignment_options);
    
public booleangetShrinkToFit()
get whether to shrink the text to fit

return
shrink - shrink to fit or not
see
#getIndentionOptions()

        return _shrink_to_fit.isSet(field_5_indention_options);
    
public shortgetSid()

        return sid;
    
public shortgetTopBorderPaletteIdx()
get the palette index for the top border

return
border - palette index
see
#getAdtlPaletteOptions()

        return ( short ) _top_border_palette_idx
            .getValue(field_8_adtl_palette_options);
    
public shortgetVerticalAlignment()
get the vertical alignment of text in the cell

return
where to align the text
see
#VERTICAL_TOP
see
#VERTICAL_CENTER
see
#VERTICAL_BOTTOM
see
#VERTICAL_JUSTIFY
see
#getAlignmentOptions()

        return _vertical_alignment.getShortValue(field_4_alignment_options);
    
public booleangetWrapText()
get whether to wrap the text in the cell

return
wrapped - whether or not to wrap the cell text
see
#getAlignmentOptions()

        return _wrap_text.isSet(field_4_alignment_options);
    
public shortgetXFType()
get whether the cell is a cell or style XFRecord

return
type - cell or style (0/1)
see
#XF_STYLE
see
#XF_CELL
see
#getCellOptions()

        return _xf_type.getShortValue(field_3_cell_options);
    
public booleanisHidden()
get whether the cell is hidden or not

return
hidden - if the cell is hidden
see
#getCellOptions()

        return _hidden.isSet(field_3_cell_options);
    
public booleanisIndentNotParentAlignment()
get whether or not to use the alignment in this XF instead of the parent XF.

return
alignment true if this XF has a different alignment value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_alignment.isSet(field_5_indention_options);
    
public booleanisIndentNotParentBorder()
get whether or not to use the border in this XF instead of the parent XF.

return
border - true if this XF has a different border value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_border.isSet(field_5_indention_options);
    
public booleanisIndentNotParentCellOptions()
get whether or not to use the locking/hidden in this XF instead of the parent XF.

return
options- true if this XF has a different locking or hidden value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_cell_options
            .isSet(field_5_indention_options);
    
public booleanisIndentNotParentFont()
get whether or not to use the font in this XF instead of the parent XF.

return
font - true if this XF has a different font value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_font.isSet(field_5_indention_options);
    
public booleanisIndentNotParentFormat()
get whether or not to use the format in this XF instead of the parent XF.

return
parent - true if this XF has a different format value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_format.isSet(field_5_indention_options);
    
public booleanisIndentNotParentPattern()
get whether or not to use the pattern in this XF instead of the parent XF. (foregrount/background)

return
pattern- true if this XF has a different pattern value than its parent, false otherwise.
see
#getIndentionOptions()

        return _indent_not_parent_pattern.isSet(field_5_indention_options);
    
public booleanisLocked()
get whether the cell is locked or not

return
locked - if the cell is locked
see
#getCellOptions()

        return _locked.isSet(field_3_cell_options);
    
public intserialize(int offset, byte[] data)

        LittleEndian.putShort(data, 0 + offset, sid);
        LittleEndian.putShort(data, 2 + offset,
                              ( short ) (20));   // 24 - 4(sid/len)
        LittleEndian.putShort(data, 4 + offset, getFontIndex());
        LittleEndian.putShort(data, 6 + offset, getFormatIndex());
        LittleEndian.putShort(data, 8 + offset, getCellOptions());
        LittleEndian.putShort(data, 10 + offset, getAlignmentOptions());
        LittleEndian.putShort(data, 12 + offset, getIndentionOptions());
        LittleEndian.putShort(data, 14 + offset, getBorderOptions());
        LittleEndian.putShort(data, 16 + offset, getPaletteOptions());
        LittleEndian.putInt(data, 18 + offset, getAdtlPaletteOptions());
        LittleEndian.putShort(data, 22 + offset, getFillPaletteOptions());
        return getRecordSize();
    
public voidset123Prefix(boolean prefix)
set some old holdover from lotus 123. Who cares, its all over for Lotus. RIP Lotus.

param
prefix - the lotus thing to set.
see
#setCellOptions(short)

        field_3_cell_options =
            _123_prefix.setShortBoolean(field_3_cell_options, prefix);
    
public voidsetAdtlDiag(short diag)
set for diagonal borders? No idea (its a palette color for the other function we didn't know what was?)

param
diag - the palette index?
see
#setAdtlPaletteOptions(short)

        field_8_adtl_palette_options =
            _adtl_diag.setValue(field_8_adtl_palette_options, diag);
    
public voidsetAdtlDiagLineStyle(short diag)
set the diagonal border line style? Who the heck ever heard of a diagonal border?

param
diag - the line style
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#setAdtlPaletteOptions(short)

        field_8_adtl_palette_options =
            _adtl_diag_line_style.setValue(field_8_adtl_palette_options,
                                           diag);
    
public voidsetAdtlFillPattern(short fill)
set the fill pattern

see
#NO_FILL
see
#SOLID_FILL
see
#FINE_DOTS
see
#ALT_BARS
see
#SPARSE_DOTS
see
#THICK_HORZ_BANDS
see
#THICK_VERT_BANDS
see
#THICK_BACKWARD_DIAG
see
#THICK_FORWARD_DIAG
see
#BIG_SPOTS
see
#BRICKS
see
#THIN_HORZ_BANDS
see
#THIN_VERT_BANDS
see
#THIN_BACKWARD_DIAG
see
#THIN_FORWARD_DIAG
see
#SQUARES
see
#DIAMONDS
param
fill - fill pattern??
see
#setAdtlPaletteOptions(short)

        field_8_adtl_palette_options =
            _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill);
    
public voidsetAdtlPaletteOptions(short options)
set the additional palette options bitmask (see individual bitsetter methods that reference this method)

param
options - bitmask to set

        field_8_adtl_palette_options = options;
    
public voidsetAlignment(short align)
set the horizontal alignment of the cell.

param
align - how to align the cell (see constants)
see
#GENERAL
see
#LEFT
see
#CENTER
see
#RIGHT
see
#FILL
see
#JUSTIFY
see
#CENTER_SELECTION
see
#setAlignmentOptions(short)

        field_4_alignment_options =
            _alignment.setShortValue(field_4_alignment_options, align);
    
public voidsetAlignmentOptions(short options)
set the alignment options bitmask. See corresponding bitsetter methods that reference this one.

param
options - the bitmask to set

        field_4_alignment_options = options;
    
public voidsetBorderBottom(short border)
set the border line style for the bottom border

param
border - type of border for the bottom of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#setBorderOptions(short)

        field_6_border_options =
            _border_bottom.setShortValue(field_6_border_options, border);
    
public voidsetBorderLeft(short border)
set the borderline style for the left border

param
border - type of border for the left side of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#setBorderOptions(short)

        field_6_border_options =
            _border_left.setShortValue(field_6_border_options, border);
    
public voidsetBorderOptions(short options)
set the border options bitmask (see the corresponding bitsetter methods that reference back to this one)

param
options - the bit mask to set

        field_6_border_options = options;
    
public voidsetBorderRight(short border)
set the border line style for the right border

param
border - type of border for the right side of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#setBorderOptions(short)

        field_6_border_options =
            _border_right.setShortValue(field_6_border_options, border);
    
public voidsetBorderTop(short border)
set the border line style for the top border

param
border - type of border for the top of the cell
see
#NONE
see
#THIN
see
#MEDIUM
see
#DASHED
see
#DOTTED
see
#THICK
see
#DOUBLE
see
#HAIR
see
#MEDIUM_DASHED
see
#DASH_DOT
see
#MEDIUM_DASH_DOT
see
#DASH_DOT_DOT
see
#MEDIUM_DASH_DOT_DOT
see
#SLANTED_DASH_DOT
see
#setBorderOptions(short)

        field_6_border_options =
            _border_top.setShortValue(field_6_border_options, border);
    
public voidsetBottomBorderPaletteIdx(short border)
set the palette index for the bottom border

param
border - palette index
see
#setAdtlPaletteOptions(short)

        field_8_adtl_palette_options =
            _bottom_border_palette_idx.setValue(field_8_adtl_palette_options,
                                                border);
    
public voidsetCellOptions(short options)
sets the options bitmask - you can also use corresponding option bit setters (see other methods that reference this one)

param
options bitmask to set

        field_3_cell_options = options;
    
public voidsetDiag(short diag)
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..

param
diag - set whatever it is that this is.
see
#setPaletteOptions(short)

        field_7_palette_options = _diag.setShortValue(field_7_palette_options,
                diag);
    
public voidsetFillBackground(short color)
set the background palette color index

param
color - palette index
see
#setFillPaletteOptions(short)

        field_9_fill_palette_options =
            _fill_background.setShortValue(field_9_fill_palette_options,
                                           color);
    
public voidsetFillForeground(short color)
set the foreground palette color index

param
color - palette index
see
#setFillPaletteOptions(short)

        field_9_fill_palette_options =
            _fill_foreground.setShortValue(field_9_fill_palette_options,
                                           color);
    
public voidsetFillPaletteOptions(short options)
set the fill palette options bitmask (see

param
options

        field_9_fill_palette_options = options;
    
public voidsetFontIndex(short index)
set the index to the FONT record (which font to use 0 based)

param
index to the font
see
org.apache.poi.hssf.record.FontRecord

        field_1_font_index = index;
    
public voidsetFormatIndex(short index)
set the index to the Format record (which FORMAT to use 0-based)

param
index to the format record
see
org.apache.poi.hssf.record.FormatRecord

        field_2_format_index = index;
    
public voidsetHidden(boolean hidden)
set whether the cell is hidden or not

param
hidden - if the cell is hidden
see
#setCellOptions(short)

        field_3_cell_options = _hidden.setShortBoolean(field_3_cell_options,
                hidden);
    
public voidsetIndent(short indent)
set indention (not sure of the units, think its spaces)

param
indent - how far to indent the cell
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent.setShortValue(field_5_indention_options, indent);
    
public voidsetIndentNotParentAlignment(boolean alignment)
set whether or not to use the alignment in this XF instead of the parent XF.

param
alignment true if this XF has a different alignment value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_alignment
                .setShortBoolean(field_5_indention_options, alignment);
    
public voidsetIndentNotParentBorder(boolean border)
set whether or not to use the border in this XF instead of the parent XF.

param
border - true if this XF has a different border value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_border
                .setShortBoolean(field_5_indention_options, border);
    
public voidsetIndentNotParentCellOptions(boolean options)
set whether or not to use the locking/hidden in this XF instead of the parent XF.

param
options true if this XF has a different locking or hidden value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_cell_options
                .setShortBoolean(field_5_indention_options, options);
    
public voidsetIndentNotParentFont(boolean font)
set whether or not to use the font in this XF instead of the parent XF.

param
font - true if this XF has a different font value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_font.setShortBoolean(field_5_indention_options,
                                                    font);
    
public voidsetIndentNotParentFormat(boolean parent)
set whether or not to use the format in this XF instead of the parent XF.

param
parent - true if this XF has a different format value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_format
                .setShortBoolean(field_5_indention_options, parent);
    
public voidsetIndentNotParentPattern(boolean pattern)

Sets whether or not to use the pattern in this XF instead of the parent XF (foreground/background).

param
pattern true if this XF has a different pattern value than its parent, false otherwise.
see
#setIndentionOptions(short)

        field_5_indention_options =
            _indent_not_parent_pattern
                .setShortBoolean(field_5_indention_options, pattern);
    
public voidsetIndentionOptions(short options)
set the indent options bitmask (see corresponding bitmask setters that reference this field)

param
options bitmask to set.

        field_5_indention_options = options;
    
public voidsetJustifyLast(short justify)
Dunno. Docs just say this is for far east versions.. (I'm guessing it justifies for right-to-left read languages)

param
justify
see
#setAlignmentOptions(short)

   // for far east languages supported only for format always 0 for US
        field_4_alignment_options =
            _justify_last.setShortValue(field_4_alignment_options, justify);
    
public voidsetLeftBorderPaletteIdx(short border)
set the palette index for the left border color

param
border - palette index
see
#setPaletteOptions(short)

        field_7_palette_options =
            _left_border_palette_idx.setShortValue(field_7_palette_options,
                                                   border);
    
public voidsetLocked(boolean locked)
set whether the cell is locked or not

param
locked - if the cell is locked
see
#setCellOptions(short)

        field_3_cell_options = _locked.setShortBoolean(field_3_cell_options,
                locked);
    
public voidsetMergeCells(boolean merge)
set whether to merge cells

param
merge - merge cells or not
see
#setIndentionOptions(short)

        field_5_indention_options =
            _merge_cells.setShortBoolean(field_5_indention_options, merge);
    
public voidsetPaletteOptions(short options)
set the palette options bitmask (see the individual bitsetter methods that reference this one)

param
options - the bitmask to set

        field_7_palette_options = options;
    
public voidsetParentIndex(short parent)
for cell XF types this is the parent style (usually 0/normal). For style this should be NULL.

param
parent index of parent XF
see
#NULL
see
#setCellOptions(short)

        field_3_cell_options =
            _parent_index.setShortValue(field_3_cell_options, parent);
    
public voidsetReadingOrder(short 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.

param
order - the reading order (0,1,2)
see
#setIndentionOptions(short)

   // only for far east  always 0 in US
        field_5_indention_options =
            _reading_order.setShortValue(field_5_indention_options, order);
    
public voidsetRightBorderPaletteIdx(short border)
set the palette index for the right border color

param
border - palette index
see
#setPaletteOptions(short)

        field_7_palette_options =
            _right_border_palette_idx.setShortValue(field_7_palette_options,
                                                    border);
    
public voidsetRotation(short rotation)
set the degree of rotation. (I've not actually seen this used anywhere)

param
rotation the degree of rotation
see
#setAlignmentOptions(short)

        field_4_alignment_options =
            _rotation.setShortValue(field_4_alignment_options, rotation);
    
public voidsetShrinkToFit(boolean shrink)
set whether to shrink the text to fit

param
shrink - shrink to fit or not
see
#setIndentionOptions(short)

        field_5_indention_options =
            _shrink_to_fit.setShortBoolean(field_5_indention_options, shrink);
    
public voidsetTopBorderPaletteIdx(short border)
set the palette index for the top border

param
border - palette index
see
#setAdtlPaletteOptions(short)

        field_8_adtl_palette_options =
            _top_border_palette_idx.setValue(field_8_adtl_palette_options,
                                             border);
    
public voidsetVerticalAlignment(short align)
set the vertical alignment of text in the cell

param
align where to align the text
see
#VERTICAL_TOP
see
#VERTICAL_CENTER
see
#VERTICAL_BOTTOM
see
#VERTICAL_JUSTIFY
see
#setAlignmentOptions(short)

        field_4_alignment_options =
            _vertical_alignment.setShortValue(field_4_alignment_options,
                                              align);
    
public voidsetWrapText(boolean wrapped)
set whether to wrap the text in the cell

param
wrapped - whether or not to wrap the cell text
see
#setAlignmentOptions(short)

        field_4_alignment_options =
            _wrap_text.setShortBoolean(field_4_alignment_options, wrapped);
    
public voidsetXFType(short type)
set whether the cell is a cell or style XFRecord

param
type - cell or style (0/1)
see
#XF_STYLE
see
#XF_CELL
see
#setCellOptions(short)

        field_3_cell_options = _xf_type.setShortValue(field_3_cell_options,
                type);
    
public java.lang.StringtoString()

        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 voidvalidateSid(short id)

        if (id != sid)
        {
            throw new RecordFormatException("NOT A EXTENDED FORMAT RECORD");
        }