Eclipse Platform Release 3.7

## org.eclipse.core.databinding.observable.value
Class SelectObservableValue

    java.lang.Object
      org.eclipse.core.databinding.observable.AbstractObservable
          org.eclipse.core.databinding.observable.value.AbstractObservableValue
              org.eclipse.core.databinding.observable.value.SelectObservableValue

All Implemented Interfaces:
  IObservable, IObservableValue

    public class SelectObservableValue

extends AbstractObservableValue

An observable value which behaves similarly to the <select> and <option> HTML tags. A SelectObservableValue has a number of options added to it via the `addOption(Object, IObservableValue)` method. The value of the SelectObservableValue is the value of whichever option's observable has a value of Boolean.TRUE, or null if none of the observable's values are Boolean.TRUE.

Since:
  1.2
Restriction:
  This class is not intended to be subclassed by clients.

Constructor Summary
`SelectObservableValue()` Constructs a SelectObservableValue on the default realm.
`SelectObservableValue(Object valueType)` Constructs a SelectObservableValue on the default realm, with the given value type.
`SelectObservableValue(Realm realm)` Constructs a SelectObservableValue on the specified realm.
`SelectObservableValue(Realm realm, Object valueType)` Constructs a SelectObservableValue on the given realm, with the given value type.

Method Summary
`protected void` `addListener(Object listenerType, IObservablesListener listener)`
`void` `addOption(Object value, IObservableValue observable)` Adds an option to this SelectObservableValue.
`protected Object` `clone()`
`protected Object` `doGetValue()`
`protected void` `doSetValue(Object value)` Template method for setting the value of the observable.
`protected void` `fireEvent(ObservableEvent event)`
`protected void` `firstListenerAdded()`
`Realm` `getRealm()`
`Object` `getValueType()` The value type of this observable value, or `null` if this observable value is untyped.
`protected boolean` `hasListeners()`
`protected void` `lastListenerRemoved()`
`protected void` `removeListener(Object listenerType, IObservablesListener listener)`

Methods inherited from class org.eclipse.core.databinding.observable.value.AbstractObservableValue
`addValueChangeListener, fireChange, fireValueChange, getValue, isStale, removeValueChangeListener, setValue`

Methods inherited from class org.eclipse.core.databinding.observable.AbstractObservable
`addChangeListener, addDisposeListener, addStaleListener, checkRealm, dispose, fireStale, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener`

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

Methods inherited from interface org.eclipse.core.databinding.observable.IObservable
`addChangeListener, addDisposeListener, addStaleListener, dispose, getRealm, isDisposed, removeChangeListener, removeDisposeListener, removeStaleListener`

Constructor Detail

### SelectObservableValue

    public SelectObservableValue()

  Constructs a SelectObservableValue on the default realm.

### SelectObservableValue

    public SelectObservableValue(Realm realm)

  Constructs a SelectObservableValue on the specified realm.

  Parameters:
    `realm` - the realm

### SelectObservableValue

    public SelectObservableValue(Object valueType)

  Constructs a SelectObservableValue on the default realm, with the given value type.

  Parameters:
    `valueType` - the value type

### SelectObservableValue

    public SelectObservableValue(Realm realm,
                                 Object valueType)

  Constructs a SelectObservableValue on the given realm, with the given value type.

  Parameters:
    `realm` - the realm
    `valueType` - the value type

Method Detail

### firstListenerAdded

    protected void firstListenerAdded()

### lastListenerRemoved

    protected void lastListenerRemoved()

### getValueType

    public Object getValueType()

  Description copied from interface: `IObservableValue`
  The value type of this observable value, or `null` if this observable value is untyped.

  Returns:
    the value type, or `null</null>`

### addOption

    public void addOption(Object value,
                          IObservableValue observable)

  Adds an option to this SelectObservableValue. If the observable contains Boolean.TRUE then the selection changes immediately to the given value.

  Parameters:
    `value` - The value associated with the provided observable
    `observable` - an observable of value type Boolean.class or Boolean.TYPE

### doGetValue

    protected Object doGetValue()

  Specified by:
    `doGetValue` in class `AbstractObservableValue`

### doSetValue

    protected void doSetValue(Object value)

  Description copied from class: `AbstractObservableValue`
  Template method for setting the value of the observable. By default the method throws an `UnsupportedOperationException`.

  Overrides:
    `doSetValue` in class `AbstractObservableValue`

### addListener

    protected void addListener(Object listenerType,
                               IObservablesListener listener)

  Parameters:
    `listenerType` -
    `listener` -

### removeListener

    protected void removeListener(Object listenerType,
                                  IObservablesListener listener)

  Parameters:
    `listenerType` -
    `listener` -

### hasListeners

    protected boolean hasListeners()

### fireEvent

    protected void fireEvent(ObservableEvent event)

### getRealm

    public Realm getRealm()

  Returns:
    Returns the realm.

### clone

    protected Object clone()
                    throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

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