Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.crosswire.common.swing
Class LookAndFeelUtil

    java.lang.Object
      org.crosswire.common.swing.LookAndFeelUtil

    public final class LookAndFeelUtil

extends Object

LookAndFeelUtil declares the Choices and actions needed to dynamically change the look and feel (PLAF) and to add new PLAFs without needing to restart.

Author:
  Joe Walker [joe at eireneh dot com], Mark Goodwin [mark at thorubio dot org], DM Smith [dmsmith555 at yahoo dot com], Willie Thean [williethean at yahoo dot com]
See Also:
  `for license details. The copyright to this program is held by it's authors.`

Field Summary
`private static Class` | `currentLAF` The current PLAF
`private static Class` | `defaultLAF` The default PLAF (and the default value)
`private static String` | `font` The font to be used for the application

Constructor Summary
`private` | `LookAndFeelUtil()` Prevent Instansiation

Method Summary
`private static void` | `customizeBDLookandFeel()`
`static String` | `getFont()` Accessor for the stylesheet we are transforming using
`static Class` | `getLookAndFeel()` The Options customization
`static void` | `initialize()` Establish the system look and feel
`static void` | `setFont(String font)` Accessor for the stylesheet we are transforming using
`static void` | `setLookAndFeel(Class newLaFClass)` Set the look and feel to a new class.
`static void` | `setUIFont(FontUIResource f)` Set the default font for all Swing components.
`static FontUIResource` | `toFontUIResource()` Converts the font spec to something useful.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### currentLAF

    private static Class currentLAF

  The current PLAF

### defaultLAF

    private static Class defaultLAF

  The default PLAF (and the default value)

### font

    private static String font

  The font to be used for the application

Constructor Detail

### LookAndFeelUtil

    private LookAndFeelUtil()

  Prevent Instansiation

Method Detail

### initialize

    public static void initialize()

  Establish the system look and feel

### getLookAndFeel

    public static Class getLookAndFeel()

  The Options customization

### setLookAndFeel

    public static void setLookAndFeel(Class newLaFClass)
                               throws InstantiationException,
                                      IllegalAccessException,
                                      UnsupportedLookAndFeelException

  Set the look and feel to a new class.

  Throws:
    `InstantiationException`
    `IllegalAccessException`
    `UnsupportedLookAndFeelException`

### getFont

    public static String getFont()

  Accessor for the stylesheet we are transforming using

### toFontUIResource

    public static FontUIResource toFontUIResource()

  Converts the font spec to something useful.

### setFont

    public static void setFont(String font)

  Accessor for the stylesheet we are transforming using

### setUIFont

    public static void setUIFont(FontUIResource f)

  Set the default font for all Swing components. E.g. `setUIFont(new FontUIResource("Serif", Font.ITALIC, 12));`
  Note: a single resources can be changed with: `UIManager.put("Label.font", new Font("Serif", Font.ITALIC, 12));`

  Parameters:
    `f` - the font to use

### customizeBDLookandFeel

    private static void customizeBDLookandFeel()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¨ 2003-2007
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD