Package org.eclipse.core.databinding
Class ListBinding<M,T>
java.lang.Object
org.eclipse.core.databinding.ValidationStatusProvider
org.eclipse.core.databinding.Binding
org.eclipse.core.databinding.ListBinding<M,T>
- Type Parameters:
T
- the type of the elements in the list on the target sideM
- the type of the elements in the list on the model side
- Since:
- 1.0
-
Field Summary
Fields inherited from class org.eclipse.core.databinding.ValidationStatusProvider
disposed
-
Constructor Summary
ConstructorDescriptionListBinding
(IObservableList<T> target, IObservableList<M> model, UpdateListStrategy<? super T, ? extends M> targetToModelStrategy, UpdateListStrategy<? super M, ? extends T> modelToTargetStrategy) -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Disposes of this Binding.protected void
postInit()
Called byBinding.init(DataBindingContext)
after adding this binding to the context.protected void
preInit()
Called byBinding.init(DataBindingContext)
after settingBinding.context
but before adding this binding to the context.void
Updates the target's state from the model's state at the next reasonable opportunity.void
Updates the model's state from the target's state at the next reasonable opportunity.void
Validates the model's state at the next reasonable opportunity.void
Validates the target's state at the next reasonable opportunity.Methods inherited from class org.eclipse.core.databinding.Binding
getModel, getModels, getTarget, getTargets, init
Methods inherited from class org.eclipse.core.databinding.ValidationStatusProvider
isDisposed
-
Constructor Details
-
ListBinding
public ListBinding(IObservableList<T> target, IObservableList<M> model, UpdateListStrategy<? super T, ? extends M> targetToModelStrategy, UpdateListStrategy<? super M, ? extends T> modelToTargetStrategy) - Parameters:
target
- the target side listmodel
- the model side listmodelToTargetStrategy
- strategy to copy model to target elementstargetToModelStrategy
- strategy to copy target to model elements
-
-
Method Details
-
getValidationStatus
- Specified by:
getValidationStatus
in classValidationStatusProvider
- Returns:
- an
IObservableValue
containing the current validation status
-
preInit
protected void preInit()Description copied from class:Binding
Called byBinding.init(DataBindingContext)
after settingBinding.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. -
postInit
protected void postInit()Description copied from class:Binding
Called byBinding.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. -
updateModelToTarget
public void updateModelToTarget()Description copied from class:Binding
Updates the target's state from the model's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.- Specified by:
updateModelToTarget
in classBinding
-
updateTargetToModel
public void updateTargetToModel()Description copied from class:Binding
Updates the model's state from the target's state at the next reasonable opportunity. There is no guarantee that the state will have been updated by the time this call returns.- Specified by:
updateTargetToModel
in classBinding
-
validateModelToTarget
public void validateModelToTarget()Description copied from class:Binding
Validates the model's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.- Specified by:
validateModelToTarget
in classBinding
-
validateTargetToModel
public void validateTargetToModel()Description copied from class:Binding
Validates the target's state at the next reasonable opportunity. There is no guarantee that the validation status will have been updated by the time this call returns.- Specified by:
validateTargetToModel
in classBinding
-
dispose
public void dispose()Description copied from class:Binding
Disposes of this Binding. Subclasses may extend, but must call super.dispose().
-