📄 extendedformatrecord.java
字号:
* @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) */ public void setAdtlFillPattern(short fill) { field_8_adtl_palette_options = _adtl_fill_pattern.setValue(field_8_adtl_palette_options, fill); } // end bitfields for additional palette options /** * set the fill palette options bitmask (see * * * @param options * */ public void setFillPaletteOptions(short options) { field_9_fill_palette_options = options; } /** * set the foreground palette color index * * * @param color - palette index * @see #setFillPaletteOptions(short) */ public void setFillForeground(short color) { field_9_fill_palette_options = _fill_foreground.setShortValue(field_9_fill_palette_options, color); } /** * set the background palette color index * * * @param color - palette index * @see #setFillPaletteOptions(short) */ public void setFillBackground(short color) { field_9_fill_palette_options = _fill_background.setShortValue(field_9_fill_palette_options, color); } /** * 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 */ public short getFontIndex() { return field_1_font_index; } /** * 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 */ public short getFormatIndex() { return field_2_format_index; } /** * gets the options bitmask - you can also use corresponding option bit getters * (see other methods that reference this one) * * * @return options bitmask * */ public short getCellOptions() { return field_3_cell_options; } // These are the bit fields in cell options /** * get whether the cell is locked or not * * * @return locked - if the cell is locked * @see #getCellOptions() */ public boolean isLocked() { return _locked.isSet(field_3_cell_options); } /** * get whether the cell is hidden or not * * * @return hidden - if the cell is hidden * @see #getCellOptions() */ public boolean isHidden() { return _hidden.isSet(field_3_cell_options); } /** * 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() */ public short getXFType() { return _xf_type.getShortValue(field_3_cell_options); } /** * get some old holdover from lotus 123. Who cares, its all over for Lotus. * RIP Lotus. * * @return prefix - the lotus thing * @see #getCellOptions() */ public boolean get123Prefix() { return _123_prefix.isSet(field_3_cell_options); } /** * 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() */ public short getParentIndex() { return _parent_index.getShortValue(field_3_cell_options); } // end bitfields in cell options /** * get the alignment options bitmask. See corresponding bitgetter methods * that reference this one. * * * @return options - the bitmask */ public short getAlignmentOptions() { return field_4_alignment_options; } // bitfields in alignment options /** * 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() */ public short getAlignment() { return _alignment.getShortValue(field_4_alignment_options); } /** * get whether to wrap the text in the cell * * * @return wrapped - whether or not to wrap the cell text * @see #getAlignmentOptions() */ public boolean getWrapText() { return _wrap_text.isSet(field_4_alignment_options); } /** * 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() */ public short getVerticalAlignment() { return _vertical_alignment.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) * * * @return justify * @see #getAlignmentOptions() */ public short getJustifyLast() { // for far east languages supported only for format always 0 for US return _justify_last.getShortValue(field_4_alignment_options); } /** * get the degree of rotation. (I've not actually seen this used anywhere) * * * @return rotation - the degree of rotation * @see #getAlignmentOptions() */ public short getRotation() { return _rotation.getShortValue(field_4_alignment_options); } // end alignment options bitfields /** * get the indent options bitmask (see corresponding bit getters that reference * this field) * * * @return options bitmask * */ public short getIndentionOptions() { return field_5_indention_options; } // bitfields for indention options /** * get indention (not sure of the units, think its spaces) * * @return indent - how far to indent the cell * @see #getIndentionOptions() */ public short getIndent() { return _indent.getShortValue(field_5_indention_options); } /** * get whether to shrink the text to fit * * * @return shrink - shrink to fit or not * @see #getIndentionOptions() */ public boolean getShrinkToFit() { return _shrink_to_fit.isSet(field_5_indention_options); } /** * get whether to merge cells * * * @return merge - merge cells or not * @see #getIndentionOptions() */ public boolean getMergeCells() { return _merge_cells.isSet(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. * * @return order - the reading order (0,1,2) * @see #getIndentionOptions() */ public short getReadingOrder() { // only for far east always 0 in US return _reading_order.getShortValue(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentFormat() { return _indent_not_parent_format.isSet(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentFont() { return _indent_not_parent_font.isSet(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentAlignment() { return _indent_not_parent_alignment.isSet(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentBorder() { return _indent_not_parent_border.isSet(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentPattern() { return _indent_not_parent_pattern.isSet(field_5_indention_options); } /** * 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() */ public boolean isIndentNotParentCellOptions() { return _indent_not_parent_cell_options .isSet(field_5_indention_options); } // end of bitfields for indention options // border options /** * get the border options bitmask (see the corresponding bit getter methods * that reference back to this one) * * @return options - the bit mask to set * */ public short getBorderOptions() { return field_6_border_options; } // bitfields for border options /** * 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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -