bibliothek.gui.dock.util.font
Class ConstantFontModifier

java.lang.Object
  extended by bibliothek.gui.dock.util.font.ConstantFontModifier
All Implemented Interfaces:
FontModifier

public class ConstantFontModifier
extends Object
implements FontModifier

This FontModifier always returns the same Font

Author:
Benjamin Sigg

Constructor Summary
ConstantFontModifier(Font font)
          Creates a new modifier.
 
Method Summary
 Font getFont(Component component)
          Creates or gets a font for component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantFontModifier

public ConstantFontModifier(Font font)
Creates a new modifier.

Parameters:
font - the font which is to be returned by this modifier
Method Detail

getFont

public Font getFont(Component component)
Description copied from interface: FontModifier
Creates or gets a font for component. Note that component can already have a font set from this or another FontModifier.

Specified by:
getFont in interface FontModifier
Parameters:
component - the component for which a font is requested
Returns:
the font for component, can be null