Package: org.apache.groovy.swing.binding

## [Java] Class PropertyBinding

- org.apache.groovy.swing.binding.PropertyBinding

- All Implemented Interfaces and Traits:
    SourceBinding, TargetBinding, TriggerBinding

      public class PropertyBinding
      extends Object
      implements SourceBinding, TargetBinding, TriggerBinding

  Binds directly to a bean property and can act as a source, target, or trigger binding.

  Since:
    Groovy 1.1

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `enum` | `PropertyBinding.UpdateStrategy` | Defines the thread on which target updates should run.

  - ### Constructor Summary

    Constructors
    Constructor and description
    `PropertyBinding(Object bean, String propertyName)` Creates a property binding with the default update strategy for the bean type.
    `PropertyBinding(Object bean, String propertyName, String updateStrategy)` Creates a property binding using a named update strategy.
    `PropertyBinding(Object bean, String propertyName, PropertyBinding.UpdateStrategy updateStrategy)` Creates a property binding using an explicit update strategy.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public FullBinding` | `createBinding(SourceBinding source, TargetBinding target)` Creates a property-change-aware full binding rooted at this property.
    `` | `public Object` | `getBean()` Returns the bean that owns the bound property.
    `` | `public String` | `getPropertyName()` Returns the name of the bound property.
    `` | `public Object` | `getSourceValue()` Reads the current value of the bound property from the bean.
    `` | `public PropertyBinding.UpdateStrategy` | `getUpdateStrategy()` Returns the threading strategy used when applying target updates.
    `` | `public boolean` | `isNonChangeCheck()` Returns whether value-equality checks should suppress redundant updates.
    `` | `public void` | `setBean(Object bean)` Replaces the bean that owns the bound property.
    `` | `public void` | `setNonChangeCheck(boolean nonChangeCheck)` Enables or disables suppression of redundant equal-value updates.
    `` | `public void` | `setPropertyName(String propertyName)` Replaces the name of the bound property.
    `` | `public void` | `updateTargetValue(Object newValue)` Applies a new value to the bound property using the configured update strategy.

  - ### Inherited Methods Summary

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

- - ### Constructor Detail

    - #### public PropertyBinding(Object bean, String propertyName)

      Creates a property binding with the default update strategy for the bean type.

      Parameters:
        `bean` - the bean that owns the property
        `propertyName` - the property name

    - #### public PropertyBinding(Object bean, String propertyName, String updateStrategy)

      Creates a property binding using a named update strategy.

      Parameters:
        `bean` - the bean that owns the property
        `propertyName` - the property name
        `updateStrategy` - the named update strategy, or `null`

    - #### public PropertyBinding(Object bean, String propertyName, PropertyBinding.UpdateStrategy updateStrategy)

      Creates a property binding using an explicit update strategy.

      Parameters:
        `bean` - the bean that owns the property
        `propertyName` - the property name
        `updateStrategy` - the update strategy, or `null` for the default

  - ### Method Detail

    - #### public FullBinding createBinding(SourceBinding source, TargetBinding target)

      Creates a property-change-aware full binding rooted at this property.

      Parameters:
        `source` - the source binding
        `target` - the target binding
      Returns:
        the created full binding

    - #### public Object getBean()

      Returns the bean that owns the bound property.

      Returns:
        the current bean

    - #### public String getPropertyName()

      Returns the name of the bound property.

      Returns:
        the property name

    - #### public Object getSourceValue()

      Reads the current value of the bound property from the bean.

      Returns:
        the current property value

    - #### public PropertyBinding.UpdateStrategy getUpdateStrategy()

      Returns the threading strategy used when applying target updates.

      Returns:
        the update strategy

    - #### public boolean isNonChangeCheck()

      Returns whether value-equality checks should suppress redundant updates.

      Returns:
        `true` when redundant updates should be suppressed

    - #### public void setBean(Object bean)

      Replaces the bean that owns the bound property.

      Parameters:
        `bean` - the new bean

    - #### public void setNonChangeCheck(boolean nonChangeCheck)

      Enables or disables suppression of redundant equal-value updates.

      Parameters:
        `nonChangeCheck` - `true` to suppress redundant equal-value updates

    - #### public void setPropertyName(String propertyName)

      Replaces the name of the bound property.

      Parameters:
        `propertyName` - the new property name

    - #### public void updateTargetValue(Object newValue)

      Applies a new value to the bound property using the configured update strategy.

      Parameters:
        `newValue` - the new property value