Eclipse Platform Release 3.7

## org.eclipse.core.databinding.property.value
Class SimpleValueProperty

    java.lang.Object
      org.eclipse.core.databinding.property.value.ValueProperty
          org.eclipse.core.databinding.property.value.SimpleValueProperty

All Implemented Interfaces:
  IProperty, IValueProperty

Direct Known Subclasses:
  ViewerValueProperty, WidgetValueProperty

    public abstract class SimpleValueProperty

extends ValueProperty

Simplified abstract implementation of IValueProperty. This class takes care of most of the functional requirements for an IValueProperty implementation, leaving only the property-specific details to subclasses.

Subclasses must implement these methods:

- `IValueProperty.getValueType()`
- `doGetValue(Object)`
- `doSetValue(Object, Object)`
- `adaptListener(ISimplePropertyListener)`

In addition, we recommended overriding `Object.toString()` to return a description suitable for debugging purposes.

Since:
  1.2

Constructor Summary
`SimpleValueProperty()`

Method Summary
`abstract INativePropertyListener` `adaptListener(ISimplePropertyListener listener)` Returns a listener capable of adding or removing itself as a listener on a source object using the the source's "native" listener API.
`protected abstract Object` `doGetValue(Object source)` Returns the value of the property on the specified source object
`protected abstract void` `doSetValue(Object source, Object value)` Sets the source's value property to the specified vlaue
`IObservableValue` `observe(Realm realm, Object source)` Returns an observable value observing this value property on the given property source
`IObservableList` `observeDetail(IObservableList master)` Returns an observable list on the master observable's realm which tracks this property on each element of `master`.
`IObservableMap` `observeDetail(IObservableMap master)` 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.
`IObservableMap` `observeDetail(IObservableSet master)` 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.

Methods inherited from class org.eclipse.core.databinding.property.value.ValueProperty
`getValue, list, map, observe, observeDetail, set, setValue, value, valueFactory, valueFactory`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.eclipse.core.databinding.property.value.IValueProperty
`getValueType`

Constructor Detail

### SimpleValueProperty

    public SimpleValueProperty()

Method Detail

### doGetValue

    protected abstract Object doGetValue(Object source)

  Description copied from class: `ValueProperty`
  Returns the value of the property on the specified source object

  Overrides:
    `doGetValue` in class `ValueProperty`
  Parameters:
    `source` - the property source
  Returns:
    the current value of the source's value property

### doSetValue

    protected abstract void doSetValue(Object source,
                                       Object value)

  Description copied from class: `ValueProperty`
  Sets the source's value property to the specified vlaue

  Overrides:
    `doSetValue` in class `ValueProperty`
  Parameters:
    `source` - the property source
    `value` - the new value

### adaptListener

    public abstract INativePropertyListener adaptListener(ISimplePropertyListener listener)

  Returns a listener capable of adding or removing itself as a listener on a source object using the the source's "native" listener API. Events received from the source objects are parlayed to the specified listener argument.

  This method returns null if the source object has no listener APIs for this property.

  Parameters:
    `listener` - the property listener to receive events
  Returns:
    a native listener which parlays property change events to the specified listener, or null if the source object has no listener APIs for this property.
  Restriction:
    This method is not intended to be referenced by clients.

### observe

    public IObservableValue observe(Realm realm,
                                    Object 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 IObservableList observeDetail(IObservableList 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`
  Overrides:
    `observeDetail` in class `ValueProperty`
  Parameters:
    `master` - the master observable
  Returns:
    an observable list which tracks this property on each element of the master observable.

### observeDetail

    public IObservableMap observeDetail(IObservableSet 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`
  Overrides:
    `observeDetail` in class `ValueProperty`
  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 IObservableMap observeDetail(IObservableMap 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`
  Overrides:
    `observeDetail` in class `ValueProperty`
  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

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.