Class DelegatingValueProperty<S,T>

java.lang.Object
org.eclipse.core.databinding.property.value.ValueProperty<S,T>
org.eclipse.core.databinding.property.value.DelegatingValueProperty<S,T>
Type Parameters:
S - type of the source object
T - type of the value of the property
All Implemented Interfaces:
IProperty, IValueProperty<S,T>

public abstract class DelegatingValueProperty<S,T> extends ValueProperty<S,T>
Since:
1.2
  • Constructor Details

    • DelegatingValueProperty

      protected DelegatingValueProperty()
    • DelegatingValueProperty

      protected DelegatingValueProperty(Object valueType)
  • Method Details

    • getDelegate

      public final IValueProperty<S,T> getDelegate(S source)
      Returns the property to delegate to for the specified source object. Repeated calls to this method with the same source object returns the same delegate instance.
      Parameters:
      source - the property source (may be null)
      Returns:
      the property to delegate to for the specified source object.
    • doGetDelegate

      protected abstract IValueProperty<S,T> doGetDelegate(S source)
      Returns the property to delegate to for the specified source object. Implementers must ensure that repeated calls to this method with the same source object returns the same delegate instance.
      Parameters:
      source - the property source
      Returns:
      the property to delegate to for the specified source object.
    • doGetValue

      protected T doGetValue(S source)
      Description copied from class: ValueProperty
      Returns the value of the property on the specified source object
      Overrides:
      doGetValue in class ValueProperty<S,T>
      Parameters:
      source - the property source
      Returns:
      the current value of the source's value property
    • doSetValue

      protected void doSetValue(S source, T value)
      Description copied from class: ValueProperty
      Sets the source's value property to the specified vlaue
      Overrides:
      doSetValue in class ValueProperty<S,T>
      Parameters:
      source - the property source
      value - the new value
    • getValueType

      public Object getValueType()
      Description copied from interface: IValueProperty
      Returns the value type of the property, or null if untyped.
      Returns:
      the value type of the property, or null if untyped.
    • observe

      public IObservableValue<T> observe(S source)
      Description copied from interface: IValueProperty
      Returns an observable value observing this value property on the given property source.
      Specified by:
      observe in interface IValueProperty<S,T>
      Overrides:
      observe in class ValueProperty<S,T>
      Parameters:
      source - the property source
      Returns:
      an observable value observing this value property on the given property source
    • observe

      public IObservableValue<T> observe(Realm realm, S source)
      Description copied from interface: IValueProperty
      Returns an observable value observing this value property on the given property source
      Parameters:
      realm - the observable's realm
      source - the property source
      Returns:
      an observable value observing this value property on the given property source
    • observeDetail

      public <U extends S> IObservableList<T> observeDetail(IObservableList<U> master)
      Description copied from interface: IValueProperty
      Returns an observable list on the master observable's realm which tracks this property on each element of master.
      Specified by:
      observeDetail in interface IValueProperty<S,T>
      Overrides:
      observeDetail in class ValueProperty<S,T>
      Parameters:
      master - the master observable
      Returns:
      an observable list which tracks this property on each element of the master observable.
    • observeDetail

      public <U extends S> IObservableMap<U,T> observeDetail(IObservableSet<U> master)
      Description copied from interface: IValueProperty
      Returns an observable map on the master observable's realm where the map's key set is the specified master set, and where each key maps to the current property value for each element.
      Specified by:
      observeDetail in interface IValueProperty<S,T>
      Overrides:
      observeDetail in class ValueProperty<S,T>
      Parameters:
      master - the master observable
      Returns:
      an observable map that tracks the current value of this property for the elements in the given set.
    • observeDetail

      public <K, V extends S> IObservableMap<K,T> observeDetail(IObservableMap<K,V> master)
      Description copied from interface: IValueProperty
      Returns an observable map on the master observable's realm where the map's key set is the same as the master observable map, and where each value is the property value of the corresponding value in the master observable map.
      Specified by:
      observeDetail in interface IValueProperty<S,T>
      Overrides:
      observeDetail in class ValueProperty<S,T>
      Parameters:
      master - the master observable
      Returns:
      an observable map on the master observable's realm which tracks the current value of this property for the elements in the given map's values collection