org.palo.api.ext.ui
Class FontDescriptor

java.lang.Object
  extended by org.palo.api.ext.ui.FontDescriptor

public class FontDescriptor
extends java.lang.Object

A FontDescriptor is a platfom-independent font description.

Version:
$Id: FontDescriptor.html,v 1.10 2009/07/09 11:01:47 ArndHouben Exp $

Constructor Summary
FontDescriptor()
          A default constructor which leaves all fields un-initialized!
FontDescriptor(java.lang.String description)
          Creates a new FontDescriptor instance from the given description string.
 
Method Summary
 java.lang.String getName()
          Returns the name of this font
 int getSize()
          Returns the font size
 boolean isBold()
          Checks if a bold font should be used
 boolean isItalic()
          Checks if the font is italic
 boolean isUnderlined()
          Checks if the font should be underlined
 void setBold(boolean b)
          Sets the bold flag of this font
 void setItalic(boolean b)
          Sets the italic flag to indicate if this font should be italic
 void setName(java.lang.String name)
          Sets the name of this font
 void setSize(int size)
          Sets the size of this font
 void setUnderlined(boolean b)
          Sets the underlined flag to indicate that this font should be underlined.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FontDescriptor

public FontDescriptor()
A default constructor which leaves all fields un-initialized!


FontDescriptor

public FontDescriptor(java.lang.String description)
Creates a new FontDescriptor instance from the given description string. The desciption string has to be in the form generated by the FontDescriptor.toString method.

Parameters:
description - a font description (must not be null)
Method Detail

isBold

public final boolean isBold()
Checks if a bold font should be used

Returns:
true if a bold font should be used, false otherwise

setBold

public final void setBold(boolean b)
Sets the bold flag of this font

Parameters:
b - set to true if font should be bold, to false otherwise

getName

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

Returns:
font name

setName

public final void setName(java.lang.String name)
Sets the name of this font

Parameters:
name - font name

getSize

public final int getSize()
Returns the font size

Returns:
font size

setSize

public final void setSize(int size)
Sets the size of this font

Parameters:
size - font size

isItalic

public final boolean isItalic()
Checks if the font is italic

Returns:
true if font is italic, false otherwise

setItalic

public final void setItalic(boolean b)
Sets the italic flag to indicate if this font should be italic

Parameters:
b - set to true if this font should be italic, to false otherwise

isUnderlined

public final boolean isUnderlined()
Checks if the font should be underlined

Returns:
true if font is underlined, false otherwise

setUnderlined

public final void setUnderlined(boolean b)
Sets the underlined flag to indicate that this font should be underlined.

Parameters:
b - set to true if this font should be underlined, to false otherwise

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object