com.l2fprod.common.swing
Class DefaultFontChooserModel

java.lang.Object
  extended by com.l2fprod.common.swing.DefaultFontChooserModel
All Implemented Interfaces:
FontChooserModel
Direct Known Subclasses:
MonospacedFontChooserModel

public class DefaultFontChooserModel
extends java.lang.Object
implements FontChooserModel

Default implementation of the FontChooserModel. It returns all available fonts and commonly used font sizes.


Field Summary
static int[] DEFAULT_FONT_SIZES
           
protected  java.lang.String[] fontFamilies
           
 
Constructor Summary
DefaultFontChooserModel()
           
 
Method Summary
 java.lang.String[] getCharSets()
          Gets the available CharSet names Charset.
 int[] getDefaultSizes()
          Gets the default sizes to propose to the end-user
 java.lang.String[] getFontFamilies(java.lang.String charSetName)
          Gets the available fonts for the given charset
 java.lang.String getPreviewMessage(java.lang.String charSetName)
          Gets the localized message to use in the Preview area for the given charset.
 void setCharSets(java.lang.String[] charSets)
           
 void setDefaultFontSizes(int[] defaultFontSizes)
           
 void setFontFamilies(java.lang.String[] fontFamilies)
           
 void setPreviewMessage(java.lang.String previewMessage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_SIZES

public static final int[] DEFAULT_FONT_SIZES

fontFamilies

protected java.lang.String[] fontFamilies
Constructor Detail

DefaultFontChooserModel

public DefaultFontChooserModel()
Method Detail

setFontFamilies

public void setFontFamilies(java.lang.String[] fontFamilies)

getFontFamilies

public java.lang.String[] getFontFamilies(java.lang.String charSetName)
Description copied from interface: FontChooserModel
Gets the available fonts for the given charset

Specified by:
getFontFamilies in interface FontChooserModel
Parameters:
charSetName - not used yet

setDefaultFontSizes

public void setDefaultFontSizes(int[] defaultFontSizes)

getDefaultSizes

public int[] getDefaultSizes()
Description copied from interface: FontChooserModel
Gets the default sizes to propose to the end-user

Specified by:
getDefaultSizes in interface FontChooserModel

setCharSets

public void setCharSets(java.lang.String[] charSets)

getCharSets

public java.lang.String[] getCharSets()
Description copied from interface: FontChooserModel
Gets the available CharSet names Charset.

Specified by:
getCharSets in interface FontChooserModel
Returns:
the available CharSet names

setPreviewMessage

public void setPreviewMessage(java.lang.String previewMessage)

getPreviewMessage

public java.lang.String getPreviewMessage(java.lang.String charSetName)
Description copied from interface: FontChooserModel
Gets the localized message to use in the Preview area for the given charset.

Specified by:
getPreviewMessage in interface FontChooserModel
Returns:
a localized message for the Preview area.