Package: groovy.swing.binding

## [Groovy] Class JListElementsBinding

- groovy.swing.binding.JListElementsBinding

- All Implemented Interfaces and Traits:
    ListDataListener, PropertyChangeListener

      class JListElementsBinding
      extends AbstractSyntheticBinding
      implements ListDataListener, PropertyChangeListener

  Tracks changes to the bound list model and propagates updates for the synthetic `elements` property.

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class AbstractFullBinding` | `converter, reverseConverter, sourceBinding, targetBinding, validator`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `JList` | `boundList` List currently supplying element events for this binding.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `JListElementsBinding(PropertyBinding propertyBinding, TargetBinding target)` Creates a binding for the synthetic `elements` property.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `void` | `contentsChanged(ListDataEvent e)` Updates the target when existing model items change.
    `` | `void` | `intervalAdded(ListDataEvent e)` Updates the target when items are inserted into the model.
    `` | `void` | `intervalRemoved(ListDataEvent e)` Updates the target when items are removed from the model.
    `` | `void` | `propertyChange(PropertyChangeEvent event)` Rebinds listeners when the list model instance changes.
    `` | `protected void` | `syntheticBind()` Starts listening to the list model and model replacement events.
    `` | `protected void` | `syntheticUnbind()` Stops listening to the list model and model replacement events.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractSyntheticBinding` | `bind, rebind, setSourceBinding, setTargetBinding, syntheticBind, syntheticUnbind, unbind`
    `class AbstractFullBinding` | `getConverter, getReverseConverter, getSourceBinding, getTargetBinding, getValidator, reverseUpdate, setConverter, setReverseConverter, setSourceBinding, setTargetBinding, setValidator, update`

- - ### Property Detail

    - #### JList boundList

      List currently supplying element events for this binding.

  - ### Constructor Detail

    - #### JListElementsBinding(PropertyBinding propertyBinding, TargetBinding target)

      Creates a binding for the synthetic `elements` property.

      Parameters:
        `propertyBinding` - the source property binding
        `target` - the target binding to update

  - ### Method Detail

    - #### void contentsChanged(ListDataEvent e)

      Updates the target when existing model items change.

      Parameters:
        `e` - the list data event

    - #### void intervalAdded(ListDataEvent e)

      Updates the target when items are inserted into the model.

      Parameters:
        `e` - the list data event

    - #### void intervalRemoved(ListDataEvent e)

      Updates the target when items are removed from the model.

      Parameters:
        `e` - the list data event

    - #### void propertyChange(PropertyChangeEvent event)

      Rebinds listeners when the list model instance changes.

      Parameters:
        `event` - the model property change event

    - #### protected void syntheticBind()

      Starts listening to the list model and model replacement events.

    - #### protected void syntheticUnbind()

      Stops listening to the list model and model replacement events.