Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.6
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.swing
[Groovy] Class SwingBuilder

    java.lang.Object
      groovy.lang.GroovyObjectSupport
          groovy.lang.Binding
              groovy.util.FactoryBuilderSupport
                  groovy.swing.SwingBuilder

    class SwingBuilder
    extends FactoryBuilderSupport

A helper class for creating Swing widgets using GroovyMarkup

Authors:
  James Strachan

Version:
  \$Revision: 20969 \$

Field Summary
`static String` | `DEFAULT_DELEGATE_PROPERTY_OBJECT_ID`
`static String` | `DELEGATE_PROPERTY_OBJECT_ID`

Fields inherited from class FactoryBuilderSupport
CHILD_BUILDER, CURRENT_BUILDER, CURRENT_FACTORY, CURRENT_NAME, CURRENT_NODE, OWNER, PARENT_BUILDER, PARENT_CONTEXT, PARENT_FACTORY, PARENT_NAME, PARENT_NODE, attributeDelegates, autoRegistrationComplete, autoRegistrationRunning, explicitMethods, explicitProperties, postInstantiateDelegates, postNodeCompletionDelegates, preInstantiateDelegates, registrationGroup, registrationGroupName

Constructor Summary
`SwingBuilder(boolean init = true)`

Method Summary
`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)` Utilitiy 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)`

Methods inherited from class FactoryBuilderSupport
addAttributeDelegate, addDisposalClosure, addPostInstantiateDelegate, addPostNodeCompletionDelegate, addPreInstantiateDelegate, autoRegisterNodes, build, build, build, checkExplicitMethod, checkValueIsNull, checkValueIsType, checkValueIsTypeNotString, createNode, dispathNodeCall, dispose, getAttributeDelegates, getChildBuilder, getContext, getContextAttribute, getContexts, getContinuationData, getCurrent, getCurrentBuilder, getCurrentFactory, getCurrentName, getExplicitMethods, getExplicitProperties, getFactories, getLocalExplicitMethods, getLocalExplicitProperties, getLocalFactories, getName, getNameMappingClosure, getParentContext, getParentFactory, getParentName, getParentNode, getPostInstantiateDelegates, getPostNodeCompletionDelegates, getPreInstantiateDelegates, getProperty, getProxyBuilder, getRegistrationGroupItems, getRegistrationGroups, getVariable, getVariables, handleNodeAttributes, invokeMethod, invokeMethod, newContext, nodeCompleted, popContext, postInstantiate, postNodeCompletion, preInstantiate, registerBeanFactory, registerBeanFactory, registerExplicitMethod, registerExplicitMethod, registerExplicitProperty, registerExplicitProperty, registerFactory, registerFactory, removeAttributeDelegate, removePostInstantiateDelegate, removePostNodeCompletionDelegate, removePreInstantiateDelegate, reset, resolveExplicitMethod, resolveExplicitProperty, resolveFactory, restoreFromContinuationData, setClosureDelegate, setNameMappingClosure, setNodeAttributes, setParent, setProperty, setProxyBuilder, setVariable, withBuilder, withBuilder, withBuilder

Methods inherited from class Binding
getProperty, getVariable, getVariables, setProperty, setVariable

Methods inherited from class GroovyObjectSupport
getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### DEFAULT_DELEGATE_PROPERTY_OBJECT_ID

    public static final String DEFAULT_DELEGATE_PROPERTY_OBJECT_ID

### DELEGATE_PROPERTY_OBJECT_ID

    public static final String DELEGATE_PROPERTY_OBJECT_ID

Constructor Detail

### SwingBuilder

    SwingBuilder(boolean init = true)

Method Detail

### $static_methodMissing

    @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

### build

    Object build(Closure c)

  Compatibility API.
  Parameters:
    `c` - run this closure in the builder

### clientPropertyAttributeDelegate

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

### createKeyStrokeAction

    void createKeyStrokeAction(Map attributes, JComponent component = null )

### doLater

    SwingBuilder doLater(Closure c)

  Utility method to run a closure in EDT, using `SwingUtilities.invokeLater.
  Parameters:
    `c` - this closure is run in the EDT
  `

### doOutside

    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 immediatly, only if the current thread is the EDT, otherwise the closure will be called immediatly.

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

### edt

    SwingBuilder edt(Closure c)

  Utilitiy method to run a closure in EDT, using `SwingUtilities.invokeAndWait.
  Parameters:
    `c` - this closure is run in the EDT
  `

### edtBuilder

    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

### lookAndFeel

    static LookAndFeel lookAndFeel(Object laf, Closure initCode)

### lookAndFeel

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

### lookAndFeel

    static LookAndFeel lookAndFeel(Object lafs)

### objectIDAttributeDelegate

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

### registerActionButtonWidgets

    def registerActionButtonWidgets()

### registerBasicLayouts

    def registerBasicLayouts()

### registerBasicWidgets

    def registerBasicWidgets()

### registerBeanFactory

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

  Do some overrides for standard component handlers, else use super

### registerBinding

    def registerBinding()

### registerBorders

    def registerBorders()

### registerBoxLayout

    def registerBoxLayout()

### registerContainers

    def registerContainers()

### registerDataModels

    def registerDataModels()

### registerEditors

    def registerEditors()

### registerMDIWidgets

    def registerMDIWidgets()

### registerMenuWidgets

    def registerMenuWidgets()

### registerPassThruNodes

    def registerPassThruNodes()

### registerRenderers

    def registerRenderers()

### registerSupportNodes

    def registerSupportNodes()

### registerTableComponents

    def registerTableComponents()

### registerTableLayout

    def registerTableLayout()

### registerTextWidgets

    def registerTextWidgets()

### registerThreading

    def registerThreading()

### registerWindows

    def registerWindows()

### shortcut

    KeyStroke shortcut(def key, def modifier = 0)

### shortcut

    KeyStroke shortcut(String key, def modifier = 0)

Copyright © 2003-2010 The Codehaus. All rights reserved.