GNU Classpath (0.19) | ||
Prev Class | Next Class | Frames | No Frames | |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.swing.UIManager
LookAndFeel
and any auxiliary LookAndFeel
instances.
Nested Class Summary | |
static class |
|
Constructor Summary | |
|
Method Summary | |
static void |
|
static void |
|
static Object |
|
static Object |
|
static LookAndFeel[] |
|
static boolean |
|
static boolean |
|
static Border | |
static Border | |
static Color | |
static Color | |
static String |
|
static UIDefaults |
|
static Dimension |
|
static Dimension |
|
static Font | |
static Font | |
static Icon | |
static Icon | |
static Insets | |
static Insets | |
static UIManager.LookAndFeelInfo[] |
|
static int | |
static int | |
static LookAndFeel |
|
static UIDefaults |
|
static PropertyChangeListener[] |
|
static String | |
static String | |
static String |
|
static ComponentUI |
|
static void |
|
static void |
|
static Object | |
static boolean |
|
static void |
|
static void |
|
static void |
|
static void |
|
Methods inherited from class java.lang.Object | |
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait |
public UIManager()
Creates a new instance of theUIManager
. There is no need to construct an instance of this class, since all methods are static.
public static void addAuxiliaryLookAndFeel(LookAndFeel laf)
Add aLookAndFeel
to the list of auxiliary look and feels.
- Parameters:
laf
- the auxiliary look and feel (null
not permitted).
- Throws:
NullPointerException
- iflaf
isnull
.
- See Also:
getAuxiliaryLookAndFeels()
public static void addPropertyChangeListener(PropertyChangeListener listener)
Add aPropertyChangeListener
to the listener list.
- Parameters:
listener
- the listener to add
public static Object get(Object key)
Returns an object from theUIDefaults
table for the currentLookAndFeel
.
- Parameters:
key
- the key.
- Returns:
- The object.
public static Object get(Object key, Locale locale)
Returns an object from theUIDefaults
table for the currentLookAndFeel
.
- Parameters:
key
- the key.
- Returns:
- The object.
public static LookAndFeel[] getAuxiliaryLookAndFeels()
Returns an array (possiblynull
) containing the auxiliaryLookAndFeel
s that are in use. These are used by theMultiLookAndFeel
class.
- Returns:
- The auxiliary look and feels (possibly
null
).
- See Also:
addAuxiliaryLookAndFeel(LookAndFeel)
public static boolean getBoolean(Object key)
Returns a boolean value from the defaults table,false
if key is not present.
- Since:
- 1.4
public static boolean getBoolean(Object key, Locale locale)
Returns a boolean value from the defaults table,false
if key is not present.
- Since:
- 1.4
public static Border getBorder(Object key, Locale locale)
Returns a border from the defaults table.
- Since:
- 1.4
public static Color getColor(Object key, Locale locale)
Returns a drawing color from the defaults table.
public static String getCrossPlatformLookAndFeelClassName()
The fully qualified class name of the cross platform (Metal) look and feel. This string can be passed to Class.forName()
- Returns:
"javax.swing.plaf.metal.MetalLookAndFeel"
public static UIDefaults getDefaults()
Returns the default values for this look and feel.
- Returns:
- The
UIDefaults
for the currentLookAndFeel
.
public static Dimension getDimension(Object key)
Returns a dimension from the defaults table.
public static Dimension getDimension(Object key, Locale locale)
Returns a dimension from the defaults table.
public static Font getFont(Object key)
Retrieves a font from the defaults table of the current LookAndFeel.
- Parameters:
key
- an Object that specifies the font. Typically, this is a String such asTitledBorder.font
.
public static Font getFont(Object key, Locale locale)
Retrieves a font from the defaults table of the current LookAndFeel.
- Parameters:
key
- an Object that specifies the font. Typically, this is a String such asTitledBorder.font
.
public static Icon getIcon(Object key, Locale locale)
Returns an Icon from the defaults table.
public static Insets getInsets(Object key)
Returns an Insets object from the defaults table.
public static Insets getInsets(Object key, Locale locale)
Returns an Insets object from the defaults table.
public static UIManager.LookAndFeelInfo[] getInstalledLookAndFeels()
Returns an array containing information about theLookAndFeel
s that are installed.
- Returns:
- A list of the look and feels that are available (installed).
public static LookAndFeel getLookAndFeel()
Returns the current look and feel (which may benull
).
- Returns:
- The current look and feel.
- See Also:
setLookAndFeel(LookAndFeel)
public static UIDefaults getLookAndFeelDefaults()
Returns theUIDefaults
table of the currently active look and feel.
- Returns:
- The
UIDefaults
for the currentLookAndFeel
.
public static PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all addedPropertyChangeListener
objects.
- Returns:
- an array of listeners
- Since:
- 1.4
public static String getString(Object key, Locale locale)
Returns a string from the defaults table.
public static String getSystemLookAndFeelClassName()
Returns the name of theLookAndFeel
class that implements the native systems look and feel if there is one, otherwise the name of the default cross platform LookAndFeel class.
- Returns:
- The fully qualified class name for the system look and feel.
public static ComponentUI getUI(JComponent target)
Returns UI delegate from the currentLookAndFeel
that renders the target component.
- Parameters:
target
- the target component.
public static void installLookAndFeel(String name, String className)
Creates a new look and feel and adds it to the current array.
- Parameters:
name
- the look and feel name.className
- the fully qualified name of the class that implements the look and feel.
public static void installLookAndFeel(UIManager.LookAndFeelInfo info)
Adds the specified look and feel to the current array and then calls setInstalledLookAndFeels(javax.swing.UIManager.LookAndFeelInfo[]).
public static boolean removeAuxiliaryLookAndFeel(LookAndFeel laf)
Removes aLookAndFeel
(LAF) from the list of auxiliary LAFs.
- Parameters:
laf
- the LAF to remove.
- Returns:
true
if the LAF was removed, andfalse
otherwise.
public static void removePropertyChangeListener(PropertyChangeListener listener)
Remove aPropertyChangeListener
from the listener list.
- Parameters:
listener
- the listener to remove
public static void setInstalledLookAndFeels(UIManager.LookAndFeelInfo[] infos)
Replaces the current array of installed LookAndFeelInfos.
public static void setLookAndFeel(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException
Set the current default look and feel using a class name.
- Parameters:
className
- the look and feel class name.
- Throws:
UnsupportedLookAndFeelException
- if the look and feel is not supported on the current platform.
- See Also:
LookAndFeel.isSupportedLookAndFeel()
public static void setLookAndFeel(LookAndFeel newLookAndFeel) throws UnsupportedLookAndFeelException
Sets the currentLookAndFeel
.
- Parameters:
newLookAndFeel
- the new look and feel (null
permitted).
- Throws:
UnsupportedLookAndFeelException
- if the look and feel is not supported on the current platform.
- See Also:
LookAndFeel.isSupportedLookAndFeel()
GNU Classpath (0.19) |