Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.hssf.record.cf
Class FontFormatting

    java.lang.Object
      org.apache.poi.hssf.record.cf.FontFormatting

    public final class FontFormatting

extends java.lang.Object

Font Formatting Block of the Conditional Formatting Rule Record.

Author:
  Dmitriy Kumshayev

Field Summary
`static int` | `FONT_CELL_HEIGHT_PRESERVED`
`static short` | `SS_NONE` Escapement type - None
`static short` | `SS_SUB` Escapement type - Subscript
`static short` | `SS_SUPER` Escapement type - Superscript
`static byte` | `U_DOUBLE` Underline type - Double
`static byte` | `U_DOUBLE_ACCOUNTING` Underline type - Double Accounting
`static byte` | `U_NONE` Underline type - None
`static byte` | `U_SINGLE` Underline type - Single
`static byte` | `U_SINGLE_ACCOUNTING` Underline type - Single Accounting

Constructor Summary
`FontFormatting()`
`FontFormatting(RecordInputStream in)` Creates new FontFormatting

Method Summary
`java.lang.Object` | `clone()`
`short` | `getEscapementType()` get the type of super or subscript for the font
`short` | `getFontColorIndex()`
`int` | `getFontHeight()` gets the height of the font in 1/20th point units
`short` | `getFontWeight()` get the font weight for this font (100-1000dec or 0x64-0x3e8).
`byte[]` | `getRawRecord()`
`short` | `getUnderlineType()` get the type of underlining for the font
`boolean` | `isBold()` get whether the font weight is set to bold or not
`boolean` | `isEscapementTypeModified()`
`boolean` | `isFontCancellationModified()`
`boolean` | `isFontOutlineModified()`
`boolean` | `isFontShadowModified()`
`boolean` | `isFontStyleModified()`
`boolean` | `isFontWeightModified()`
`boolean` | `isItalic()` get whether the font is to be italics or not
`boolean` | `isOutlineOn()`
`boolean` | `isShadowOn()`
`boolean` | `isStruckout()` get whether the font is to be stricken out or not
`boolean` | `isUnderlineTypeModified()`
`void` | `setBold(boolean bold)` set the font weight to bold (weight=700) or to normal(weight=400) boldness.
`void` | `setEscapementType(short escapementType)` set the escapement type for the font
`void` | `setEscapementTypeModified(boolean modified)`
`void` | `setFontCancellationModified(boolean modified)`
`void` | `setFontColorIndex(short fci)`
`void` | `setFontHeight(int height)` sets the height of the font in 1/20th point units
`void` | `setFontOutlineModified(boolean modified)`
`void` | `setFontShadowModified(boolean modified)`
`void` | `setFontStyleModified(boolean modified)`
`void` | `setFontWieghtModified(boolean modified)`
`void` | `setItalic(boolean italic)` set the font to be italics or not
`void` | `setOutline(boolean on)`
`void` | `setShadow(boolean on)`
`void` | `setStrikeout(boolean strike)` set the font to be stricken out or not
`void` | `setUnderlineType(short underlineType)` set the type of underlining type for the font
`void` | `setUnderlineTypeModified(boolean modified)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### FONT_CELL_HEIGHT_PRESERVED

    public static final int FONT_CELL_HEIGHT_PRESERVED

See Also:
  Constant Field Values

### SS_NONE

    public static final short SS_NONE

  Escapement type - None

  See Also:
    Constant Field Values

### SS_SUPER

    public static final short SS_SUPER

  Escapement type - Superscript

  See Also:
    Constant Field Values

### SS_SUB

    public static final short SS_SUB

  Escapement type - Subscript

  See Also:
    Constant Field Values

### U_NONE

    public static final byte U_NONE

  Underline type - None

  See Also:
    Constant Field Values

### U_SINGLE

    public static final byte U_SINGLE

  Underline type - Single

  See Also:
    Constant Field Values

### U_DOUBLE

    public static final byte U_DOUBLE

  Underline type - Double

  See Also:
    Constant Field Values

### U_SINGLE_ACCOUNTING

    public static final byte U_SINGLE_ACCOUNTING

  Underline type - Single Accounting

  See Also:
    Constant Field Values

### U_DOUBLE_ACCOUNTING

    public static final byte U_DOUBLE_ACCOUNTING

  Underline type - Double Accounting

  See Also:
    Constant Field Values

Constructor Detail

### FontFormatting

    public FontFormatting()

### FontFormatting

    public FontFormatting(RecordInputStream in)

  Creates new FontFormatting

Method Detail

### getRawRecord

    public byte[] getRawRecord()

### setFontHeight

    public void setFontHeight(int height)

  sets the height of the font in 1/20th point units

  Parameters:
    `height` - fontheight (in points/20); or -1 to preserve the cell font height

### getFontHeight

    public int getFontHeight()

  gets the height of the font in 1/20th point units

  Returns:
    fontheight (in points/20); or -1 if not modified

### setItalic

    public void setItalic(boolean italic)

  set the font to be italics or not

  Parameters:
    `italic` - - whether the font is italics or not
  See Also:
    `setFontOption(boolean, org.apache.poi.util.BitField)`

### isItalic

    public boolean isItalic()

  get whether the font is to be italics or not

  Returns:
    italics - whether the font is italics or not
  See Also:
    `getFontOption(org.apache.poi.util.BitField)`

### setOutline

    public void setOutline(boolean on)

### isOutlineOn

    public boolean isOutlineOn()

### setShadow

    public void setShadow(boolean on)

### isShadowOn

    public boolean isShadowOn()

### setStrikeout

    public void setStrikeout(boolean strike)

  set the font to be stricken out or not

  Parameters:
    `strike` - - whether the font is stricken out or not

### isStruckout

    public boolean isStruckout()

  get whether the font is to be stricken out or not

  Returns:
    strike - whether the font is stricken out or not
  See Also:
    `getFontOption(org.apache.poi.util.BitField)`

### setBold

    public void setBold(boolean bold)

  set the font weight to bold (weight=700) or to normal(weight=400) boldness.

  Parameters:
    `bold` - - set font weight to bold if true; to normal otherwise

### getFontWeight

    public short getFontWeight()

  get the font weight for this font (100-1000dec or 0x64-0x3e8). Default is 0x190 for normal and 0x2bc for bold

  Returns:
    bw - a number between 100-1000 for the fonts "boldness"

### isBold

    public boolean isBold()

  get whether the font weight is set to bold or not

  Returns:
    bold - whether the font is bold or not

### getEscapementType

    public short getEscapementType()

  get the type of super or subscript for the font

  Returns:
    super or subscript option
  See Also:
    `HSSFFontFormatting.SS_NONE`, `HSSFFontFormatting.SS_SUPER`, `HSSFFontFormatting.SS_SUB`

### setEscapementType

    public void setEscapementType(short escapementType)

  set the escapement type for the font

  Parameters:
    `escapementType` - super or subscript option
  See Also:
    `HSSFFontFormatting.SS_NONE`, `HSSFFontFormatting.SS_SUPER`, `HSSFFontFormatting.SS_SUB`

### getUnderlineType

    public short getUnderlineType()

  get the type of underlining for the font

  Returns:
    font underlining type
  See Also:
    `HSSFFontFormatting.U_NONE`, `HSSFFontFormatting.U_SINGLE`, `HSSFFontFormatting.U_DOUBLE`, `HSSFFontFormatting.U_SINGLE_ACCOUNTING`, `HSSFFontFormatting.U_DOUBLE_ACCOUNTING`

### setUnderlineType

    public void setUnderlineType(short underlineType)

  set the type of underlining type for the font

  Parameters:
    `underlineType` - underline option
  See Also:
    `HSSFFontFormatting.U_NONE`, `HSSFFontFormatting.U_SINGLE`, `HSSFFontFormatting.U_DOUBLE`, `HSSFFontFormatting.U_SINGLE_ACCOUNTING`, `HSSFFontFormatting.U_DOUBLE_ACCOUNTING`

### getFontColorIndex

    public short getFontColorIndex()

### setFontColorIndex

    public void setFontColorIndex(short fci)

### isFontStyleModified

    public boolean isFontStyleModified()

### setFontStyleModified

    public void setFontStyleModified(boolean modified)

### isFontOutlineModified

    public boolean isFontOutlineModified()

### setFontOutlineModified

    public void setFontOutlineModified(boolean modified)

### isFontShadowModified

    public boolean isFontShadowModified()

### setFontShadowModified

    public void setFontShadowModified(boolean modified)

### setFontCancellationModified

    public void setFontCancellationModified(boolean modified)

### isFontCancellationModified

    public boolean isFontCancellationModified()

### setEscapementTypeModified

    public void setEscapementTypeModified(boolean modified)

### isEscapementTypeModified

    public boolean isEscapementTypeModified()

### setUnderlineTypeModified

    public void setUnderlineTypeModified(boolean modified)

### isUnderlineTypeModified

    public boolean isUnderlineTypeModified()

### setFontWieghtModified

    public void setFontWieghtModified(boolean modified)

### isFontWeightModified

    public boolean isFontWeightModified()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### clone

    public java.lang.Object clone()

  Overrides:
    `clone` in class `java.lang.Object`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD