org.jfree.workbook
Class FontStyle

java.lang.Object
  |
  +--org.jfree.workbook.FontStyle

public class FontStyle
extends java.lang.Object

Represents a font within a style.


Field Summary
protected  boolean bold
          Bold.
protected  boolean italic
          Italic.
protected  java.lang.String name
          The font name.
protected  int size
          The size.
protected  boolean strikethrough
          Strikethrough.
protected  boolean underline
          Underline.
 
Constructor Summary
FontStyle(java.lang.String name)
          Constructs a font (12pt) with the given name.
FontStyle(java.lang.String name, int size)
          Constructs a font with the given name and point size.
FontStyle(java.lang.String name, int size, boolean bold, boolean italic, boolean underline, boolean strikethrough)
          Constructs a font with all attributes as specified.
 
Method Summary
 java.lang.String getName()
          Returns the font name.
 int getSize()
          Returns the font size.
 boolean isBold()
          Returns a flag indicating whether or not the bold attribute is set.
 boolean isItalic()
          Returns a flag indicating whether or not the italic attribute is set.
 boolean isStrikethrough()
          Returns a flag indicating whether or not the strikethrough attribute is set.
 boolean isUnderline()
          Returns a flag indicating whether or not the underline attribute is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
The font name.


size

protected int size
The size.


bold

protected boolean bold
Bold.


italic

protected boolean italic
Italic.


underline

protected boolean underline
Underline.


strikethrough

protected boolean strikethrough
Strikethrough.

Constructor Detail

FontStyle

public FontStyle(java.lang.String name)
Constructs a font (12pt) with the given name.

Parameters:
name - the font name (not validated).

FontStyle

public FontStyle(java.lang.String name,
                 int size)
Constructs a font with the given name and point size.

Parameters:
name - the font name (not validated).
size - the point size.

FontStyle

public FontStyle(java.lang.String name,
                 int size,
                 boolean bold,
                 boolean italic,
                 boolean underline,
                 boolean strikethrough)
Constructs a font with all attributes as specified.

Parameters:
name - the font name (not validated).
size - the point size.
bold - flag for bold attribute.
italic - flag for italic attribute.
underline - flag for underline attribute.
strikethrough - flag for strikethrough attribute.
Method Detail

getName

public java.lang.String getName()
Returns the font name.

Returns:
The font name.

getSize

public int getSize()
Returns the font size.

Returns:
The font size.

isBold

public boolean isBold()
Returns a flag indicating whether or not the bold attribute is set.

Returns:
The bold attribute.

isItalic

public boolean isItalic()
Returns a flag indicating whether or not the italic attribute is set.

Returns:
The italic attribute.

isUnderline

public boolean isUnderline()
Returns a flag indicating whether or not the underline attribute is set.

Returns:
The underline attribute.

isStrikethrough

public boolean isStrikethrough()
Returns a flag indicating whether or not the strikethrough attribute is set.

Returns:
The strikethrough attribute.