Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.awt.swing.UIManager
We manage three levels of defaults: user defaults, look and feel defaults, system defaults. A call to UIManager.get() checks all three levels in order and returns the first non-null value for a key, if any. A call to UIManager.put() just affects the user defaults. Note that a call to setLookAndFeel() doesn't affect the user defaults, it just replaces the middle defaults "level".
Warning: serialized objects of this class will not be compatible with future swing releases. The current serialization support is appropriate for short term storage or RMI between Swing1.0 applications. It will not be possible to load serialized Swing1.0 objects with future releases of Swing. The JDK1.2 release of Swing will be the compatibility baseline for the serialized form of Swing objects.
Inner Class Summary | |
static | UIManager.LookAndFeelInfo
|
Constructor Summary | |
UIManager()
|
Method Summary | |
static void | addPropertyChangeListener(PropertyChangeListener listener)
|
static Object | get(Object key)
|
static LookAndFeel[] | getAuxiliaryLookAndFeels()
|
static Border | getBorder(Object key)
|
static Color | getColor(Object key)
|
static UIDefaults | getDefaults()
|
static Font | getFont(Object key)
|
static Icon | getIcon(Object key)
|
static UIManager.LookAndFeelInfo[] | getInstalledLookAndFeels()
|
static LookAndFeel | getLookAndFeel()
|
static UIDefaults | getLookAndFeelDefaults()
|
static String | getString(Object key)
|
static java.awt.swing.plaf.ComponentUI | getUI(JComponent target)
|
static void | installLookAndFeel(UIManager.LookAndFeelInfo info)
|
static void | installLookAndFeel(String name,
String className)
|
static Object | put(Object key,
Object value)
|
static void | removePropertyChangeListener(PropertyChangeListener listener)
|
static void | setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
|
static void | setLookAndFeel(LookAndFeel newLookAndFeel)
|
static void | setLookAndFeel(String className)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UIManager()
Method Detail |
public static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
Given a LookAndFeelInfo object one can set the current look and feel like this:
UIManager.setLookAndFeel(info.getClassName());
public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) throws SecurityException
public static void installLookAndFeel(UIManager.LookAndFeelInfo info)
public static void installLookAndFeel(String name, String className)
public static LookAndFeel getLookAndFeel()
public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException
This is a JavaBeans bound property.
lnf.isSupportedLookAndFeel()
is false.public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
lnf.isSupportedLookAndFeel()
is false.public static UIDefaults getDefaults()
public static Font getFont(Object key)
public static Color getColor(Object key)
public static Icon getIcon(Object key)
public static Border getBorder(Object key)
public static String getString(Object key)
public static Object get(Object key)
public static Object put(Object key, Object value)
public static java.awt.swing.plaf.ComponentUI getUI(JComponent target)
public static UIDefaults getLookAndFeelDefaults()
public static LookAndFeel[] getAuxiliaryLookAndFeels()
Note these are not the same as the installed look and feels.
public static void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be added
public static void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removed
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |