StocksMonitor 1.5.0

hirondelle.stocks.util.ui
Class Theme

Object
  extended by Theme

public final class Theme
extends Object

Defines all themes which can allow the user to customize the Java Look and Feel.

This application uses only the cross-platform Java Look-and-Feel, and never attempts to adapt to the native look-and-feel (Windows, Metal, Mac).


Field Summary
static MetalTheme AQUA
          Much like DEFAULT, but uses some blue-green colors.
static MetalTheme DEFAULT
          A theme identical to the default Java look-and-feel, but whose name is "Default" instead of the cryptic "Steel", and which provides a toString method (required if Theme objects passed to a combo box).
static MetalTheme LARGE_FONT
          Differs from DEFAULT only in font sizes.
static MetalTheme LOW_VISION
          Large fonts, and high contrast black and white colors.
static List<MetalTheme> VALUES
          Allows user to iterate over all elements of this enumeration.
 
Constructor Summary
Theme()
           
 
Method Summary
static boolean hasLargeFont(MetalTheme aTheme)
          Return true if aTheme uses a larger font than the default; this is the case only for LARGE_FONT and LOW_VISION.
static MetalTheme valueOf(String aText)
          Convert aText into its corresponding Theme object, if possible.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final MetalTheme DEFAULT
A theme identical to the default Java look-and-feel, but whose name is "Default" instead of the cryptic "Steel", and which provides a toString method (required if Theme objects passed to a combo box). Used as the base class for all other themes used in this application.


AQUA

public static final MetalTheme AQUA
Much like DEFAULT, but uses some blue-green colors.


LARGE_FONT

public static final MetalTheme LARGE_FONT
Differs from DEFAULT only in font sizes.


LOW_VISION

public static final MetalTheme LOW_VISION
Large fonts, and high contrast black and white colors.

This is an amalgam of two example themes from the JDK swing examples ; there is apparently no recommended standard for a low-vision theme.


VALUES

public static final List<MetalTheme> VALUES
Allows user to iterate over all elements of this enumeration.

Constructor Detail

Theme

public Theme()
Method Detail

valueOf

public static MetalTheme valueOf(String aText)
Convert aText into its corresponding Theme object, if possible.

Parameters:
aText - possibly-null text which may map to a Theme.
Returns:
null if aText is null, else try to match to a known Theme.
Throws:
IllegalArgumentException - if aText cannot be matched to a known theme.

hasLargeFont

public static boolean hasLargeFont(MetalTheme aTheme)
Return true if aTheme uses a larger font than the default; this is the case only for LARGE_FONT and LOW_VISION.

Themes with large font sizes need particular care, as their use may require changes outside those provided through SwingUtilities.updateComponentTreeUI.


StocksMonitor 1.5.0

Copyright Hirondelle Systems - License - Generated 2008Jul12.10.53