Package groovy.swing.binding
Class AbstractSyntheticBinding
java.lang.Object
org.apache.groovy.swing.binding.AbstractFullBinding
groovy.swing.binding.AbstractSyntheticBinding
- All Implemented Interfaces:
BindingUpdatable,FullBinding
Base class for bindings that observe synthetic Swing properties.
-
Field Summary
Fields inherited from class org.apache.groovy.swing.binding.AbstractFullBinding
converter, reverseConverter, sourceBinding, targetBinding, validator -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSyntheticBinding(PropertyBinding source, TargetBinding target, Class klass, String propertyName) Creates a synthetic binding for the supplied property and component type. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()Installs the synthetic listeners if this binding is not already active.voidrebind()Reinstalls the synthetic listeners when the binding is already active.voidsetSourceBinding(SourceBinding source) Validates and stores the source binding for this synthetic property.voidsetTargetBinding(TargetBinding target) Stores the target binding that receives propagated updates.protected abstract voidHooks the synthetic listeners required by this binding.protected abstract voidRemoves any synthetic listeners installed by this binding.voidunbind()Removes the synthetic listeners if this binding is currently active.Methods inherited from class org.apache.groovy.swing.binding.AbstractFullBinding
getConverter, getReverseConverter, getSourceBinding, getTargetBinding, getValidator, reverseUpdate, setConverter, setReverseConverter, setValidator, update
-
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 bindingtarget- the target bindingklass- the supported component typepropertyName- 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
Validates and stores the source binding for this synthetic property.- Specified by:
setSourceBindingin interfaceFullBinding- Overrides:
setSourceBindingin classAbstractFullBinding- Parameters:
source- the source binding to validate
-
setTargetBinding
Stores the target binding that receives propagated updates.- Specified by:
setTargetBindingin interfaceFullBinding- Overrides:
setTargetBindingin classAbstractFullBinding- Parameters:
target- the target binding
-