SwingBuilder (groovy 2.4.9 API)
Date: 2017-02-24

Package: groovy.swing

## [Groovy] Class SwingBuilder

- groovy.swing.SwingBuilder

- A helper class for creating Swing widgets using GroovyMarkup

  Authors:
    James Strachan

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `DEFAULT_DELEGATE_PROPERTY_OBJECT_ID` |
    `static String` | `DELEGATE_PROPERTY_OBJECT_ID` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class FactoryBuilderSupport` | `CURRENT_FACTORY, PARENT_FACTORY, PARENT_NODE, CURRENT_NODE, PARENT_CONTEXT, PARENT_NAME, CURRENT_NAME, OWNER, PARENT_BUILDER, CURRENT_BUILDER, CHILD_BUILDER, SCRIPT_CLASS_NAME`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SwingBuilder (boolean init = true)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `static SwingBuilder` | `$static_methodMissing(String method, Object args)` Old factory method static SwingBuilder.build(Closure).
    `` | `Object` | `build(Closure c)` Compatibility API.
    `` | `static def` | `clientPropertyAttributeDelegate(def builder, def node, def attributes)`
    `` | `void` | `createKeyStrokeAction(Map attributes, JComponent component = null )`
    `` | `SwingBuilder` | `doLater(Closure c)` Utility method to run a closure in EDT, using `SwingUtilities.invokeLater`.
    `` | `SwingBuilder` | `doOutside(Closure c)` Utility method to run a closure outside of the EDT.
    `` | `SwingBuilder` | `edt(Closure c)` Utility method to run a closure in EDT, using `SwingUtilities.invokeAndWait`.
    `` | `static SwingBuilder` | `edtBuilder(Closure c)` Factory method to create a SwingBuilder, and run the the closure in it on the EDT
    `` | `static LookAndFeel` | `lookAndFeel(Object laf, Closure initCode)`
    `` | `static LookAndFeel` | `lookAndFeel(Map attributes = [:], Object laf = null, Closure initCode = null)`
    `` | `static LookAndFeel` | `lookAndFeel(Object... lafs)`
    `` | `static def` | `objectIDAttributeDelegate(def builder, def node, def attributes)`
    `` | `def` | `registerActionButtonWidgets()`
    `` | `def` | `registerBasicLayouts()`
    `` | `def` | `registerBasicWidgets()`
    `` | `void` | `registerBeanFactory(String nodeName, String groupName, Class klass)` Do some overrides for standard component handlers, else use super
    `` | `def` | `registerBinding()`
    `` | `def` | `registerBorders()`
    `` | `def` | `registerBoxLayout()`
    `` | `def` | `registerContainers()`
    `` | `def` | `registerDataModels()`
    `` | `def` | `registerEditors()`
    `` | `def` | `registerMDIWidgets()`
    `` | `def` | `registerMenuWidgets()`
    `` | `def` | `registerPassThruNodes()`
    `` | `def` | `registerRenderers()`
    `` | `def` | `registerSupportNodes()`
    `` | `def` | `registerTableComponents()`
    `` | `def` | `registerTableLayout()`
    `` | `def` | `registerTextWidgets()`
    `` | `def` | `registerThreading()`
    `` | `def` | `registerWindows()`
    `` | `KeyStroke` | `shortcut(def key, def modifier = 0)`
    `` | `KeyStroke` | `shortcut(String key, def modifier = 0)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class FactoryBuilderSupport` | `setProperty, getProperty, getName, getContext, build, build, build, invokeMethod, invokeMethod, getParentNode, dispose, getVariable, setVariable, getVariables, registerBeanFactory, registerBeanFactory, getPreInstantiateDelegates, getExplicitMethods, getRegistrationGroups, getRegistrationGroupItems, getContextAttribute, addAttributeDelegate, getLocalExplicitProperties, addDisposalClosure, autoRegisterNodes, getPostNodeCompletionDelegates, removePostInstantiateDelegate, getLocalFactories, removePreInstantiateDelegate, removePostNodeCompletionDelegate, getDisposalClosures, removeAttributeDelegate, getLocalExplicitMethods, getAttributeDelegates, checkValueIsTypeNotString, getPostInstantiateDelegates, getPropertyMissingDelegate, registerExplicitMethod, registerExplicitMethod, addPostInstantiateDelegate, getNameMappingClosure, setNameMappingClosure, getCurrentBuilder, addPostNodeCompletionDelegate, getCurrentFactory, setMethodMissingDelegate, addPreInstantiateDelegate, getExplicitProperties, setPropertyMissingDelegate, getMethodMissingDelegate, registerExplicitProperty, registerExplicitProperty, registerFactory, registerFactory, getCurrent, getParentName, checkValueIsNull, checkValueIsType, withBuilder, withBuilder, withBuilder, getParentContext, getFactories, getCurrentName, getParentFactory, getChildBuilder, hasVariable, setMetaClass, getMetaClass, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`
    `class Binding` | `setProperty, getProperty, getVariable, setVariable, getVariables, hasVariable, invokeMethod, setMetaClass, getMetaClass, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final String DEFAULT_DELEGATE_PROPERTY_OBJECT_ID

    - #### public static final String DELEGATE_PROPERTY_OBJECT_ID

  - ### Constructor Detail

    - #### SwingBuilder(boolean init = true)

  - ### Method Detail

    - #### @Deprecated static SwingBuilder $static_methodMissing(String method, Object args)

      Old factory method static SwingBuilder.build(Closure).

      Parameters:
        `c` - run this closure in the builder using the edt method

    - #### Object build(Closure c)

      Compatibility API.

      Parameters:
        `c` - run this closure in the builder

    - #### static def clientPropertyAttributeDelegate(def builder, def node, def attributes)

    - #### void createKeyStrokeAction(Map attributes, JComponent component = null )

    - #### SwingBuilder doLater(Closure c)

      Utility method to run a closure in EDT, using `SwingUtilities.invokeLater`.

      Parameters:
        `c` - this closure is run in the EDT

    - #### SwingBuilder doOutside(Closure c)

      Utility method to run a closure outside of the EDT.

      The closure is wrapped in a thread, and the thread is started immediately, only if the current thread is the EDT, otherwise the closure will be called immediately.

      Parameters:
        `c` - this closure is started outside of the EDT

    - #### SwingBuilder edt(Closure c)

      Utility method to run a closure in EDT, using `SwingUtilities.invokeAndWait`.

      Parameters:
        `c` - this closure is run in the EDT

    - #### static SwingBuilder edtBuilder(Closure c)

      Factory method to create a SwingBuilder, and run the the closure in it on the EDT

      Parameters:
        `c` - run this closure in the new builder using the edt method

    - #### static LookAndFeel lookAndFeel(Object laf, Closure initCode)

    - #### static LookAndFeel lookAndFeel(Map attributes = [:], Object laf = null, Closure initCode = null)

    - #### static LookAndFeel lookAndFeel(Object... lafs)

    - #### static def objectIDAttributeDelegate(def builder, def node, def attributes)

    - #### def registerActionButtonWidgets()

    - #### def registerBasicLayouts()

    - #### def registerBasicWidgets()

    - #### void registerBeanFactory(String nodeName, String groupName, Class klass)

      Do some overrides for standard component handlers, else use super

    - #### def registerBinding()

    - #### def registerBorders()

    - #### def registerBoxLayout()

    - #### def registerContainers()

    - #### def registerDataModels()

    - #### def registerEditors()

    - #### def registerMDIWidgets()

    - #### def registerMenuWidgets()

    - #### def registerPassThruNodes()

    - #### def registerRenderers()

    - #### def registerSupportNodes()

    - #### def registerTableComponents()

    - #### def registerTableLayout()

    - #### def registerTextWidgets()

    - #### def registerThreading()

    - #### def registerWindows()

    - #### KeyStroke shortcut(def key, def modifier = 0)

    - #### KeyStroke shortcut(String key, def modifier = 0)