org.apache.poi.ss.usermodel
Interface FontFormatting

All Known Implementing Classes:
HSSFFontFormatting, XSSFFontFormatting

public interface FontFormatting

High level representation for Font Formatting component of Conditional Formatting settings

Author:
Dmitriy Kumshayev, Yegor Kozlov

Field Summary
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
 
Method Summary
 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 getUnderlineType()
          get the type of underlining for the font
 boolean isBold()
          get whether the font weight is set to bold or not
 boolean isItalic()
           
 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 setFontColorIndex(short color)
           
 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
 

Field Detail

SS_NONE

static final short SS_NONE
Escapement type - None

See Also:
Constant Field Values

SS_SUPER

static final short SS_SUPER
Escapement type - Superscript

See Also:
Constant Field Values

SS_SUB

static final short SS_SUB
Escapement type - Subscript

See Also:
Constant Field Values

U_NONE

static final byte U_NONE
Underline type - None

See Also:
Constant Field Values

U_SINGLE

static final byte U_SINGLE
Underline type - Single

See Also:
Constant Field Values

U_DOUBLE

static final byte U_DOUBLE
Underline type - Double

See Also:
Constant Field Values

U_SINGLE_ACCOUNTING

static final byte U_SINGLE_ACCOUNTING
Underline type - Single Accounting

See Also:
Constant Field Values

U_DOUBLE_ACCOUNTING

static final byte U_DOUBLE_ACCOUNTING
Underline type - Double Accounting

See Also:
Constant Field Values
Method Detail

getEscapementType

short getEscapementType()
get the type of super or subscript for the font

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

setEscapementType

void setEscapementType(short escapementType)
set the escapement type for the font

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

getFontColorIndex

short getFontColorIndex()
Returns:
font color index

setFontColorIndex

void setFontColorIndex(short color)
Parameters:
color - font color index

getFontHeight

int getFontHeight()
gets the height of the font in 1/20th point units

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

setFontHeight

void setFontHeight(int height)
Sets the height of the font in 1/20th point units

Parameters:
height - the height in twips (in points/20)

getUnderlineType

short getUnderlineType()
get the type of underlining for the font

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

setUnderlineType

void setUnderlineType(short underlineType)
set the type of underlining type for the font

Parameters:
underlineType - super or subscript option
See Also:
U_NONE, U_SINGLE, U_DOUBLE, U_SINGLE_ACCOUNTING, U_DOUBLE_ACCOUNTING

isBold

boolean isBold()
get whether the font weight is set to bold or not

Returns:
bold - whether the font is bold or not

isItalic

boolean isItalic()
Returns:
true if font style was set to italic

setFontStyle

void setFontStyle(boolean italic,
                  boolean bold)
set font style options.

Parameters:
italic - - if true, set posture style to italic, otherwise to normal
bold - if true, set font weight to bold, otherwise to normal

resetFontStyle

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



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