Package: org.apache.groovy.swing.binding

## [Java] Class MutualPropertyBinding

- org.apache.groovy.swing.binding.MutualPropertyBinding

- All Implemented Interfaces and Traits:
    FullBinding

      public class MutualPropertyBinding
      extends Object
      implements FullBinding

  Maintains two synchronized PropertyBinding instances that update each other.

  Since:
    Groovy 1.6

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `bind()` Binds both forward and reverse bindings when the pair is fully configured.
    `` | `public Closure` | `getConverter()` Returns the converter applied from source to target.
    `` | `public Closure` | `getReverseConverter()` Returns the converter applied from target to source.
    `` | `public SourceBinding` | `getSourceBinding()` Returns the forward source-side property binding.
    `` | `public TargetBinding` | `getTargetBinding()` Returns the forward target-side property binding.
    `` | `public Closure` | `getValidator()` Returns the validator applied to forward updates.
    `` | `public void` | `rebind()` Rebinds both forward and reverse bindings when currently active.
    `` | `protected void` | `rebuildBindings()` Rebuilds the internal forward and reverse bindings to match the current configuration.
    `` | `public void` | `reverseUpdate()` Pushes an update from the target side back to the source side.
    `` | `public void` | `setConverter(Closure converter)` Replaces the converter applied from source to target.
    `` | `public void` | `setReverseConverter(Closure reverseConverter)` Replaces the converter applied from target to source.
    `` | `public void` | `setSourceBinding(SourceBinding sourceBinding)` Replaces the source-side property binding and rebuilds the paired bindings.
    `` | `public void` | `setTargetBinding(TargetBinding targetBinding)` Replaces the target-side property binding and rebuilds the paired bindings.
    `` | `public void` | `setValidator(Closure validator)` Replaces the validator applied to forward updates.
    `` | `public void` | `unbind()` Unbinds both forward and reverse bindings.
    `` | `public void` | `update()` Pushes an update from the source side to the target side.

  - ### Inherited Methods Summary

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

- - ### Method Detail

    - #### public void bind()

      Binds both forward and reverse bindings when the pair is fully configured.

    - #### public Closure getConverter()

      Returns the converter applied from source to target.

      Returns:
        the forward converter, or `null`

    - #### public Closure getReverseConverter()

      Returns the converter applied from target to source.

      Returns:
        the reverse converter, or `null`

    - #### public SourceBinding getSourceBinding()

      Returns the forward source-side property binding.

      Returns:
        the source binding

    - #### public TargetBinding getTargetBinding()

      Returns the forward target-side property binding.

      Returns:
        the target binding

    - #### public Closure getValidator()

      Returns the validator applied to forward updates.

      Returns:
        the validator closure, or `null`

    - #### public void rebind()

      Rebinds both forward and reverse bindings when currently active.

    - #### protected void rebuildBindings()

      Rebuilds the internal forward and reverse bindings to match the current configuration.

    - #### public void reverseUpdate()

      Pushes an update from the target side back to the source side.

    - #### public void setConverter(Closure converter)

      Replaces the converter applied from source to target.

      Parameters:
        `converter` - the forward converter, or `null`

    - #### public void setReverseConverter(Closure reverseConverter)

      Replaces the converter applied from target to source.

      Parameters:
        `reverseConverter` - the reverse converter, or `null`

    - #### public void setSourceBinding(SourceBinding sourceBinding)

      Replaces the source-side property binding and rebuilds the paired bindings.

      Parameters:
        `sourceBinding` - the new source binding

    - #### public void setTargetBinding(TargetBinding targetBinding)

      Replaces the target-side property binding and rebuilds the paired bindings.

      Parameters:
        `targetBinding` - the new target binding

    - #### public void setValidator(Closure validator)

      Replaces the validator applied to forward updates.

      Parameters:
        `validator` - the validator closure, or `null`

    - #### public void unbind()

      Unbinds both forward and reverse bindings.

    - #### public void update()

      Pushes an update from the source side to the target side.