public class ExtendedFormatRecord extends Record
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)
Constructor and Description |
---|
ExtendedFormatRecord()
Constructor ExtendedFormatRecord
|
ExtendedFormatRecord(RecordInputStream in)
Constructs an ExtendedFormat record and sets its fields appropriately.
|
Modifier and Type | Method and Description |
---|---|
protected void |
fillFields(RecordInputStream in)
called by the constructor, should set class level fields.
|
boolean |
get123Prefix()
get some old holdover from lotus 123.
|
short |
getAdtlDiag()
get for diagonal borders? No idea (its a palette color for the other function
we didn't know what was?)
|
short |
getAdtlDiagLineStyle()
get the diagonal border line style? Who the heck ever heard of a diagonal border?
|
short |
getAdtlFillPattern()
get the additional fill pattern
|
int |
getAdtlPaletteOptions()
get the additional palette options bitmask (see individual bit getter methods
that reference this method)
|
short |
getAlignment()
get the horizontal alignment of the cell.
|
short |
getAlignmentOptions()
get the alignment options bitmask.
|
short |
getBorderBottom()
get the borderline style for the bottom border
|
short |
getBorderLeft()
get the borderline style for the left border
|
short |
getBorderOptions()
get the border options bitmask (see the corresponding bit getter methods
that reference back to this one)
|
short |
getBorderRight()
get the borderline style for the right border
|
short |
getBorderTop()
get the borderline style for the top border
|
short |
getBottomBorderPaletteIdx()
get the palette index for the bottom border
|
short |
getCellOptions()
gets the options bitmask - you can also use corresponding option bit getters
(see other methods that reference this one)
|
short |
getDiag()
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
|
short |
getFillBackground()
get the background palette color index
|
short |
getFillForeground()
get the foreground palette color index
|
short |
getFillPaletteOptions()
get the fill palette options bitmask (see indivdual bit getters that
reference this method)
|
short |
getFontIndex()
get the index to the FONT record (which font to use 0 based)
|
short |
getFormatIndex()
get the index to the Format record (which FORMAT to use 0-based)
|
short |
getIndent()
get indention (not sure of the units, think its spaces)
|
short |
getIndentionOptions()
get the indent options bitmask (see corresponding bit getters that reference
this field)
|
short |
getJustifyLast()
Dunno.
|
short |
getLeftBorderPaletteIdx()
get the palette index for the left border color
|
boolean |
getMergeCells()
get whether to merge cells
|
short |
getPaletteOptions()
get the palette options bitmask (see the individual bit getter methods that
reference this one)
|
short |
getParentIndex()
for cell XF types this is the parent style (usually 0/normal).
|
short |
getReadingOrder()
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.
|
int |
getRecordSize()
gives the current serialized size of the record.
|
short |
getRightBorderPaletteIdx()
get the palette index for the right border color
|
short |
getRotation()
get the degree of rotation.
|
boolean |
getShrinkToFit()
get whether to shrink the text to fit
|
short |
getSid()
return the non static version of the id for this record.
|
short |
getTopBorderPaletteIdx()
get the palette index for the top border
|
short |
getVerticalAlignment()
get the vertical alignment of text in the cell
|
boolean |
getWrapText()
get whether to wrap the text in the cell
|
short |
getXFType()
get whether the cell is a cell or style XFRecord
|
boolean |
isHidden()
get whether the cell is hidden or not
|
boolean |
isIndentNotParentAlignment()
get whether or not to use the alignment in this XF instead of the parent XF.
|
boolean |
isIndentNotParentBorder()
get whether or not to use the border in this XF instead of the parent XF.
|
boolean |
isIndentNotParentCellOptions()
get whether or not to use the locking/hidden in this XF instead of the parent XF.
|
boolean |
isIndentNotParentFont()
get whether or not to use the font in this XF instead of the parent XF.
|
boolean |
isIndentNotParentFormat()
get whether or not to use the format in this XF instead of the parent XF.
|
boolean |
isIndentNotParentPattern()
get whether or not to use the pattern in this XF instead of the parent XF.
|
boolean |
isLocked()
get whether the cell is locked or not
|
int |
serialize(int offset,
byte[] data)
called by the class that is responsible for writing this sucker.
|
void |
set123Prefix(boolean prefix)
set some old holdover from lotus 123.
|
void |
setAdtlDiag(short diag)
set for diagonal borders? No idea (its a palette color for the other function
we didn't know what was?)
|
void |
setAdtlDiagLineStyle(short diag)
set the diagonal border line style? Who the heck ever heard of a diagonal border?
|
void |
setAdtlFillPattern(short fill)
set the fill pattern
|
void |
setAdtlPaletteOptions(short options)
set the additional palette options bitmask (see individual bitsetter methods
that reference this method)
|
void |
setAlignment(short align)
set the horizontal alignment of the cell.
|
void |
setAlignmentOptions(short options)
set the alignment options bitmask.
|
void |
setBorderBottom(short border)
set the border line style for the bottom border
|
void |
setBorderLeft(short border)
set the borderline style for the left border
|
void |
setBorderOptions(short options)
set the border options bitmask (see the corresponding bitsetter methods
that reference back to this one)
|
void |
setBorderRight(short border)
set the border line style for the right border
|
void |
setBorderTop(short border)
set the border line style for the top border
|
void |
setBottomBorderPaletteIdx(short border)
set the palette index for the bottom border
|
void |
setCellOptions(short options)
sets the options bitmask - you can also use corresponding option bit setters
(see other methods that reference this one)
|
void |
setDiag(short diag)
Not sure what this is for (maybe fill lines?) 1 = down, 2 = up, 3 = both, 0 for none..
|
void |
setFillBackground(short color)
set the background palette color index
|
void |
setFillForeground(short color)
set the foreground palette color index
|
void |
setFillPaletteOptions(short options)
set the fill palette options bitmask (see
|
void |
setFontIndex(short index)
set the index to the FONT record (which font to use 0 based)
|
void |
setFormatIndex(short index)
set the index to the Format record (which FORMAT to use 0-based)
|
void |
setHidden(boolean hidden)
set whether the cell is hidden or not
|
void |
setIndent(short indent)
set indention (not sure of the units, think its spaces)
|
void |
setIndentionOptions(short options)
set the indent options bitmask (see corresponding bitmask setters that reference
this field)
|
void |
setIndentNotParentAlignment(boolean alignment)
set whether or not to use the alignment in this XF instead of the parent XF.
|
void |
setIndentNotParentBorder(boolean border)
set whether or not to use the border in this XF instead of the parent XF.
|
void |
setIndentNotParentCellOptions(boolean options)
set whether or not to use the locking/hidden in this XF instead of the parent XF.
|
void |
setIndentNotParentFont(boolean font)
set whether or not to use the font in this XF instead of the parent XF.
|
void |
setIndentNotParentFormat(boolean parent)
set whether or not to use the format in this XF instead of the parent XF.
|
void |
setIndentNotParentPattern(boolean pattern)
Sets whether or not to use the pattern in this XF instead of the
parent XF (foreground/background).
|
void |
setJustifyLast(short justify)
Dunno.
|
void |
setLeftBorderPaletteIdx(short border)
set the palette index for the left border color
|
void |
setLocked(boolean locked)
set whether the cell is locked or not
|
void |
setMergeCells(boolean merge)
set whether to merge cells
|
void |
setPaletteOptions(short options)
set the palette options bitmask (see the individual bitsetter methods that
reference this one)
|
void |
setParentIndex(short parent)
for cell XF types this is the parent style (usually 0/normal).
|
void |
setReadingOrder(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.
|
void |
setRightBorderPaletteIdx(short border)
set the palette index for the right border color
|
void |
setRotation(short rotation)
set the degree of rotation.
|
void |
setShrinkToFit(boolean shrink)
set whether to shrink the text to fit
|
void |
setTopBorderPaletteIdx(short border)
set the palette index for the top border
|
void |
setVerticalAlignment(short align)
set the vertical alignment of text in the cell
|
void |
setWrapText(boolean wrapped)
set whether to wrap the text in the cell
|
void |
setXFType(short type)
set whether the cell is a cell or style XFRecord
|
String |
toString()
get a string representation of the record (for biffview/debugging)
|
protected void |
validateSid(short id)
called by constructor, should throw runtime exception in the event of a
record passed with a differing ID.
|
clone, isInValueSection, isValue, serialize
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
public ExtendedFormatRecord()
public ExtendedFormatRecord(RecordInputStream in)
in
- the RecordInputstream to read the record fromprotected void validateSid(short id)
Record
validateSid
in class Record
id
- alleged id for this recordprotected void fillFields(RecordInputStream in)
Record
fillFields
in class Record
in
- the RecordInputstream to read the record frompublic void setFontIndex(short index)
index
- to the fontFontRecord
public void setFormatIndex(short index)
index
- to the format recordFormatRecord
public void setCellOptions(short options)
options
- bitmask to setpublic void setLocked(boolean locked)
locked
- - if the cell is lockedsetCellOptions(short)
public void setHidden(boolean hidden)
hidden
- - if the cell is hiddensetCellOptions(short)
public void setXFType(short type)
type
- - cell or style (0/1)XF_STYLE
,
XF_CELL
,
setCellOptions(short)
public void set123Prefix(boolean prefix)
prefix
- - the lotus thing to set.setCellOptions(short)
public void setParentIndex(short parent)
parent
- index of parent XFNULL
,
setCellOptions(short)
public void setAlignmentOptions(short options)
options
- - the bitmask to setpublic void setAlignment(short align)
align
- - how to align the cell (see constants)GENERAL
,
LEFT
,
CENTER
,
RIGHT
,
FILL
,
JUSTIFY
,
CENTER_SELECTION
,
setAlignmentOptions(short)
public void setWrapText(boolean wrapped)
wrapped
- - whether or not to wrap the cell textsetAlignmentOptions(short)
public void setVerticalAlignment(short align)
align
- where to align the textVERTICAL_TOP
,
VERTICAL_CENTER
,
VERTICAL_BOTTOM
,
VERTICAL_JUSTIFY
,
setAlignmentOptions(short)
public void setJustifyLast(short justify)
justify
- setAlignmentOptions(short)
public void setRotation(short rotation)
rotation
- the degree of rotationsetAlignmentOptions(short)
public void setIndentionOptions(short options)
options
- bitmask to set.public void setIndent(short indent)
indent
- - how far to indent the cellsetIndentionOptions(short)
public void setShrinkToFit(boolean shrink)
shrink
- - shrink to fit or notsetIndentionOptions(short)
public void setMergeCells(boolean merge)
merge
- - merge cells or notsetIndentionOptions(short)
public void setReadingOrder(short order)
order
- - the reading order (0,1,2)setIndentionOptions(short)
public void setIndentNotParentFormat(boolean parent)
parent
- - true if this XF has a different format value than its parent,
false otherwise.setIndentionOptions(short)
public void setIndentNotParentFont(boolean font)
font
- - true if this XF has a different font value than its parent,
false otherwise.setIndentionOptions(short)
public void setIndentNotParentAlignment(boolean alignment)
alignment
- true if this XF has a different alignment value than its parent,
false otherwise.setIndentionOptions(short)
public void setIndentNotParentBorder(boolean border)
border
- - true if this XF has a different border value than its parent,
false otherwise.setIndentionOptions(short)
public void setIndentNotParentPattern(boolean pattern)
Sets whether or not to use the pattern in this XF instead of the parent XF (foreground/background).
pattern
- true
if this XF has a different pattern
value than its parent, false otherwise.setIndentionOptions(short)
public void setIndentNotParentCellOptions(boolean options)
options
- true if this XF has a different locking or hidden value than its parent,
false otherwise.setIndentionOptions(short)
public void setBorderOptions(short options)
options
- - the bit mask to setpublic void setBorderLeft(short border)
border
- - type of border for the left side of the cellNONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
setBorderOptions(short)
public void setBorderRight(short border)
border
- - type of border for the right side of the cellNONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
setBorderOptions(short)
public void setBorderTop(short border)
border
- - type of border for the top of the cellNONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
setBorderOptions(short)
public void setBorderBottom(short border)
border
- - type of border for the bottom of the cellNONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
setBorderOptions(short)
public void setPaletteOptions(short options)
options
- - the bitmask to setpublic void setLeftBorderPaletteIdx(short border)
border
- - palette indexsetPaletteOptions(short)
public void setRightBorderPaletteIdx(short border)
border
- - palette indexsetPaletteOptions(short)
public void setDiag(short diag)
diag
- - set whatever it is that this is.setPaletteOptions(short)
public void setAdtlPaletteOptions(short options)
options
- - bitmask to setpublic void setTopBorderPaletteIdx(short border)
border
- - palette indexsetAdtlPaletteOptions(short)
public void setBottomBorderPaletteIdx(short border)
border
- - palette indexsetAdtlPaletteOptions(short)
public void setAdtlDiag(short diag)
diag
- - the palette index?setAdtlPaletteOptions(short)
public void setAdtlDiagLineStyle(short diag)
diag
- - the line styleNONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
setAdtlPaletteOptions(short)
public void setAdtlFillPattern(short fill)
fill
- - fill pattern??NO_FILL
,
SOLID_FILL
,
FINE_DOTS
,
ALT_BARS
,
SPARSE_DOTS
,
THICK_HORZ_BANDS
,
THICK_VERT_BANDS
,
THICK_BACKWARD_DIAG
,
THICK_FORWARD_DIAG
,
BIG_SPOTS
,
BRICKS
,
THIN_HORZ_BANDS
,
THIN_VERT_BANDS
,
THIN_BACKWARD_DIAG
,
THIN_FORWARD_DIAG
,
SQUARES
,
DIAMONDS
,
setAdtlPaletteOptions(short)
public void setFillPaletteOptions(short options)
options
- public void setFillForeground(short color)
color
- - palette indexsetFillPaletteOptions(short)
public void setFillBackground(short color)
color
- - palette indexsetFillPaletteOptions(short)
public short getFontIndex()
FontRecord
public short getFormatIndex()
FormatRecord
public short getCellOptions()
public boolean isLocked()
getCellOptions()
public boolean isHidden()
getCellOptions()
public short getXFType()
XF_STYLE
,
XF_CELL
,
getCellOptions()
public boolean get123Prefix()
getCellOptions()
public short getParentIndex()
NULL
,
getCellOptions()
public short getAlignmentOptions()
public short getAlignment()
GENERAL
,
LEFT
,
CENTER
,
RIGHT
,
FILL
,
JUSTIFY
,
CENTER_SELECTION
,
getAlignmentOptions()
public boolean getWrapText()
getAlignmentOptions()
public short getVerticalAlignment()
VERTICAL_TOP
,
VERTICAL_CENTER
,
VERTICAL_BOTTOM
,
VERTICAL_JUSTIFY
,
getAlignmentOptions()
public short getJustifyLast()
getAlignmentOptions()
public short getRotation()
getAlignmentOptions()
public short getIndentionOptions()
public short getIndent()
getIndentionOptions()
public boolean getShrinkToFit()
getIndentionOptions()
public boolean getMergeCells()
getIndentionOptions()
public short getReadingOrder()
getIndentionOptions()
public boolean isIndentNotParentFormat()
getIndentionOptions()
public boolean isIndentNotParentFont()
getIndentionOptions()
public boolean isIndentNotParentAlignment()
getIndentionOptions()
public boolean isIndentNotParentBorder()
getIndentionOptions()
public boolean isIndentNotParentPattern()
getIndentionOptions()
public boolean isIndentNotParentCellOptions()
getIndentionOptions()
public short getBorderOptions()
public short getBorderLeft()
NONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
getBorderOptions()
public short getBorderRight()
NONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
getBorderOptions()
public short getBorderTop()
NONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
getBorderOptions()
public short getBorderBottom()
NONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
getBorderOptions()
public short getPaletteOptions()
public short getLeftBorderPaletteIdx()
getPaletteOptions()
public short getRightBorderPaletteIdx()
getPaletteOptions()
public short getDiag()
getPaletteOptions()
public int getAdtlPaletteOptions()
public short getTopBorderPaletteIdx()
getAdtlPaletteOptions()
public short getBottomBorderPaletteIdx()
getAdtlPaletteOptions()
public short getAdtlDiag()
getAdtlPaletteOptions()
public short getAdtlDiagLineStyle()
NONE
,
THIN
,
MEDIUM
,
DASHED
,
DOTTED
,
THICK
,
DOUBLE
,
HAIR
,
MEDIUM_DASHED
,
DASH_DOT
,
MEDIUM_DASH_DOT
,
DASH_DOT_DOT
,
MEDIUM_DASH_DOT_DOT
,
SLANTED_DASH_DOT
,
getAdtlPaletteOptions()
public short getAdtlFillPattern()
NO_FILL
,
SOLID_FILL
,
FINE_DOTS
,
ALT_BARS
,
SPARSE_DOTS
,
THICK_HORZ_BANDS
,
THICK_VERT_BANDS
,
THICK_BACKWARD_DIAG
,
THICK_FORWARD_DIAG
,
BIG_SPOTS
,
BRICKS
,
THIN_HORZ_BANDS
,
THIN_VERT_BANDS
,
THIN_BACKWARD_DIAG
,
THIN_FORWARD_DIAG
,
SQUARES
,
DIAMONDS
,
getAdtlPaletteOptions()
public short getFillPaletteOptions()
public short getFillForeground()
getFillPaletteOptions()
public short getFillBackground()
getFillPaletteOptions()
public String toString()
Record
public int serialize(int offset, byte[] data)
Record
public int getRecordSize()
Record
getRecordSize
in class Record
Copyright © 2016 Open Microscopy Environment