javax.swing
Class UIDefaults

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by java.util.Dictionary sample code for java.util.Dictionary definition code for java.util.Dictionary <K,V>
      extended by java.util.Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
          extended by javax.swing.UIDefaults
All Implemented Interfaces:
Serializable sample code for java.io.Serializable definition code for java.io.Serializable , Cloneable sample code for java.lang.Cloneable definition code for java.lang.Cloneable , Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >

public class UIDefaults
extends Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >

A table of defaults for Swing components. Applications can set/get default values via the UIManager.

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 applications running the same version of Swing. As of 1.4, support for long term storage of all JavaBeansTM has been added to the java.beans package. Please see XMLEncoder sample code for java.beans.XMLEncoder definition code for java.beans.XMLEncoder .

See Also:
UIManager sample code for javax.swing.UIManager definition code for javax.swing.UIManager , Serialized Form

Nested Class Summary
static interface UIDefaults.ActiveValue sample code for javax.swing.UIDefaults.ActiveValue definition code for javax.swing.UIDefaults.ActiveValue
          This class enables one to store an entry in the defaults table that's constructed each time it's looked up with one of the getXXX(key) methods.
static class UIDefaults.LazyInputMap sample code for javax.swing.UIDefaults.LazyInputMap definition code for javax.swing.UIDefaults.LazyInputMap
          LazyInputMap will create a InputMap in its createValue method.
static interface UIDefaults.LazyValue sample code for javax.swing.UIDefaults.LazyValue definition code for javax.swing.UIDefaults.LazyValue
          This class enables one to store an entry in the defaults table that isn't constructed until the first time it's looked up with one of the getXXX(key) methods.
static class UIDefaults.ProxyLazyValue sample code for javax.swing.UIDefaults.ProxyLazyValue definition code for javax.swing.UIDefaults.ProxyLazyValue
          This class provides an implementation of LazyValue which can be used to delay loading of the Class for the instance to be created.
 
Constructor Summary
UIDefaults sample code for javax.swing.UIDefaults.UIDefaults() definition code for javax.swing.UIDefaults.UIDefaults() ()
          Create an empty defaults table.
UIDefaults sample code for javax.swing.UIDefaults.UIDefaults(java.lang.Object[]) definition code for javax.swing.UIDefaults.UIDefaults(java.lang.Object[]) (Object sample code for java.lang.Object definition code for java.lang.Object [] keyValueList)
          Create a defaults table initialized with the specified key/value pairs.
 
Method Summary
 void addPropertyChangeListener sample code for javax.swing.UIDefaults.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.UIDefaults.addPropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Adds a PropertyChangeListener to the listener list.
 void addResourceBundle sample code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  bundleName)
          Adds a resource bundle to the list of resource bundles that are searched for localized values.
protected  void firePropertyChange sample code for javax.swing.UIDefaults.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.UIDefaults.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) (String sample code for java.lang.String definition code for java.lang.String  propertyName, Object sample code for java.lang.Object definition code for java.lang.Object  oldValue, Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
          Support for reporting bound property changes.
 Object sample code for java.lang.Object definition code for java.lang.Object get sample code for javax.swing.UIDefaults.get(java.lang.Object) definition code for javax.swing.UIDefaults.get(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          Returns the value for key.
 Object sample code for java.lang.Object definition code for java.lang.Object get sample code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          Returns the value for key associated with the given locale.
 boolean getBoolean sample code for javax.swing.UIDefaults.getBoolean(java.lang.Object) definition code for javax.swing.UIDefaults.getBoolean(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is boolean, return the boolean value, otherwise return false.
 boolean getBoolean sample code for javax.swing.UIDefaults.getBoolean(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getBoolean(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is boolean, return the boolean value, otherwise return false.
 Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border getBorder sample code for javax.swing.UIDefaults.getBorder(java.lang.Object) definition code for javax.swing.UIDefaults.getBorder(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is a Border return it, otherwise return null.
 Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border getBorder sample code for javax.swing.UIDefaults.getBorder(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getBorder(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is a Border return it, otherwise return null.
 Color sample code for java.awt.Color definition code for java.awt.Color getColor sample code for javax.swing.UIDefaults.getColor(java.lang.Object) definition code for javax.swing.UIDefaults.getColor(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is a Color return it, otherwise return null.
 Color sample code for java.awt.Color definition code for java.awt.Color getColor sample code for javax.swing.UIDefaults.getColor(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getColor(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is a Color return it, otherwise return null.
 Locale sample code for java.util.Locale definition code for java.util.Locale getDefaultLocale sample code for javax.swing.UIDefaults.getDefaultLocale() definition code for javax.swing.UIDefaults.getDefaultLocale() ()
          Returns the default locale.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getDimension sample code for javax.swing.UIDefaults.getDimension(java.lang.Object) definition code for javax.swing.UIDefaults.getDimension(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is a Dimension return it, otherwise return null.
 Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension getDimension sample code for javax.swing.UIDefaults.getDimension(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getDimension(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is a Dimension return it, otherwise return null.
 Font sample code for java.awt.Font definition code for java.awt.Font getFont sample code for javax.swing.UIDefaults.getFont(java.lang.Object) definition code for javax.swing.UIDefaults.getFont(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is a Font return it, otherwise return null.
 Font sample code for java.awt.Font definition code for java.awt.Font getFont sample code for javax.swing.UIDefaults.getFont(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getFont(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is a Font return it, otherwise return null.
 Icon sample code for javax.swing.Icon definition code for javax.swing.Icon getIcon sample code for javax.swing.UIDefaults.getIcon(java.lang.Object) definition code for javax.swing.UIDefaults.getIcon(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is an Icon return it, otherwise return null.
 Icon sample code for javax.swing.Icon definition code for javax.swing.Icon getIcon sample code for javax.swing.UIDefaults.getIcon(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getIcon(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is an Icon return it, otherwise return null.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for javax.swing.UIDefaults.getInsets(java.lang.Object) definition code for javax.swing.UIDefaults.getInsets(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is an Insets return it, otherwise return null.
 Insets sample code for java.awt.Insets definition code for java.awt.Insets getInsets sample code for javax.swing.UIDefaults.getInsets(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getInsets(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is an Insets return it, otherwise return null.
 int getInt sample code for javax.swing.UIDefaults.getInt(java.lang.Object) definition code for javax.swing.UIDefaults.getInt(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is an Integer return its integer value, otherwise return 0.
 int getInt sample code for javax.swing.UIDefaults.getInt(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getInt(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is an Integer return its integer value, otherwise return 0.
 PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners sample code for javax.swing.UIDefaults.getPropertyChangeListeners() definition code for javax.swing.UIDefaults.getPropertyChangeListeners() ()
          Returns an array of all the PropertyChangeListeners added to this UIDefaults with addPropertyChangeListener().
 String sample code for java.lang.String definition code for java.lang.String getString sample code for javax.swing.UIDefaults.getString(java.lang.Object) definition code for javax.swing.UIDefaults.getString(java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key)
          If the value of key is a String return it, otherwise return null.
 String sample code for java.lang.String definition code for java.lang.String getString sample code for javax.swing.UIDefaults.getString(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getString(java.lang.Object, java.util.Locale) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          If the value of key for the given Locale is a String return it, otherwise return null.
 ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI getUI sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) (JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  target)
          Creates an ComponentUI implementation for the specified component.
 Class sample code for java.lang.Class definition code for java.lang.Class <? extends ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI > getUIClass sample code for javax.swing.UIDefaults.getUIClass(java.lang.String) definition code for javax.swing.UIDefaults.getUIClass(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  uiClassID)
          Returns the L&F class that renders this component.
 Class sample code for java.lang.Class definition code for java.lang.Class <? extends ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI > getUIClass sample code for javax.swing.UIDefaults.getUIClass(java.lang.String, java.lang.ClassLoader) definition code for javax.swing.UIDefaults.getUIClass(java.lang.String, java.lang.ClassLoader) (String sample code for java.lang.String definition code for java.lang.String  uiClassID, ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader  uiClassLoader)
          The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class.
protected  void getUIError sample code for javax.swing.UIDefaults.getUIError(java.lang.String) definition code for javax.swing.UIDefaults.getUIError(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  msg)
          If getUI() fails for any reason, it calls this method before returning null.
 Object sample code for java.lang.Object definition code for java.lang.Object put sample code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) definition code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) (Object sample code for java.lang.Object definition code for java.lang.Object  key, Object sample code for java.lang.Object definition code for java.lang.Object  value)
          Sets the value of key to value for all locales.
 void putDefaults sample code for javax.swing.UIDefaults.putDefaults(java.lang.Object[]) definition code for javax.swing.UIDefaults.putDefaults(java.lang.Object[]) (Object sample code for java.lang.Object definition code for java.lang.Object [] keyValueList)
          Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent.
 void removePropertyChangeListener sample code for javax.swing.UIDefaults.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.UIDefaults.removePropertyChangeListener(java.beans.PropertyChangeListener) (PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
          Removes a PropertyChangeListener from the listener list.
 void removeResourceBundle sample code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String) (String sample code for java.lang.String definition code for java.lang.String  bundleName)
          Removes a resource bundle from the list of resource bundles that are searched for localized defaults.
 void setDefaultLocale sample code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale) definition code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale) (Locale sample code for java.util.Locale definition code for java.util.Locale  l)
          Sets the default locale.
 
Methods inherited from class java.util.Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable
clear sample code for java.util.Hashtable.clear() definition code for java.util.Hashtable.clear() , clone sample code for java.util.Hashtable.clone() definition code for java.util.Hashtable.clone() , contains sample code for java.util.Hashtable.contains(java.lang.Object) definition code for java.util.Hashtable.contains(java.lang.Object) , containsKey sample code for java.util.Hashtable.containsKey(java.lang.Object) definition code for java.util.Hashtable.containsKey(java.lang.Object) , containsValue sample code for java.util.Hashtable.containsValue(java.lang.Object) definition code for java.util.Hashtable.containsValue(java.lang.Object) , elements sample code for java.util.Hashtable.elements() definition code for java.util.Hashtable.elements() , entrySet sample code for java.util.Hashtable.entrySet() definition code for java.util.Hashtable.entrySet() , equals sample code for java.util.Hashtable.equals(java.lang.Object) definition code for java.util.Hashtable.equals(java.lang.Object) , hashCode sample code for java.util.Hashtable.hashCode() definition code for java.util.Hashtable.hashCode() , isEmpty sample code for java.util.Hashtable.isEmpty() definition code for java.util.Hashtable.isEmpty() , keys sample code for java.util.Hashtable.keys() definition code for java.util.Hashtable.keys() , keySet sample code for java.util.Hashtable.keySet() definition code for java.util.Hashtable.keySet() , putAll sample code for java.util.Hashtable.putAll(java.util.Map) definition code for java.util.Hashtable.putAll(java.util.Map) , rehash sample code for java.util.Hashtable.rehash() definition code for java.util.Hashtable.rehash() , remove sample code for java.util.Hashtable.remove(java.lang.Object) definition code for java.util.Hashtable.remove(java.lang.Object) , size sample code for java.util.Hashtable.size() definition code for java.util.Hashtable.size() , toString sample code for java.util.Hashtable.toString() definition code for java.util.Hashtable.toString() , values sample code for java.util.Hashtable.values() definition code for java.util.Hashtable.values()
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

UIDefaults sample code for javax.swing.UIDefaults() definition code for javax.swing.UIDefaults()

public UIDefaults()
Create an empty defaults table.


UIDefaults sample code for javax.swing.UIDefaults(java.lang.Object[]) definition code for javax.swing.UIDefaults(java.lang.Object[])

public UIDefaults(Object sample code for java.lang.Object definition code for java.lang.Object [] keyValueList)
Create a defaults table initialized with the specified key/value pairs. For example:
        Object[] uiDefaults = {
             "Font", new Font("Dialog", Font.BOLD, 12),
            "Color", Color.red,
             "five", new Integer(5)
        }
        UIDefaults myDefaults = new UIDefaults(uiDefaults);
 

Parameters:
keyValueList - an array of objects containing the key/value pairs
Method Detail

get sample code for javax.swing.UIDefaults.get(java.lang.Object) definition code for javax.swing.UIDefaults.get(java.lang.Object)

public Object sample code for java.lang.Object definition code for java.lang.Object  get(Object sample code for java.lang.Object definition code for java.lang.Object  key)
Returns the value for key. If the value is a UIDefaults.LazyValue then the real value is computed with LazyValue.createValue(), the table entry is replaced, and the real value is returned. If the value is an UIDefaults.ActiveValue the table entry is not replaced - the value is computed with ActiveValue.createValue() for each get() call. If the key is not found in the table then it is searched for in the list of resource bundles maintained by this object. The resource bundles are searched most recently added first using the locale returned by getDefaultLocale. LazyValues and ActiveValues are not supported in the resource bundles.

Specified by:
get sample code for java.util.Map.get(java.lang.Object) definition code for java.util.Map.get(java.lang.Object) in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
get sample code for java.util.Hashtable.get(java.lang.Object) definition code for java.util.Hashtable.get(java.lang.Object) in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Parameters:
key - the desired key
Returns:
the value for key
Since:
1.4
See Also:
UIDefaults.LazyValue sample code for javax.swing.UIDefaults.LazyValue definition code for javax.swing.UIDefaults.LazyValue , UIDefaults.ActiveValue sample code for javax.swing.UIDefaults.ActiveValue definition code for javax.swing.UIDefaults.ActiveValue , Hashtable.get(java.lang.Object) sample code for java.util.Hashtable.get(java.lang.Object) definition code for java.util.Hashtable.get(java.lang.Object) , getDefaultLocale() sample code for javax.swing.UIDefaults.getDefaultLocale() definition code for javax.swing.UIDefaults.getDefaultLocale() , addResourceBundle(java.lang.String) sample code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.addResourceBundle(java.lang.String)

get sample code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale)

public Object sample code for java.lang.Object definition code for java.lang.Object  get(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                  Locale sample code for java.util.Locale definition code for java.util.Locale  l)
Returns the value for key associated with the given locale. If the value is a UIDefaults.LazyValue then the real value is computed with LazyValue.createValue(), the table entry is replaced, and the real value is returned. If the value is an UIDefaults.ActiveValue the table entry is not replaced - the value is computed with ActiveValue.createValue() for each get() call. If the key is not found in the table then it is searched for in the list of resource bundles maintained by this object. The resource bundles are searched most recently added first using the given locale. LazyValues and ActiveValues are not supported in the resource bundles.

Parameters:
key - the desired key
l - the desired locale
Returns:
the value for key
Since:
1.4
See Also:
UIDefaults.LazyValue sample code for javax.swing.UIDefaults.LazyValue definition code for javax.swing.UIDefaults.LazyValue , UIDefaults.ActiveValue sample code for javax.swing.UIDefaults.ActiveValue definition code for javax.swing.UIDefaults.ActiveValue , Hashtable.get(java.lang.Object) sample code for java.util.Hashtable.get(java.lang.Object) definition code for java.util.Hashtable.get(java.lang.Object) , addResourceBundle(java.lang.String) sample code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.addResourceBundle(java.lang.String)

put sample code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) definition code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object)

public Object sample code for java.lang.Object definition code for java.lang.Object  put(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                  Object sample code for java.lang.Object definition code for java.lang.Object  value)
Sets the value of key to value for all locales. If key is a string and the new value isn't equal to the old one, fire a PropertyChangeEvent. If value is null, the key is removed from the table.

Specified by:
put sample code for java.util.Map.put(K, V) definition code for java.util.Map.put(K, V) in interface Map sample code for java.util.Map definition code for java.util.Map <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Overrides:
put sample code for java.util.Hashtable.put(K, V) definition code for java.util.Hashtable.put(K, V) in class Hashtable sample code for java.util.Hashtable definition code for java.util.Hashtable <Object sample code for java.lang.Object definition code for java.lang.Object ,Object sample code for java.lang.Object definition code for java.lang.Object >
Parameters:
key - the unique Object who's value will be used to retrieve the data value associated with it
value - the new Object to store as data under that key
Returns:
the previous Object value, or null
See Also:
putDefaults(java.lang.Object[]) sample code for javax.swing.UIDefaults.putDefaults(java.lang.Object[]) definition code for javax.swing.UIDefaults.putDefaults(java.lang.Object[]) , Hashtable.put(K, V) sample code for java.util.Hashtable.put(K, V) definition code for java.util.Hashtable.put(K, V)

putDefaults sample code for javax.swing.UIDefaults.putDefaults(java.lang.Object[]) definition code for javax.swing.UIDefaults.putDefaults(java.lang.Object[])

public void putDefaults(Object sample code for java.lang.Object definition code for java.lang.Object [] keyValueList)
Puts all of the key/value pairs in the database and unconditionally generates one PropertyChangeEvent. The events oldValue and newValue will be null and its propertyName will be "UIDefaults". The key/value pairs are added for all locales.

Parameters:
keyValueList - an array of key/value pairs
See Also:
put(java.lang.Object, java.lang.Object) sample code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) definition code for javax.swing.UIDefaults.put(java.lang.Object, java.lang.Object) , Hashtable.put(K, V) sample code for java.util.Hashtable.put(K, V) definition code for java.util.Hashtable.put(K, V)

getFont sample code for javax.swing.UIDefaults.getFont(java.lang.Object) definition code for javax.swing.UIDefaults.getFont(java.lang.Object)

public Font sample code for java.awt.Font definition code for java.awt.Font  getFont(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is a Font return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is a Font, return the Font object; otherwise return null

getFont sample code for javax.swing.UIDefaults.getFont(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getFont(java.lang.Object, java.util.Locale)

public Font sample code for java.awt.Font definition code for java.awt.Font  getFont(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                    Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is a Font return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is a Font, return the Font object; otherwise return null
Since:
1.4

getColor sample code for javax.swing.UIDefaults.getColor(java.lang.Object) definition code for javax.swing.UIDefaults.getColor(java.lang.Object)

public Color sample code for java.awt.Color definition code for java.awt.Color  getColor(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is a Color return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is a Color, return the Color object; otherwise return null

getColor sample code for javax.swing.UIDefaults.getColor(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getColor(java.lang.Object, java.util.Locale)

public Color sample code for java.awt.Color definition code for java.awt.Color  getColor(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                      Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is a Color return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is a Color, return the Color object; otherwise return null
Since:
1.4

getIcon sample code for javax.swing.UIDefaults.getIcon(java.lang.Object) definition code for javax.swing.UIDefaults.getIcon(java.lang.Object)

public Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  getIcon(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is an Icon return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is an Icon, return the Icon object; otherwise return null

getIcon sample code for javax.swing.UIDefaults.getIcon(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getIcon(java.lang.Object, java.util.Locale)

public Icon sample code for javax.swing.Icon definition code for javax.swing.Icon  getIcon(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                    Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is an Icon return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is an Icon, return the Icon object; otherwise return null
Since:
1.4

getBorder sample code for javax.swing.UIDefaults.getBorder(java.lang.Object) definition code for javax.swing.UIDefaults.getBorder(java.lang.Object)

public Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  getBorder(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is a Border return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is a Border, return the Border object; otherwise return null

getBorder sample code for javax.swing.UIDefaults.getBorder(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getBorder(java.lang.Object, java.util.Locale)

public Border sample code for javax.swing.border.Border definition code for javax.swing.border.Border  getBorder(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                        Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is a Border return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is a Border, return the Border object; otherwise return null
Since:
1.4

getString sample code for javax.swing.UIDefaults.getString(java.lang.Object) definition code for javax.swing.UIDefaults.getString(java.lang.Object)

public String sample code for java.lang.String definition code for java.lang.String  getString(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is a String return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is a String, return the String object; otherwise return null

getString sample code for javax.swing.UIDefaults.getString(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getString(java.lang.Object, java.util.Locale)

public String sample code for java.lang.String definition code for java.lang.String  getString(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                        Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is a String return it, otherwise return null.

Parameters:
key - the desired key
l - the desired Locale
Returns:
if the value for key for the given Locale is a String, return the String object; otherwise return null
Since:
1.4

getInt sample code for javax.swing.UIDefaults.getInt(java.lang.Object) definition code for javax.swing.UIDefaults.getInt(java.lang.Object)

public int getInt(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is an Integer return its integer value, otherwise return 0.

Parameters:
key - the desired key
Returns:
if the value for key is an Integer, return its value, otherwise return 0

getInt sample code for javax.swing.UIDefaults.getInt(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getInt(java.lang.Object, java.util.Locale)

public int getInt(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                  Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is an Integer return its integer value, otherwise return 0.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is an Integer, return its value, otherwise return 0
Since:
1.4

getBoolean sample code for javax.swing.UIDefaults.getBoolean(java.lang.Object) definition code for javax.swing.UIDefaults.getBoolean(java.lang.Object)

public boolean getBoolean(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is boolean, return the boolean value, otherwise return false.

Parameters:
key - an Object specifying the key for the desired boolean value
Returns:
if the value of key is boolean, return the boolean value, otherwise return false.
Since:
1.4

getBoolean sample code for javax.swing.UIDefaults.getBoolean(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getBoolean(java.lang.Object, java.util.Locale)

public boolean getBoolean(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                          Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is boolean, return the boolean value, otherwise return false.

Parameters:
key - an Object specifying the key for the desired boolean value
l - the desired locale
Returns:
if the value for key and Locale is boolean, return the boolean value, otherwise return false.
Since:
1.4

getInsets sample code for javax.swing.UIDefaults.getInsets(java.lang.Object) definition code for javax.swing.UIDefaults.getInsets(java.lang.Object)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is an Insets return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is an Insets, return the Insets object; otherwise return null

getInsets sample code for javax.swing.UIDefaults.getInsets(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getInsets(java.lang.Object, java.util.Locale)

public Insets sample code for java.awt.Insets definition code for java.awt.Insets  getInsets(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                        Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is an Insets return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is an Insets, return the Insets object; otherwise return null
Since:
1.4

getDimension sample code for javax.swing.UIDefaults.getDimension(java.lang.Object) definition code for javax.swing.UIDefaults.getDimension(java.lang.Object)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getDimension(Object sample code for java.lang.Object definition code for java.lang.Object  key)
If the value of key is a Dimension return it, otherwise return null.

Parameters:
key - the desired key
Returns:
if the value for key is a Dimension, return the Dimension object; otherwise return null

getDimension sample code for javax.swing.UIDefaults.getDimension(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.getDimension(java.lang.Object, java.util.Locale)

public Dimension sample code for java.awt.Dimension definition code for java.awt.Dimension  getDimension(Object sample code for java.lang.Object definition code for java.lang.Object  key,
                              Locale sample code for java.util.Locale definition code for java.util.Locale  l)
If the value of key for the given Locale is a Dimension return it, otherwise return null.

Parameters:
key - the desired key
l - the desired locale
Returns:
if the value for key and Locale is a Dimension, return the Dimension object; otherwise return null
Since:
1.4

getUIClass sample code for javax.swing.UIDefaults.getUIClass(java.lang.String, java.lang.ClassLoader) definition code for javax.swing.UIDefaults.getUIClass(java.lang.String, java.lang.ClassLoader)

public Class sample code for java.lang.Class definition code for java.lang.Class <? extends ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI > getUIClass(String sample code for java.lang.String definition code for java.lang.String  uiClassID,
                                               ClassLoader sample code for java.lang.ClassLoader definition code for java.lang.ClassLoader  uiClassLoader)
The value of get(uidClassID) must be the String name of a class that implements the corresponding ComponentUI class. If the class hasn't been loaded before, this method looks up the class with uiClassLoader.loadClass() if a non null class loader is provided, classForName() otherwise.

If a mapping for uiClassID exists or if the specified class can't be found, return null.

This method is used by getUI, it's usually not necessary to call it directly.

Parameters:
uiClassID - a string containing the class ID
uiClassLoader - the object which will load the class
Returns:
the value of Class.forName(get(uidClassID))
See Also:
getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

getUIClass sample code for javax.swing.UIDefaults.getUIClass(java.lang.String) definition code for javax.swing.UIDefaults.getUIClass(java.lang.String)

public Class sample code for java.lang.Class definition code for java.lang.Class <? extends ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI > getUIClass(String sample code for java.lang.String definition code for java.lang.String  uiClassID)
Returns the L&F class that renders this component.

Parameters:
uiClassID - a string containing the class ID
Returns:
the Class object returned by getUIClass(uiClassID, null)

getUIError sample code for javax.swing.UIDefaults.getUIError(java.lang.String) definition code for javax.swing.UIDefaults.getUIError(java.lang.String)

protected void getUIError(String sample code for java.lang.String definition code for java.lang.String  msg)
If getUI() fails for any reason, it calls this method before returning null. Subclasses may choose to do more or less here.

Parameters:
msg - message string to print
See Also:
getUI(javax.swing.JComponent) sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

getUI sample code for javax.swing.UIDefaults.getUI(javax.swing.JComponent) definition code for javax.swing.UIDefaults.getUI(javax.swing.JComponent)

public ComponentUI sample code for javax.swing.plaf.ComponentUI definition code for javax.swing.plaf.ComponentUI  getUI(JComponent sample code for javax.swing.JComponent definition code for javax.swing.JComponent  target)
Creates an ComponentUI implementation for the specified component. In other words create the look and feel specific delegate object for target. This is done in two steps:

Parameters:
target - the JComponent which needs a UI
Returns:
the ComponentUI object

addPropertyChangeListener sample code for javax.swing.UIDefaults.addPropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.UIDefaults.addPropertyChangeListener(java.beans.PropertyChangeListener)

public void addPropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Adds a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired whenever a default is changed.

Parameters:
listener - the PropertyChangeListener to be added
See Also:
PropertyChangeSupport sample code for java.beans.PropertyChangeSupport definition code for java.beans.PropertyChangeSupport

removePropertyChangeListener sample code for javax.swing.UIDefaults.removePropertyChangeListener(java.beans.PropertyChangeListener) definition code for javax.swing.UIDefaults.removePropertyChangeListener(java.beans.PropertyChangeListener)

public void removePropertyChangeListener(PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener  listener)
Removes a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

Parameters:
listener - the PropertyChangeListener to be removed
See Also:
PropertyChangeSupport sample code for java.beans.PropertyChangeSupport definition code for java.beans.PropertyChangeSupport

getPropertyChangeListeners sample code for javax.swing.UIDefaults.getPropertyChangeListeners() definition code for javax.swing.UIDefaults.getPropertyChangeListeners()

public PropertyChangeListener sample code for java.beans.PropertyChangeListener definition code for java.beans.PropertyChangeListener [] getPropertyChangeListeners()
Returns an array of all the PropertyChangeListeners added to this UIDefaults with addPropertyChangeListener().

Returns:
all of the PropertyChangeListeners added or an empty array if no listeners have been added
Since:
1.4

firePropertyChange sample code for javax.swing.UIDefaults.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) definition code for javax.swing.UIDefaults.firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object)

protected void firePropertyChange(String sample code for java.lang.String definition code for java.lang.String  propertyName,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  oldValue,
                                  Object sample code for java.lang.Object definition code for java.lang.Object  newValue)
Support for reporting bound property changes. If oldValue and newValue are not equal and the PropertyChangeEventx listener list isn't empty, then fire a PropertyChange event to each listener.

Parameters:
propertyName - the programmatic name of the property that was changed
oldValue - the old value of the property
newValue - the new value of the property
See Also:
PropertyChangeSupport sample code for java.beans.PropertyChangeSupport definition code for java.beans.PropertyChangeSupport

addResourceBundle sample code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.addResourceBundle(java.lang.String)

public void addResourceBundle(String sample code for java.lang.String definition code for java.lang.String  bundleName)
Adds a resource bundle to the list of resource bundles that are searched for localized values. Resource bundles are searched in the reverse order they were added. In other words, the most recently added bundle is searched first.

Parameters:
bundleName - the base name of the resource bundle to be added
Since:
1.4
See Also:
ResourceBundle sample code for java.util.ResourceBundle definition code for java.util.ResourceBundle , removeResourceBundle(java.lang.String) sample code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String)

removeResourceBundle sample code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.removeResourceBundle(java.lang.String)

public void removeResourceBundle(String sample code for java.lang.String definition code for java.lang.String  bundleName)
Removes a resource bundle from the list of resource bundles that are searched for localized defaults.

Parameters:
bundleName - the base name of the resource bundle to be removed
Since:
1.4
See Also:
ResourceBundle sample code for java.util.ResourceBundle definition code for java.util.ResourceBundle , addResourceBundle(java.lang.String) sample code for javax.swing.UIDefaults.addResourceBundle(java.lang.String) definition code for javax.swing.UIDefaults.addResourceBundle(java.lang.String)

setDefaultLocale sample code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale) definition code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale)

public void setDefaultLocale(Locale sample code for java.util.Locale definition code for java.util.Locale  l)
Sets the default locale. The default locale is used in retrieving localized values via get methods that do not take a locale argument. As of release 1.4, Swing UI objects should retrieve localized values using the locale of their component rather than the default locale. The default locale exists to provide compatibility with pre 1.4 behaviour.

Parameters:
l - the new default locale
Since:
1.4
See Also:
getDefaultLocale() sample code for javax.swing.UIDefaults.getDefaultLocale() definition code for javax.swing.UIDefaults.getDefaultLocale() , get(Object) sample code for javax.swing.UIDefaults.get(java.lang.Object) definition code for javax.swing.UIDefaults.get(java.lang.Object) , get(Object,Locale) sample code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale)

getDefaultLocale sample code for javax.swing.UIDefaults.getDefaultLocale() definition code for javax.swing.UIDefaults.getDefaultLocale()

public Locale sample code for java.util.Locale definition code for java.util.Locale  getDefaultLocale()
Returns the default locale. The default locale is used in retrieving localized values via get methods that do not take a locale argument. As of release 1.4, Swing UI objects should retrieve localized values using the locale of their component rather than the default locale. The default locale exists to provide compatibility with pre 1.4 behaviour.

Returns:
the default locale
Since:
1.4
See Also:
setDefaultLocale(java.util.Locale) sample code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale) definition code for javax.swing.UIDefaults.setDefaultLocale(java.util.Locale) , get(Object) sample code for javax.swing.UIDefaults.get(java.lang.Object) definition code for javax.swing.UIDefaults.get(java.lang.Object) , get(Object,Locale) sample code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale) definition code for javax.swing.UIDefaults.get(java.lang.Object, java.util.Locale)