|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.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
Provide a little information about an installed LookAndFeel for the sake of configuring a menu or for initial application set up. |
Method Summary | |
static void | addAuxiliaryLookAndFeel(LookAndFeel laf)
Add a LookAndFeel to the list of auxiliary look and feels. |
static void | addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. |
static Object | get(Object key)
|
static LookAndFeel[] | getAuxiliaryLookAndFeels()
Return the list of auxiliary look and feels (can be null). |
static Border | getBorder(Object key)
|
static Color | getColor(Object key)
|
static String | getCrossPlatformLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the default cross platform look and feel, i.e. the "Java Look and Feel", or JLF. |
static UIDefaults | getDefaults()
|
static Dimension | getDimension(Object key)
|
static Font | getFont(Object key)
|
static Icon | getIcon(Object key)
|
static Insets | getInsets(Object key)
|
static UIManager.LookAndFeelInfo[] | getInstalledLookAndFeels()
Return an array of objects that provide some information about the LookAndFeel implementations that have been installed with this java development kit. |
static int | getInt(Object key)
|
static LookAndFeel | getLookAndFeel()
Returns The current default look and feel, or null. |
static UIDefaults | getLookAndFeelDefaults()
|
static String | getString(Object key)
|
static String | getSystemLookAndFeelClassName()
Returns the name of the LookAndFeel class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class. |
static ComponentUI | getUI(JComponent target)
|
static void | installLookAndFeel(String name,
String className)
|
static void | installLookAndFeel(UIManager.LookAndFeelInfo info)
Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels. |
static Object | put(Object key,
Object value)
|
static boolean | removeAuxiliaryLookAndFeel(LookAndFeel laf)
Remove a LookAndFeel from the list of auxiliary look and feels. |
static void | removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. |
static void | setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
Replaces the current array of installed LookAndFeelInfos. |
static void | setLookAndFeel(LookAndFeel newLookAndFeel)
Set the current default look and feel. |
static void | setLookAndFeel(String className)
|
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
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());
setLookAndFeel(com.sun.java.swing.LookAndFeel)
public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos) throws SecurityException
getInstalledLookAndFeels()
public static void installLookAndFeel(UIManager.LookAndFeelInfo info)
setInstalledLookAndFeels(com.sun.java.swing.UIManager.LookAndFeelInfo[])
public static void installLookAndFeel(String name, String className)
public static LookAndFeel getLookAndFeel()
setLookAndFeel(com.sun.java.swing.LookAndFeel)
public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException
This is a JavaBeans bound property.
lnf.isSupportedLookAndFeel()
is false.getLookAndFeel()
public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
lnf.isSupportedLookAndFeel()
is false.public static String getSystemLookAndFeelClassName()
#setLookAndFeel()
,
getCrossPlatformLookAndFeelClassName()
public static String getCrossPlatformLookAndFeelClassName()
#setLookAndFeel()
,
getSystemLookAndFeelClassName()
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 int getInt(Object key)
public static Insets getInsets(Object key)
public static Dimension getDimension(Object key)
public static Object get(Object key)
public static Object put(Object key, Object value)
public static ComponentUI getUI(JComponent target)
public static UIDefaults getLookAndFeelDefaults()
public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
Note these are not the same as the installed look and feels.
removeAuxiliaryLookAndFeel(com.sun.java.swing.LookAndFeel)
,
setLookAndFeel(com.sun.java.swing.LookAndFeel)
,
getAuxiliaryLookAndFeels()
,
getInstalledLookAndFeels()
public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
Note these are not the same as the installed look and feels.
removeAuxiliaryLookAndFeel(com.sun.java.swing.LookAndFeel)
,
getAuxiliaryLookAndFeels()
,
setLookAndFeel(com.sun.java.swing.LookAndFeel)
,
getInstalledLookAndFeels()
public static LookAndFeel[] getAuxiliaryLookAndFeels()
Note these are not the same as the installed look and feels.
addAuxiliaryLookAndFeel(com.sun.java.swing.LookAndFeel)
,
removeAuxiliaryLookAndFeel(com.sun.java.swing.LookAndFeel)
,
setLookAndFeel(com.sun.java.swing.LookAndFeel)
,
getInstalledLookAndFeels()
public static void addPropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be addedPropertyChangeSupport
public static void removePropertyChangeListener(PropertyChangeListener listener)
listener
- The PropertyChangeListener to be removedPropertyChangeSupport
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |