public abstract class Binding extends ValidationStatusProvider
init(DataBindingContext)
.Modifier and Type | Field and Description |
---|---|
protected DataBindingContext |
context |
disposed
Constructor and Description |
---|
Binding(IObservable target,
IObservable model)
Creates a new binding.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes of this Binding.
|
IObservable |
getModel()
Returns the model observable
|
IObservableList<IObservable> |
getModels()
Returns an
IObservableList containing the model observables (if
any) that are being tracked by this validation status provider. |
IObservable |
getTarget()
Returns the target observable
|
IObservableList<IObservable> |
getTargets()
Returns an
IObservableList containing the target observables (if
any) that are being tracked by this validation status provider. |
void |
init(DataBindingContext context)
Initializes this binding with the given context and adds it to the list
of bindings of the context.
|
protected abstract void |
postInit()
Called by
init(DataBindingContext) after adding this binding to
the context. |
protected abstract void |
preInit()
Called by
init(DataBindingContext) after setting
context but before adding this binding to the context. |
abstract void |
updateModelToTarget()
Updates the target's state from the model's state at the next reasonable
opportunity.
|
abstract void |
updateTargetToModel()
Updates the model's state from the target's state at the next reasonable
opportunity.
|
abstract void |
validateModelToTarget()
Validates the model's state at the next reasonable
opportunity.
|
abstract void |
validateTargetToModel()
Validates the target's state at the next reasonable
opportunity.
|
getValidationStatus, isDisposed
protected DataBindingContext context
public Binding(IObservable target, IObservable model)
target
- target observablemodel
- model observablepublic final void init(DataBindingContext context)
Subclasses may extend, but must call the super implementation.
context
- protected abstract void preInit()
init(DataBindingContext)
after setting
context
but before adding this binding to the context.
Subclasses may use this method to perform initialization that could not
be done in the constructor. Care should be taken not to cause any events
while running this method.protected abstract void postInit()
init(DataBindingContext)
after adding this binding to
the context. Subclasses may use this method to perform initialization
that may cause events to be fired, including BindingEvents that are
forwarded to the data binding context.public abstract void updateTargetToModel()
public abstract void updateModelToTarget()
public abstract void validateTargetToModel()
public abstract void validateModelToTarget()
public void dispose()
dispose
in class ValidationStatusProvider
public IObservable getTarget()
public IObservableList<IObservable> getTargets()
ValidationStatusProvider
IObservableList
containing the target observables (if
any) that are being tracked by this validation status provider.getTargets
in class ValidationStatusProvider
IObservableList
(may be empty)public IObservable getModel()
public IObservableList<IObservable> getModels()
ValidationStatusProvider
IObservableList
containing the model observables (if
any) that are being tracked by this validation status provider.getModels
in class ValidationStatusProvider
IObservableList
(may be empty)
Copyright (c) 2000, 2018 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.