Package generic.theme.laf

# Class ComponentFontRegistry

java.lang.Object
generic.theme.laf.ComponentFontRegistry

public class ComponentFontRegistry extends Object
Maintains a weak set of components associated with a given font id. Whenever the font changes for the font id, this class will update the component's font to the new value.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ComponentFontRegistry(String fontId)`
  Constructs a registry for components bound to the given font id

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addComponent(Component component)`
  Adds a `Component` to the weak set of components whose font should be updated when the underlying font changes for this registry's font id.
  `void`
  `updateComponentFonts()`
  Updates the font for all components bound to this registry's font id.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ComponentFontRegistry

    public ComponentFontRegistry(String fontId)
    Constructs a registry for components bound to the given font id
    Parameters:
      `fontId` - the id of the font to update the containing components

- ## Method Details

  - ### addComponent

    public void addComponent(Component component)
    Adds a `Component` to the weak set of components whose font should be updated when the underlying font changes for this registry's font id.
    Parameters:
      `component` - the component to add

  - ### updateComponentFonts

    public void updateComponentFonts()
    Updates the font for all components bound to this registry's font id.