gov.nih.nlm.swing
Class FontSizeManager

java.lang.Object
  extended bygov.nih.nlm.swing.FontSizeManager

public class FontSizeManager
extends Object

Resizes Fonts in a Container.

Author:
Brian Carlsen

Method Summary
static void addContainer(Container c)
          Adds a Container to the list of Containers whose font size will be managed.
static void adjustFontSize(Container c)
          Adjusts the size of the fonts in the specified Container.
static void decreaseFontSize()
          Decreases font size of all managed containers.
static void increaseFontSize()
          Increases font size of all managed containers.
static void removeContainer(Container c)
          Removes a Container from the list of Containers whose font size will be managed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addContainer

public static void addContainer(Container c)
Adds a Container to the list of Containers whose font size will be managed.

Parameters:
c - the Container to manage

removeContainer

public static void removeContainer(Container c)
Removes a Container from the list of Containers whose font size will be managed.

Parameters:
c - the Container to remove

increaseFontSize

public static void increaseFontSize()
Increases font size of all managed containers. This method also tracks the number of font size increments/decrements that have been performed so that new frames/dialogs can be adjusted before they are made visible.

See Also:
adjustFontSize(Container)

decreaseFontSize

public static void decreaseFontSize()
Decreases font size of all managed containers. This method also tracks the number of font size increments/decrements that have been performed so that new frames/dialogs can be adjusted before they are made visible.

See Also:
adjustFontSize(Container)

adjustFontSize

public static void adjustFontSize(Container c)
Adjusts the size of the fonts in the specified Container. This makes calls to helper methods that increase or decrease the font as many times as it takes to scale the font size of the container to match the number of increase/decrease font calls that have been made thus far. This method should be used for dialogs/frames that are just about to become visible.

Parameters:
c - the Container to adjust


Copyright ©2005