Package: groovy.swing

## [Groovy] Class SwingBuilder

- groovy.swing.SwingBuilder

-     class SwingBuilder
      extends FactoryBuilderSupport

  A helper class for creating Swing widgets using GroovyMarkup

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

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `static String` | `DEFAULT_DELEGATE_PROPERTY_OBJECT_ID`
    `static String` | `DELEGATE_PROPERTY_OBJECT_ID`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `SwingBuilder(boolean init)`

  - ### 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 Object` | `clientPropertyAttributeDelegate(Object builder, Object node, Object attributes)`
    `` | `void` | `createKeyStrokeAction(Map attributes, JComponent component)`
    `` | `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, Closure initCode)`
    `` | `static LookAndFeel` | `lookAndFeel(Object[] lafs)`
    `` | `static Object` | `objectIDAttributeDelegate(Object builder, Object node, Object attributes)`
    `` | `Object` | `registerActionButtonWidgets()`
    `` | `Object` | `registerBasicLayouts()`
    `` | `Object` | `registerBasicWidgets()`
    `` | `void` | `registerBeanFactory(String nodeName, String groupName, Class klass)` Do some overrides for standard component handlers, else use super
    `` | `Object` | `registerBinding()`
    `` | `Object` | `registerBorders()`
    `` | `Object` | `registerBoxLayout()`
    `` | `Object` | `registerContainers()`
    `` | `Object` | `registerDataModels()`
    `` | `Object` | `registerEditors()`
    `` | `Object` | `registerMDIWidgets()`
    `` | `Object` | `registerMenuWidgets()`
    `` | `Object` | `registerPassThruNodes()`
    `` | `Object` | `registerRenderers()`
    `` | `Object` | `registerSupportNodes()`
    `` | `Object` | `registerTableComponents()`
    `` | `Object` | `registerTableLayout()`
    `` | `Object` | `registerTextWidgets()`
    `` | `Object` | `registerThreading()`
    `` | `Object` | `registerWindows()`
    `` | `KeyStroke` | `shortcut(Object key, Object modifier)`
    `` | `KeyStroke` | `shortcut(String key, Object modifier)`

  - ### Inherited Methods Summary

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

- - ### Property Detail

    - #### static final String DEFAULT_DELEGATE_PROPERTY_OBJECT_ID

    - #### static final String DELEGATE_PROPERTY_OBJECT_ID

  - ### Constructor Detail

    - #### SwingBuilder(boolean init)

  - ### 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(@DelegatesTo(value: SwingBuilder)
      Closure c)

      Compatibility API.

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

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

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

    - #### SwingBuilder doLater(@DelegatesTo(value: SwingBuilder)
      Closure c)

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

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

    - #### SwingBuilder doOutside(@DelegatesTo(value: SwingBuilder)
      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(@DelegatesTo(value: SwingBuilder)
      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(@DelegatesTo(value: SwingBuilder)
      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, Closure initCode)

    - #### static LookAndFeel lookAndFeel(Object[] lafs)

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

    - #### Object registerActionButtonWidgets()

    - #### Object registerBasicLayouts()

    - #### Object registerBasicWidgets()

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

      Do some overrides for standard component handlers, else use super

    - #### Object registerBinding()

    - #### Object registerBorders()

    - #### Object registerBoxLayout()

    - #### Object registerContainers()

    - #### Object registerDataModels()

    - #### Object registerEditors()

    - #### Object registerMDIWidgets()

    - #### Object registerMenuWidgets()

    - #### Object registerPassThruNodes()

    - #### Object registerRenderers()

    - #### Object registerSupportNodes()

    - #### Object registerTableComponents()

    - #### Object registerTableLayout()

    - #### Object registerTextWidgets()

    - #### Object registerThreading()

    - #### Object registerWindows()

    - #### KeyStroke shortcut(Object key, Object modifier)

    - #### KeyStroke shortcut(String key, Object modifier)