edu.upenn.cis.pdtb.graphics
Class FontProvider

java.lang.Object
  extended byedu.upenn.cis.pdtb.graphics.FontProvider

public class FontProvider
extends java.lang.Object

Provides the global font. Maintains only WeakReferences to the listeners so that they can be garbage collected without an explicit remove notification.

Author:
nikhild

Field Summary
 java.util.HashSet fListeners
           
static FontProvider PDTBBrowserFontProvider
           
 
Constructor Summary
FontProvider()
          Creates a new instance of FontProvider
 
Method Summary
 void addListener(FontChangeListener l)
           
 java.awt.Font getCurrentFont()
           
 void removeListener(FontChangeListener l)
           
 void setCurrentFont(java.awt.Font newFont)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fListeners

public java.util.HashSet fListeners

PDTBBrowserFontProvider

public static final FontProvider PDTBBrowserFontProvider
Constructor Detail

FontProvider

public FontProvider()
Creates a new instance of FontProvider

Method Detail

addListener

public void addListener(FontChangeListener l)

removeListener

public void removeListener(FontChangeListener l)

getCurrentFont

public java.awt.Font getCurrentFont()

setCurrentFont

public void setCurrentFont(java.awt.Font newFont)