de.caff.util.ui

## Class UIResourceCollection

- java.lang.Object
- - de.caff.util.ui.UIResourceCollection

-     public class UIResourceCollection
      extends java.lang.Object

  Author:
    Rammi

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UIResourceCollection()` Default constructor.
    `UIResourceCollection(javax.swing.UIDefaults defaults)` Constructor.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `hasHandler(java.lang.String id)` Is there a handler for a given id?
    `static void` | `main(java.lang.String[] args)` Test code.
    `(package private) boolean` | `setUIValue(java.lang.String id, java.lang.Object value)` Set the value in the UI defaults.
    `boolean` | `setValue(java.lang.String id, java.lang.String value)` Set a value in the wrapped UI defaults.
    `int` | `setValues(java.lang.String glob, java.lang.String value)` Set some values in the wrapped UI defaults.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UIResourceCollection

          public UIResourceCollection()

      Default constructor. This uses the UI defaults from the UI manager.

    - #### UIResourceCollection

          public UIResourceCollection(javax.swing.UIDefaults defaults)

      Constructor.
      Parameters:
        `defaults` - UI defaults

  - ### Method Detail

    - #### setValue

          public boolean setValue(java.lang.String id,
                                  java.lang.String value)

      Set a value in the wrapped UI defaults.
      Parameters:
        `id` - the id of the value
        `value` - the value in textual form
      Returns:
        `true` if the value was set,
        `false` if the value was not set because there was no handler or the textual value was not convertable

    - #### setValues

          public int setValues(java.lang.String glob,
                               java.lang.String value)

      Set some values in the wrapped UI defaults.
      Parameters:
        `glob` - glob mask with `*` (any number of chars), `?` (one char), or `[ABX-Z]` (a char out of a set)
        `value` - value to set with matching keys
      Returns:
        number of keys where setting succeded
      See Also:
        `GlobMatcher`

    - #### hasHandler

          public boolean hasHandler(java.lang.String id)

      Is there a handler for a given id?
      Parameters:
        `id` - the resource id
      Returns:
        the answer

    - #### setUIValue

          boolean setUIValue(java.lang.String id,
                             java.lang.Object value)

      Set the value in the UI defaults. This is called by resource handlers which know only about IDs, but for some dark reason keys in the UIDefaults can be arbitrary objects.
      Parameters:
        `id` - the stringized key
        `value` - the value to set
      Returns:
        `true` if the id could be resolved into a key,
        `false` otherwise

    - #### main

          public static void main(java.lang.String[] args)

      Test code.
      Parameters:
        `args` - ignored