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.xssf.usermodel
Class XSSFFontFormatting

    java.lang.Object
      org.apache.poi.xssf.usermodel.XSSFFontFormatting

All Implemented Interfaces:
  FontFormatting

    public class XSSFFontFormatting

extends java.lang.Object
implements FontFormatting

Author:
  Yegor Kozlov

Field Summary

Fields inherited from interface org.apache.poi.ss.usermodel.FontFormatting
`SS_NONE, SS_SUB, SS_SUPER, U_DOUBLE, U_DOUBLE_ACCOUNTING, U_NONE, U_SINGLE, U_SINGLE_ACCOUNTING`

Method Summary
`short` | `getEscapementType()` get the type of super or subscript for the font
`XSSFColor` | `getFontColor()`
`short` | `getFontColorIndex()`
`int` | `getFontHeight()` gets the height of the font in 1/20th point units
`short` | `getUnderlineType()` get the type of underlining for the font
`boolean` | `isBold()` get whether the font weight is set to bold or not
`boolean` | `isItalic()`
`boolean` | `isStruckout()` XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurrs=1.
`void` | `resetFontStyle()` set font style options to default values (non-italic, non-bold)
`void` | `setEscapementType(short escapementType)` set the escapement type for the font
`void` | `setFontColor(Color color)` Sets the colour to use
`void` | `setFontColorIndex(short color)` Sets the indexed colour to use
`void` | `setFontHeight(int height)` Sets the height of the font in 1/20th point units
`void` | `setFontStyle(boolean italic, boolean bold)` set font style options.
`void` | `setUnderlineType(short underlineType)` set the type of underlining type for the font

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

Method Detail

### getEscapementType

    public short getEscapementType()

  get the type of super or subscript for the font

  Specified by:
    `getEscapementType` in interface `FontFormatting`
  Returns:
    super or subscript option
  See Also:
    `FontFormatting.SS_NONE`, `FontFormatting.SS_SUPER`, `FontFormatting.SS_SUB`

### setEscapementType

    public void setEscapementType(short escapementType)

  set the escapement type for the font

  Specified by:
    `setEscapementType` in interface `FontFormatting`
  Parameters:
    `escapementType` - super or subscript option
  See Also:
    `FontFormatting.SS_NONE`, `FontFormatting.SS_SUPER`, `FontFormatting.SS_SUB`

### isStruckout

    public boolean isStruckout()

  XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurrs=1. Use get*Array(), it is much faster than get*List().

  Specified by:
    `isStruckout` in interface `FontFormatting`
  Returns:
    true if font strikeout is on
  See Also:
    `FontFormatting.isStruckout()`

### getFontColorIndex

    public short getFontColorIndex()

  Specified by:
    `getFontColorIndex` in interface `FontFormatting`
  Returns:
    font color index

### setFontColorIndex

    public void setFontColorIndex(short color)

  Description copied from interface: `FontFormatting`
  Sets the indexed colour to use

  Specified by:
    `setFontColorIndex` in interface `FontFormatting`
  Parameters:
    `color` - font color index

### getFontColor

    public XSSFColor getFontColor()

  Specified by:
    `getFontColor` in interface `FontFormatting`
  Returns:
    The colour of the font, or null if no colour applied

### setFontColor

    public void setFontColor(Color color)

  Description copied from interface: `FontFormatting`
  Sets the colour to use

  Specified by:
    `setFontColor` in interface `FontFormatting`
  Parameters:
    `color` - font colour to use

### getFontHeight

    public int getFontHeight()

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

  Specified by:
    `getFontHeight` in interface `FontFormatting`
  Returns:
    fontheight (in points/20); or -1 if not modified

### setFontHeight

    public void setFontHeight(int height)

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

  Specified by:
    `setFontHeight` in interface `FontFormatting`
  Parameters:
    `height` - the height in twips (in points/20)

### getUnderlineType

    public short getUnderlineType()

  get the type of underlining for the font

  Specified by:
    `getUnderlineType` in interface `FontFormatting`
  Returns:
    font underlining type
  See Also:
    `FontFormatting.U_NONE`, `FontFormatting.U_SINGLE`, `FontFormatting.U_DOUBLE`, `FontFormatting.U_SINGLE_ACCOUNTING`, `FontFormatting.U_DOUBLE_ACCOUNTING`

### setUnderlineType

    public void setUnderlineType(short underlineType)

  set the type of underlining type for the font

  Specified by:
    `setUnderlineType` in interface `FontFormatting`
  Parameters:
    `underlineType` - super or subscript option
  See Also:
    `FontFormatting.U_NONE`, `FontFormatting.U_SINGLE`, `FontFormatting.U_DOUBLE`, `FontFormatting.U_SINGLE_ACCOUNTING`, `FontFormatting.U_DOUBLE_ACCOUNTING`

### isBold

    public boolean isBold()

  get whether the font weight is set to bold or not

  Specified by:
    `isBold` in interface `FontFormatting`
  Returns:
    bold - whether the font is bold or not

### isItalic

    public boolean isItalic()

  Specified by:
    `isItalic` in interface `FontFormatting`
  Returns:
    true if font style was set to italic

### setFontStyle

    public void setFontStyle(boolean italic,
                             boolean bold)

  set font style options.

  Specified by:
    `setFontStyle` in interface `FontFormatting`
  Parameters:
    `italic` - - if true, set posture style to italic, otherwise to normal
    `bold` - if true, set font weight to bold, otherwise to normal

### resetFontStyle

    public void resetFontStyle()

  set font style options to default values (non-italic, non-bold)

  Specified by:
    `resetFontStyle` in interface `FontFormatting`

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

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.