getBoolean
public static boolean getBoolean(Object key)
Returns a boolean value from the defaults table. If there is no value
for the specified key, or the value is not an instance of
Boolean
,
this method returns
false
.
key
- the key (null
not permitted).
- The boolean value associated with the specified key.
getBoolean
public static boolean getBoolean(Object key,
Locale locale)
Returns a boolean value from the defaults table. If there is no value
for the specified key, or the value is not an instance of
Boolean
,
this method returns
false
.
key
- the key (null
not permitted).locale
- the locale.
- The boolean value associated with the specified key.
getBorder
public static Border getBorder(Object key)
Returns a border from the defaults table.
key
- the key (null
not permitted).
- The border associated with the given key, or
null
.
getBorder
public static Border getBorder(Object key,
Locale locale)
Returns a border from the defaults table.
key
- the key (null
not permitted).locale
- the locale.
- The border associated with the given key, or
null
.
getColor
public static Color getColor(Object key)
Returns a drawing color from the defaults table.
key
- the key (null
not permitted).
- The color associated with the given key, or
null
.
getColor
public static Color getColor(Object key,
Locale locale)
Returns a drawing color from the defaults table.
key
- the key (null
not permitted).locale
- the locale.
- The color associated with the given key, or
null
.
getCrossPlatformLookAndFeelClassName
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()
"javax.swing.plaf.metal.MetalLookAndFeel"
getDimension
public static Dimension getDimension(Object key)
Returns a dimension from the defaults table.
key
- the key (null
not permitted).
- The color associated with the given key, or
null
.
getDimension
public static Dimension getDimension(Object key,
Locale locale)
Returns a dimension from the defaults table.
key
- the key (null
not permitted).locale
- the locale.
- The color associated with the given key, or
null
.
getFont
public static Font getFont(Object key)
Retrieves a font from the defaults table of the current
LookAndFeel.
key
- an Object that specifies the font. Typically,
this is a String such as
TitledBorder.font
.
- The font associated with the given key, or
null
.
getFont
public static Font getFont(Object key,
Locale locale)
Retrieves a font from the defaults table of the current
LookAndFeel.
key
- an Object that specifies the font. Typically,
this is a String such as
TitledBorder.font
.locale
- the locale.
- The font associated with the given key, or
null
.
getIcon
public static Icon getIcon(Object key)
Returns an icon from the defaults table.
key
- the key (null
not permitted).
- The icon associated with the given key, or
null
.
getIcon
public static Icon getIcon(Object key,
Locale locale)
Returns an icon from the defaults table.
key
- the key (null
not permitted).locale
- the locale.
- The icon associated with the given key, or
null
.
getInsets
public static Insets getInsets(Object key)
Returns an Insets object from the defaults table.
key
- the key (null
not permitted).
- The insets associated with the given key, or
null
.
getInsets
public static Insets getInsets(Object key,
Locale locale)
Returns an Insets object from the defaults table.
key
- the key (null
not permitted).locale
- the locale.
- The insets associated with the given key, or
null
.
getInt
public static int getInt(Object key)
Returns the integer value of the
Integer
associated with the
given key. If there is no value, or the value is not an instance of
Integer
, this method returns 0.
key
- the key (null
not permitted).
- The integer value associated with the given key, or 0.
getInt
public static int getInt(Object key,
Locale locale)
Returns the integer value of the
Integer
associated with the
given key. If there is no value, or the value is not an instance of
Integer
, this method returns 0.
key
- the key (null
not permitted).locale
- the locale.
- The integer value associated with the given key, or 0.
getLookAndFeel
public static LookAndFeel getLookAndFeel()
Returns the current look and feel (which may be null
).
- The current look and feel.
getString
public static String getString(Object key)
Returns the
String
associated with the given key. If the value
is not a
String
, this method returns
null
.
key
- the key (null
not permitted).
- The string associated with the given key, or
null
.
getString
public static String getString(Object key,
Locale locale)
Returns the
String
associated with the given key. If the value
is not a
String
, this method returns
null
.
key
- the key (null
not permitted).locale
- the locale.
- The string associated with the given key, or
null
.
getSystemLookAndFeelClassName
public 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.
- The fully qualified class name for the system look and feel.
installLookAndFeel
public static void installLookAndFeel(String name,
String className)
Creates a new look and feel and adds it to the current array.
name
- the look and feel name.className
- the fully qualified name of the class that implements the
look and feel.
installLookAndFeel
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[]).
put
public static Object put(Object key,
Object value)
Stores an object in the defaults table.
key
- the key.value
- the value.
UIManager.java --
Copyright (C) 2002, 2003, 2004, 2005, 2006, Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Classpath is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Classpath; see the file COPYING. If not, write to the
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA.
Linking this library statically or dynamically with other modules is
making a combined work based on this library. Thus, the terms and
conditions of the GNU General Public License cover the whole
combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent
modules, and to copy and distribute the resulting executable under
terms of your choice, provided that you also meet, for each linked
independent module, the terms and conditions of the license of that
module. An independent module is a module which is not derived from
or based on this library. If you modify this library, you may extend
this exception to your version of the library, but you are not
obligated to do so. If you do not wish to do so, delete this
exception statement from your version.