Package org.apache.groovy.swing.binding

# Class AbstractFullBinding

java.lang.Object
org.apache.groovy.swing.binding.AbstractFullBinding

All Implemented Interfaces:
  `BindingUpdatable`, `FullBinding`

Direct Known Subclasses:
  `AbstractSyntheticBinding`, `PropertyPathFullBinding`

public abstract class AbstractFullBinding extends Object implements FullBinding
Base implementation for `FullBinding` that handles validation and value conversion.

Since:
  Groovy 1.1

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected Closure`
  `converter`
  Optional converter applied before writing to the target.
  `protected Closure`
  `reverseConverter`
  Optional converter applied before writing back to the source.
  `protected SourceBinding`
  `sourceBinding`
  The source side of the binding.
  `protected TargetBinding`
  `targetBinding`
  The target side of the binding.
  `protected Closure`
  `validator`
  Optional validator invoked before forward propagation.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractFullBinding()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Closure`
  `getConverter()`
  Returns the forward converter.
  `Closure`
  `getReverseConverter()`
  Returns the reverse converter.
  `SourceBinding`
  `getSourceBinding()`
  Returns the current source binding.
  `TargetBinding`
  `getTargetBinding()`
  Returns the current target binding.
  `Closure`
  `getValidator()`
  Returns the validator invoked before forward propagation.
  `void`
  `reverseUpdate()`
  Propagates the current target value back to the source.
  `void`
  `setConverter(Closure converter)`
  Sets the forward converter.
  `void`
  `setReverseConverter(Closure reverseConverter)`
  Sets the reverse converter.
  `void`
  `setSourceBinding(SourceBinding sourceBinding)`
  Replaces the current source binding.
  `void`
  `setTargetBinding(TargetBinding targetBinding)`
  Replaces the current target binding.
  `void`
  `setValidator(Closure validator)`
  Sets the validator invoked before forward propagation.
  `void`
  `update()`
  Propagates the current source value to the target.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.groovy.swing.binding.BindingUpdatable

  `bind, rebind, unbind`

- ## Field Details

  - ### sourceBinding

    protected SourceBinding sourceBinding
    The source side of the binding.

  - ### targetBinding

    protected TargetBinding targetBinding
    The target side of the binding.

  - ### validator

    protected Closure validator
    Optional validator invoked before forward propagation.

  - ### converter

    protected Closure converter
    Optional converter applied before writing to the target.

  - ### reverseConverter

    protected Closure reverseConverter
    Optional converter applied before writing back to the source.

- ## Constructor Details

  - ### AbstractFullBinding

    public AbstractFullBinding()

- ## Method Details

  - ### update

    public void update()
    Propagates the current source value to the target.
    Specified by:
      `update` in interface `BindingUpdatable`

  - ### reverseUpdate

    public void reverseUpdate()
    Propagates the current target value back to the source.
    Specified by:
      `reverseUpdate` in interface `BindingUpdatable`

  - ### getSourceBinding

    public SourceBinding getSourceBinding()
    Returns the current source binding.
    Specified by:
      `getSourceBinding` in interface `FullBinding`
    Returns:
      the source binding

  - ### setSourceBinding

    public void setSourceBinding(SourceBinding sourceBinding)
    Replaces the current source binding.
    Specified by:
      `setSourceBinding` in interface `FullBinding`
    Parameters:
      `sourceBinding` - the new source binding

  - ### getTargetBinding

    public TargetBinding getTargetBinding()
    Returns the current target binding.
    Specified by:
      `getTargetBinding` in interface `FullBinding`
    Returns:
      the target binding

  - ### setTargetBinding

    public void setTargetBinding(TargetBinding targetBinding)
    Replaces the current target binding.
    Specified by:
      `setTargetBinding` in interface `FullBinding`
    Parameters:
      `targetBinding` - the new target binding

  - ### getValidator

    public Closure getValidator()
    Returns the validator invoked before forward propagation.
    Specified by:
      `getValidator` in interface `FullBinding`
    Returns:
      the validator closure, or `null`

  - ### setValidator

    public void setValidator(Closure validator)
    Sets the validator invoked before forward propagation.
    Specified by:
      `setValidator` in interface `FullBinding`
    Parameters:
      `validator` - the validator closure, or `null`

  - ### getConverter

    public Closure getConverter()
    Returns the forward converter.
    Specified by:
      `getConverter` in interface `FullBinding`
    Returns:
      the converter closure, or `null`

  - ### setConverter

    public void setConverter(Closure converter)
    Sets the forward converter.
    Specified by:
      `setConverter` in interface `FullBinding`
    Parameters:
      `converter` - the converter closure, or `null`

  - ### getReverseConverter

    public Closure getReverseConverter()
    Returns the reverse converter.
    Specified by:
      `getReverseConverter` in interface `FullBinding`
    Returns:
      the reverse converter, or `null`

  - ### setReverseConverter

    public void setReverseConverter(Closure reverseConverter)
    Sets the reverse converter.
    Specified by:
      `setReverseConverter` in interface `FullBinding`
    Parameters:
      `reverseConverter` - the reverse converter, or `null`