Package: groovy.swing.factory

## [Groovy] Class BindFactory

- groovy.swing.factory.BindFactory

-     class BindFactory
      extends AbstractFactory

  Since:
    Groovy 1.1

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `CONTEXT_DATA_KEY` | Builder context key used to store deferred binding data.

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `Map<String, TriggerBinding>` | `syntheticBindings`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `BindFactory()` Creates a new factory for creating binding nodes and contextual binding definitions

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Object` | `bindingAttributeDelegate(FactoryBuilderSupport builder, Object node, Object attributes)` Resolves deferred binding attributes against the current node.
    `` | `TriggerBinding` | `getTriggerBinding(PropertyBinding psb)` Resolves a synthetic trigger binding for the supplied property binding when one is available.
    `` | `boolean` | `isHandlesNodeChildren()` Indicates whether this factory processes child closures itself.
    `` | `boolean` | `isLeaf()` Indicates whether nodes created by this factory accept children.
    `` | `Object` | `newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)` Accepted Properties...
    `` | `boolean` | `onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map attributes)` Handles custom node attributes before default bean processing.
    `` | `boolean` | `onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)` Consumes the child closure for this node.
    `` | `void` | `onNodeCompleted(FactoryBuilderSupport builder, Object parent, Object node)` Finalizes a node after its children have been processed.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractFactory` | `isHandlesNodeChildren, isLeaf, onFactoryRegistration, onHandleNodeAttributes, onNodeChildren, onNodeCompleted, setChild, setParent`

- - ### Field Detail

    - #### public static final String CONTEXT_DATA_KEY

      Builder context key used to store deferred binding data.

  - ### Property Detail

    - #### final Map<String, TriggerBinding> syntheticBindings

  - ### Constructor Detail

    - #### BindFactory()

      Creates a new factory for creating binding nodes and contextual binding definitions

  - ### Method Detail

    - #### Object bindingAttributeDelegate(FactoryBuilderSupport builder, Object node, Object attributes)

      Resolves deferred binding attributes against the current node.

      Parameters:
        `builder` - the factory builder
        `node` - the current node
        `attributes` - the node attributes
      Returns:
        the delegate result, when one is produced

    - #### TriggerBinding getTriggerBinding(PropertyBinding psb)

      Resolves a synthetic trigger binding for the supplied property binding when one is available.

      Parameters:
        `psb` - the property binding to inspect
      Returns:
        the trigger binding to use

    - #### boolean isHandlesNodeChildren()

      Indicates whether this factory processes child closures itself.

      Returns:
        true if child closures are handled here

    - #### boolean isLeaf()

      Indicates whether nodes created by this factory accept children.

      Returns:
        true if child nodes are not expected

    - #### Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attributes)

      Accepted Properties... group? source ((sourceProperty) | (sourceEvent sourceValue)) (target targetProperty)? (? use default javabeans property if targetProperty is not present?)

      throws:
        InstantiationException
      throws:
        IllegalAccessException
      Parameters:
        builder
        name
        value
        attributes
      Returns:
        the newly created instance

    - #### boolean onHandleNodeAttributes(FactoryBuilderSupport builder, Object node, Map attributes)

      Handles custom node attributes before default bean processing.

      Parameters:
        `builder` - the factory builder
        `node` - the current node
        `attributes` - the node attributes
      Returns:
        true if default attribute handling should continue

    - #### boolean onNodeChildren(FactoryBuilderSupport builder, Object node, Closure childContent)

      Consumes the child closure for this node.

      Parameters:
        `builder` - the factory builder
        `node` - the current node
        `childContent` - the childContent
      Returns:
        false once the child closure has been handled

    - #### void onNodeCompleted(FactoryBuilderSupport builder, Object parent, Object node)

      Finalizes a node after its children have been processed.

      Parameters:
        `builder` - the factory builder
        `parent` - the parent node
        `node` - the current node