bibliothek.gui.dock.util.swing
Class FontUpdater

java.lang.Object
  extended by bibliothek.gui.dock.util.swing.FontUpdater

public class FontUpdater
extends Object

A FontUpdater wraps around a JComponent and changes the font of the component using a FontModifier.
Components that use this updater must call enterUpdateUI() end leaveUpdateUI() before and after JComponent.updateUI() is called.
Components should create an instance of this updater before they are added to any other component.

Author:
Benjamin Sigg

Constructor Summary
FontUpdater(JComponent component)
          Creates a new updater
 
Method Summary
 void enterUpdateUI()
          Informs this updater that JComponent.updateUI() is about to start.
 FontModifier getFontModifier()
          Gets the modifier which is used to update the font of this label.
 void leaveUpdateUI()
          Informs this updater that JComponent.updateUI() has been executed.
 void setFontModifier(FontModifier modifier)
          Sets the modifier which is used to update the font of this label.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontUpdater

public FontUpdater(JComponent component)
Creates a new updater

Parameters:
component - the component whose font will be changed
Method Detail

enterUpdateUI

public void enterUpdateUI()
Informs this updater that JComponent.updateUI() is about to start.


leaveUpdateUI

public void leaveUpdateUI()
Informs this updater that JComponent.updateUI() has been executed.


setFontModifier

public void setFontModifier(FontModifier modifier)
Sets the modifier which is used to update the font of this label.

Parameters:
modifier - the new modifier, can be null

getFontModifier

public FontModifier getFontModifier()
Gets the modifier which is used to update the font of this label.

Returns:
the modifier, may be null