public class MutualPropertyBinding
extends Object
implements FullBinding
Maintains two synchronized PropertyBinding instances that update each other.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
bind()Binds both forward and reverse bindings when the pair is fully configured. |
|
public Closure |
getConverter()Returns the converter applied from source to target. |
|
public Closure |
getReverseConverter()Returns the converter applied from target to source. |
|
public SourceBinding |
getSourceBinding()Returns the forward source-side property binding. |
|
public TargetBinding |
getTargetBinding()Returns the forward target-side property binding. |
|
public Closure |
getValidator()Returns the validator applied to forward updates. |
|
public void |
rebind()Rebinds both forward and reverse bindings when currently active. |
|
protected void |
rebuildBindings()Rebuilds the internal forward and reverse bindings to match the current configuration. |
|
public void |
reverseUpdate()Pushes an update from the target side back to the source side. |
|
public void |
setConverter(Closure converter)Replaces the converter applied from source to target. |
|
public void |
setReverseConverter(Closure reverseConverter)Replaces the converter applied from target to source. |
|
public void |
setSourceBinding(SourceBinding sourceBinding)Replaces the source-side property binding and rebuilds the paired bindings. |
|
public void |
setTargetBinding(TargetBinding targetBinding)Replaces the target-side property binding and rebuilds the paired bindings. |
|
public void |
setValidator(Closure validator)Replaces the validator applied to forward updates. |
|
public void |
unbind()Unbinds both forward and reverse bindings. |
|
public void |
update()Pushes an update from the source side to the target side. |
Binds both forward and reverse bindings when the pair is fully configured.
Returns the converter applied from source to target.
nullReturns the converter applied from target to source.
nullReturns the forward source-side property binding.
Returns the forward target-side property binding.
Returns the validator applied to forward updates.
nullRebinds both forward and reverse bindings when currently active.
Rebuilds the internal forward and reverse bindings to match the current configuration.
Pushes an update from the target side back to the source side.
Replaces the converter applied from source to target.
converter - the forward converter, or nullReplaces the converter applied from target to source.
reverseConverter - the reverse converter, or nullReplaces the source-side property binding and rebuilds the paired bindings.
sourceBinding - the new source bindingReplaces the target-side property binding and rebuilds the paired bindings.
targetBinding - the new target bindingReplaces the validator applied to forward updates.
validator - the validator closure, or nullUnbinds both forward and reverse bindings.
Pushes an update from the source side to the target side.