fable.gui
Class FontFactory

java.lang.Object
  extended by fable.gui.FontFactory

public class FontFactory
extends java.lang.Object

Makes Fonts using Factory Design Pattern so that not too much memory is consumed by Fonts.

Author:
Wonsik Kim

Nested Class Summary
static class FontFactory.FontSign
          This enum structure represents all fonts to be used in the application.
 
Method Summary
static Font getFont(Display display, FontFactory.FontSign fontSign)
          Returns font associated with the fontSign object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFont

public static Font getFont(Display display,
                           FontFactory.FontSign fontSign)
Returns font associated with the fontSign object.

Parameters:
display - display associated with the font.
fontSign - FontSign object associated with the font.
Returns:
font associated with the FontSign object.
Requires:
display != null, fontSign != null.
Effects:
create a new Font object if needed.
Modifies:
this.fontMap, this.registered