bibliothek.gui.dock.util.font
Class AbstractDockFont

java.lang.Object
  extended by bibliothek.gui.dock.util.AbstractUIValue<FontModifier,DockFont>
      extended by bibliothek.gui.dock.util.font.AbstractDockFont
All Implemented Interfaces:
DockFont, UIValue<FontModifier>
Direct Known Subclasses:
TabFont, TitleFont

public abstract class AbstractDockFont
extends AbstractUIValue<FontModifier,DockFont>
implements DockFont

An abstract implementation of DockFont that can connect itself to a DockController.

Author:
Benjamin Sigg

Field Summary
 
Fields inherited from interface bibliothek.gui.dock.util.font.DockFont
ID_FLAP_BUTTON_ACTIVE, ID_FLAP_BUTTON_INACTIVE, ID_FLAP_BUTTON_SELECTED, ID_TAB_FOCUSED, ID_TAB_SELECTED, ID_TAB_UNSELECTED, ID_TITLE_ACTIVE, ID_TITLE_INACTIVE, KIND_DOCK_FONT
 
Constructor Summary
AbstractDockFont(String id)
          Creates a new DockFont.
AbstractDockFont(String id, FontModifier backup)
          Creates a new DockFont.
AbstractDockFont(String id, Path kind)
          Creates a new DockFont.
AbstractDockFont(String id, Path kind, FontModifier backup)
          Creates a new DockFont.
 
Method Summary
 void connect(DockController controller)
          Makes sure that this DockFont reads its values from the FontManager of controller.
 FontModifier font()
          Gets the FontModifier which is currently represented by this DockFont.
 Font font(Font font)
          Gets a modified version of font
protected  DockFont me()
          Returns this.
 
Methods inherited from class bibliothek.gui.dock.util.AbstractUIValue
changed, getBackup, getId, getKind, getValue, set, setBackup, setId, setKind, setManager, setValue, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.util.UIValue
set
 

Constructor Detail

AbstractDockFont

public AbstractDockFont(String id,
                        FontModifier backup)
Creates a new DockFont.

Parameters:
id - the unique identifier of the font which is observed
backup - the backup value used when no font is set

AbstractDockFont

public AbstractDockFont(String id,
                        Path kind,
                        FontModifier backup)
Creates a new DockFont.

Parameters:
id - the unique identifier of the font which is observed
kind - what kind of DockFont this is
backup - the backup value used when no font is set

AbstractDockFont

public AbstractDockFont(String id,
                        Path kind)
Creates a new DockFont.

Parameters:
id - the unique identifier of the font which is observed
kind - what kind of DockFont this is

AbstractDockFont

public AbstractDockFont(String id)
Creates a new DockFont.

Parameters:
id - the unique identifier of the font which is observed
Method Detail

me

protected DockFont me()
Description copied from class: AbstractUIValue
Returns this. This method can only be implemented when the generic boundaries are met, so this methods ensures that this is really an U, or abstract.

Specified by:
me in class AbstractUIValue<FontModifier,DockFont>
Returns:
this

connect

public void connect(DockController controller)
Makes sure that this DockFont reads its values from the FontManager of controller.
Use setManager(null) to disconnect.

Parameters:
controller - the new source for fonts, can be null

font

public FontModifier font()
Gets the FontModifier which is currently represented by this DockFont.

Returns:
the modifier, can be null

font

public Font font(Font font)
Gets a modified version of font

Parameters:
font - some font to modify
Returns:
the font that should be used, can be null