Class AbstractSyntheticBinding

java.lang.Object
org.apache.groovy.swing.binding.AbstractFullBinding
groovy.swing.binding.AbstractSyntheticBinding
All Implemented Interfaces:
BindingUpdatable, FullBinding

public abstract class AbstractSyntheticBinding extends AbstractFullBinding
Base class for bindings that observe synthetic Swing properties.
  • Constructor Details

    • AbstractSyntheticBinding

      public AbstractSyntheticBinding(PropertyBinding source, TargetBinding target, Class klass, String propertyName)
      Creates a synthetic binding for the supplied property and component type.
      Parameters:
      source - the source property binding
      target - the target binding
      klass - the supported component type
      propertyName - the synthetic property name
  • Method Details

    • bind

      public void bind()
      Installs the synthetic listeners if this binding is not already active.
    • unbind

      public void unbind()
      Removes the synthetic listeners if this binding is currently active.
    • syntheticBind

      protected abstract void syntheticBind()
      Hooks the synthetic listeners required by this binding.
    • syntheticUnbind

      protected abstract void syntheticUnbind()
      Removes any synthetic listeners installed by this binding.
    • rebind

      public void rebind()
      Reinstalls the synthetic listeners when the binding is already active.
    • setSourceBinding

      public void setSourceBinding(SourceBinding source)
      Validates and stores the source binding for this synthetic property.
      Specified by:
      setSourceBinding in interface FullBinding
      Overrides:
      setSourceBinding in class AbstractFullBinding
      Parameters:
      source - the source binding to validate
    • setTargetBinding

      public void setTargetBinding(TargetBinding target)
      Stores the target binding that receives propagated updates.
      Specified by:
      setTargetBinding in interface FullBinding
      Overrides:
      setTargetBinding in class AbstractFullBinding
      Parameters:
      target - the target binding