Package: groovy.swing

## [Groovy] Class LookAndFeelHelper

- groovy.swing.LookAndFeelHelper

-     class LookAndFeelHelper
      extends Object

  Helper for resolving and configuring Swing look and feels.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static LookAndFeelHelper` | `instance` | Shared helper instance used by getInstance().

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `String` | `addLookAndFeelAlias(String alias, String className)` Registers an alias for a look and feel implementation class.
    `` | `String` | `addLookAndFeelAttributeHandler(String className, String attr, Closure handler)` Registers a handler for a custom look and feel attribute.
    `` | `static String` | `getAquaLAFName()` Finds the first available Aqua look and feel implementation.
    `` | `static LookAndFeelHelper` | `getInstance()` Returns the shared helper instance.
    `` | `static String` | `getNimbusLAFName()` Finds the first available Nimbus look and feel implementation.
    `` | `static String` | `getSubstanceLAFName()` Finds the first available Substance look and feel implementation.
    `` | `boolean` | `isLeaf()` Indicates that look and feel helper nodes are always leaf nodes.
    `` | `LookAndFeel` | `lookAndFeel(Object value, Map attributes, Closure initClosure)` Creates or updates the current look and feel from the supplied value and attributes.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### protected static LookAndFeelHelper instance

      Shared helper instance used by getInstance().

  - ### Method Detail

    - #### String addLookAndFeelAlias(String alias, String className)

      Registers an alias for a look and feel implementation class.

      Parameters:
        `alias` - the alias name
        `className` - the look and feel class name
      Returns:
        the registered class name

    - #### String addLookAndFeelAttributeHandler(String className, String attr, Closure handler)

      Registers a handler for a custom look and feel attribute.

      Parameters:
        `className` - the look and feel class name
        `attr` - the attribute name
        `handler` - the handler closure
      Returns:
        the registered handler

    - #### static String getAquaLAFName()

      Finds the first available Aqua look and feel implementation.

      Returns:
        the first available class name, or `null` if none are available

    - #### static LookAndFeelHelper getInstance()

      Returns the shared helper instance.

      Returns:
        the shared helper instance

    - #### static String getNimbusLAFName()

      Finds the first available Nimbus look and feel implementation.

      Returns:
        the first available class name, or `null` if none are available

    - #### static String getSubstanceLAFName()

      Finds the first available Substance look and feel implementation.

      Returns:
        the first available class name, or `null` if none are available

    - #### boolean isLeaf()

      Indicates that look and feel helper nodes are always leaf nodes.

      Returns:
        `true`

    - #### LookAndFeel lookAndFeel(Object value, Map attributes, Closure initClosure)

      Creates or updates the current look and feel from the supplied value and attributes.

      Parameters:
        `value` - the requested look and feel instance, alias, or class name
        `attributes` - additional look and feel configuration attributes
        `initClosure` - optional initialization callback invoked with the resolved look and feel
      Returns:
        the configured look and feel