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 the DataBindingContext, but it support the disposing of all observables bound using the DataBindingContext. 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.eclipse.core.databinding.observable.IObservable>
    T
    add(T observable)
    Adds the observable to be managed by the binding support.
    void
    bind(org.eclipse.core.databinding.observable.list.IObservableList target, org.eclipse.core.databinding.observable.list.IObservableList model)
    Binds observables lists.
    void
    bind(org.eclipse.core.databinding.observable.value.IObservableValue target, org.eclipse.core.databinding.observable.value.IObservableValue model)
    Binds observables value.
    void
    Disposes the binding support.
    org.eclipse.core.databinding.DataBindingContext
    Returns the DataBindingContext instance.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BindingSupport

      public BindingSupport()
  • Method Details

    • getDBContext

      public org.eclipse.core.databinding.DataBindingContext getDBContext()
      Returns the DataBindingContext instance.
      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 for DataBindingContext.bindValue(IObservableValue, IObservableValue).
      Parameters:
      target - the target value, cannot be null.
      model - the model value, cannot be null.
    • 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 for DataBindingContext.bindList(IObservableList, IObservableList).
      Parameters:
      target - the target list, cannot be null.
      model - the model list, cannot be null.
    • 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 be null.
      Returns:
      the observable instance, never null.
    • dispose

      public void dispose()
      Disposes the binding support.