Class BindingSupport
- java.lang.Object
-
- com._1c.g5.v8.dt.common.databinding.BindingSupport
-
public class BindingSupport extends Object
The binding support. It cares about robust and clear lifecycle of observables, particulary for disposing stage. It provides access to theDataBindingContext, but it support the disposing of all observables bound using theDataBindingContext. For example, in case of using native DataBindingContext SWTObservables get disposed automatically with the control being observed, but WritableList, WritableValue, EMFObservables, etc need to be disposed manually.
-
-
Constructor Summary
Constructors Constructor Description BindingSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends org.eclipse.core.databinding.observable.IObservable>
Tadd(T observable)Adds the observable to be managed by the binding support.voidbind(org.eclipse.core.databinding.observable.list.IObservableList target, org.eclipse.core.databinding.observable.list.IObservableList model)Binds observables lists.voidbind(org.eclipse.core.databinding.observable.value.IObservableValue target, org.eclipse.core.databinding.observable.value.IObservableValue model)Binds observables value.voiddispose()Disposes the binding support.org.eclipse.core.databinding.DataBindingContextgetDBContext()Returns theDataBindingContextinstance.
-
-
-
Method Detail
-
getDBContext
public org.eclipse.core.databinding.DataBindingContext getDBContext()
Returns theDataBindingContextinstance.- Returns:
- the DataBindingContext instance, never
null.
-
bind
public void bind(org.eclipse.core.databinding.observable.value.IObservableValue target, org.eclipse.core.databinding.observable.value.IObservableValue model)Binds observables value. It is a shortcut forDataBindingContext.bindValue(IObservableValue, IObservableValue).- Parameters:
target- the target value, cannot benull.model- the model value, cannot benull.
-
bind
public void bind(org.eclipse.core.databinding.observable.list.IObservableList target, org.eclipse.core.databinding.observable.list.IObservableList model)Binds observables lists. It is a shortcut forDataBindingContext.bindList(IObservableList, IObservableList).- Parameters:
target- the target list, cannot benull.model- the model list, cannot benull.
-
add
public <T extends org.eclipse.core.databinding.observable.IObservable> T add(T observable)
Adds the observable to be managed by the binding support.- Parameters:
observable- the observable, cannot benull.- Returns:
- the observable instance, never
null.
-
dispose
public void dispose()
Disposes the binding support.
-
-