Package Summary Overview Summary

### class:UIDefaults [NONE]
- All Implemented Interfaces: Serializable, Cloneable, Map<Object,Object>
      public class UIDefaults
      extends Hashtable<Object,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 JavaBeans™ has been added to the `java.beans` package. Please see `XMLEncoder`. Since: 1.2 See Also: `UIManager`

### constructor:UIDefaults() [NONE]
- #### UIDefaults
      public UIDefaults()
Creates an empty defaults table.

### constructor:UIDefaults(int, float) [NONE]
- #### UIDefaults
      public UIDefaults(int initialCapacity,
                        float loadFactor)
Creates an empty defaults table with the specified initial capacity and load factor. Parameters: `initialCapacity` - the initial capacity of the defaults table `loadFactor` - the load factor of the defaults table Since: 1.6 See Also: `Hashtable`

### constructor:UIDefaults(java.lang.Object[]) [NONE]
- #### UIDefaults
      public UIDefaults(Object[] keyValueList)
  Creates 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:get(java.lang.Object) [NONE]
- #### get
      public Object get(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` in interface `Map<Object,Object>` Overrides: `get` in class `Hashtable<Object,Object>` Parameters: `key` - the desired key Returns: the value for `key` Since: 1.4 See Also: `UIDefaults.LazyValue`, `UIDefaults.ActiveValue`, `Hashtable.get(java.lang.Object)`, `getDefaultLocale()`, `addResourceBundle(java.lang.String)`

### method:get(java.lang.Object, java.util.Locale) [NONE]
- #### get
      public Object get(Object key,
                        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`, `UIDefaults.ActiveValue`, `Hashtable.get(java.lang.Object)`, `addResourceBundle(java.lang.String)`

### method:put(java.lang.Object, java.lang.Object) [NONE]
- #### put
      public Object put(Object key,
                        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` in interface `Map<Object,Object>` Overrides: `put` in class `Hashtable<Object,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[])`, `Hashtable.put(K, V)`

### method:putDefaults(java.lang.Object[]) [NONE]
- #### putDefaults
      public void putDefaults(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)` , `Hashtable.put(K, V)`

### method:getFont(java.lang.Object) [NONE]
- #### getFont
      public Font getFont(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`

### method:getFont(java.lang.Object, java.util.Locale) [NONE]
- #### getFont
      public Font getFont(Object key,
                          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

### method:getColor(java.lang.Object) [NONE]
- #### getColor
      public Color getColor(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`

### method:getColor(java.lang.Object, java.util.Locale) [NONE]
- #### getColor
      public Color getColor(Object key,
                            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

### method:getIcon(java.lang.Object) [NONE]
- #### getIcon
      public Icon getIcon(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`

### method:getIcon(java.lang.Object, java.util.Locale) [NONE]
- #### getIcon
      public Icon getIcon(Object key,
                          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

### method:getBorder(java.lang.Object) [NONE]
- #### getBorder
      public Border getBorder(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`

### method:getBorder(java.lang.Object, java.util.Locale) [NONE]
- #### getBorder
      public Border getBorder(Object key,
                              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

### method:getString(java.lang.Object) [NONE]
- #### getString
      public String getString(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`

### method:getString(java.lang.Object, java.util.Locale) [NONE]
- #### getString
      public String getString(Object key,
                              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

### method:getInt(java.lang.Object) [NONE]
- #### getInt
      public int getInt(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

### method:getInt(java.lang.Object, java.util.Locale) [NONE]
- #### getInt
      public int getInt(Object key,
                        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

### method:getBoolean(java.lang.Object) [NONE]
- #### getBoolean
      public boolean getBoolean(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

### method:getBoolean(java.lang.Object, java.util.Locale) [NONE]
- #### getBoolean
      public boolean getBoolean(Object key,
                                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

### method:getInsets(java.lang.Object) [NONE]
- #### getInsets
      public Insets getInsets(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`

### method:getInsets(java.lang.Object, java.util.Locale) [NONE]
- #### getInsets
      public Insets getInsets(Object key,
                              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

### method:getDimension(java.lang.Object) [NONE]
- #### getDimension
      public Dimension getDimension(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`

### method:getDimension(java.lang.Object, java.util.Locale) [NONE]
- #### getDimension
      public Dimension getDimension(Object key,
                                    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

### method:getUIClass(java.lang.String, java.lang.ClassLoader) [NONE]
- #### getUIClass
      public Class<? extends ComponentUI> getUIClass(String uiClassID,
                                                     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)`

### method:getUIClass(java.lang.String) [NONE]
- #### getUIClass
      public Class<? extends ComponentUI> getUIClass(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)`

### method:getUIError(java.lang.String) [NONE]
- #### getUIError
      protected void getUIError(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)`

### method:getUI(javax.swing.JComponent) [NONE]
- #### getUI
      public ComponentUI getUI(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: Look up the name of the `ComponentUI` implementation class under the value returned by `target.getUIClassID()`. Use the implementation classes static `createUI()` method to construct a look and feel delegate. Parameters: `target` - the `JComponent` which needs a UI Returns: the `ComponentUI` object

### method:addPropertyChangeListener(java.beans.PropertyChangeListener) [NONE]
- #### addPropertyChangeListener
      public void addPropertyChangeListener(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`

### method:removePropertyChangeListener(java.beans.PropertyChangeListener) [NONE]
- #### removePropertyChangeListener
      public void removePropertyChangeListener(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`

### method:getPropertyChangeListeners() [NONE]
- #### getPropertyChangeListeners
      public PropertyChangeListener[] getPropertyChangeListeners()
Returns an array of all the `PropertyChangeListener`s added to this UIDefaults with addPropertyChangeListener(). Returns: all of the `PropertyChangeListener`s added or an empty array if no listeners have been added Since: 1.4

### method:firePropertyChange(java.lang.String, java.lang.Object, java.lang.Object) [NONE]
- #### firePropertyChange
      protected void firePropertyChange(String propertyName,
                                        Object oldValue,
                                        Object newValue)
Support for reporting bound property changes. If oldValue and newValue are not equal and the `PropertyChangeEvent`x 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`

### method:addResourceBundle(java.lang.String) [NONE]
- #### addResourceBundle
      public void addResourceBundle(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`, `removeResourceBundle(java.lang.String)`

### method:removeResourceBundle(java.lang.String) [NONE]
- #### removeResourceBundle
      public void removeResourceBundle(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`, `addResourceBundle(java.lang.String)`

### method:setDefaultLocale(java.util.Locale) [NONE]
- #### setDefaultLocale
      public void setDefaultLocale(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()`, `get(Object)`, `get(Object,Locale)`

### method:getDefaultLocale() [NONE]
- #### getDefaultLocale
      public 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)`, `get(Object)`, `get(Object,Locale)`