Eclipse Platform Release 3.7

## org.eclipse.core.databinding.observable.masterdetail
Class MasterDetailObservables

    java.lang.Object
      org.eclipse.core.databinding.observable.masterdetail.MasterDetailObservables

    public class MasterDetailObservables

extends Object

Allows for the observation of an attribute, the detail, of an observable representing selection or another transient instance, the master.

Since:
  1.0

Constructor Summary
`MasterDetailObservables()`

Method Summary
`static IObservableList` `detailList(IObservableValue master, IObservableFactory detailFactory, Object detailElementType)` Creates a detail observable list from a master observable value and a factory.
`static IObservableMap` `detailMap(IObservableValue master, IObservableFactory detailFactory)` Creates a detail observable map from a master observable value and a factory.
`static IObservableMap` `detailMap(IObservableValue master, IObservableFactory detailFactory, Object detailKeyType, Object detailValueType)` Creates a detail observable map from a master observable value and a factory.
`static IObservableSet` `detailSet(IObservableValue master, IObservableFactory detailFactory, Object detailElementType)` Creates a detail observable set from a master observable value and a factory.
`static IObservableValue` `detailValue(IObservableValue master, IObservableFactory detailFactory, Object detailType)` Creates a detail observable value from a master observable value and a factory.
`static IObservableList` `detailValues(IObservableList masterList, IObservableFactory detailFactory, Object detailType)` Returns a detail observable list where each element is the detail value of the element in the master observable list.
`static IObservableMap` `detailValues(IObservableMap masterMap, IObservableFactory detailFactory, Object detailType)` Returns a detail observable map where the map's key set is the same as the one of the given master observable map, and where each value is the detail value of the corresponding value in the master observable map.
`static IObservableMap` `detailValues(IObservableSet masterSet, IObservableFactory detailFactory, Object detailType)` Returns a detail observable map where the map's key set is the same as the given observable set, and where each value is the detail value of the element in the master observable set.

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

Constructor Detail

### MasterDetailObservables

    public MasterDetailObservables()

Method Detail

### detailValue

    public static IObservableValue detailValue(IObservableValue master,
                                               IObservableFactory detailFactory,
                                               Object detailType)

  Creates a detail observable value from a master observable value and a factory. This can be used to create observable values that represent a property of a selected object in a table.

  Parameters:
    `master` - the observable value to track
    `detailFactory` - a factory for creating `IObservableValue` instances given a current value of the master
    `detailType` - the value type of the detail observable value, typically of type java.lang.Class and can be `null`
  Returns:
    an observable value of the given value type that, for any current value of the given master value, behaves like the observable value created by the factory for that current value.

### detailList

    public static IObservableList detailList(IObservableValue master,
                                             IObservableFactory detailFactory,
                                             Object detailElementType)

  Creates a detail observable list from a master observable value and a factory. This can be used to create observable lists that represent a list property of a selected object in a table.

  Parameters:
    `master` - the observable value to track
    `detailFactory` - a factory for creating `IObservableList` instances given a current value of the master
    `detailElementType` - the element type of the detail observable list, typically of type java.lang.Class and can be `null`
  Returns:
    an observable list with the given element type that, for any current value of the given master value, behaves like the observable list created by the factory for that current value.

### detailSet

    public static IObservableSet detailSet(IObservableValue master,
                                           IObservableFactory detailFactory,
                                           Object detailElementType)

  Creates a detail observable set from a master observable value and a factory. This can be used to create observable sets that represent a set property of a selected object in a table.

  Parameters:
    `master` - the observable value to track
    `detailFactory` - a factory for creating `IObservableSet` instances given a current value of the master
    `detailElementType` - the element type of the detail observable set, typically of type java.lang.Class and can be `null`
  Returns:
    an observable set with the given element type that, for any current value of the given master value, behaves like the observable set created by the factory for that current value.

### detailMap

    public static IObservableMap detailMap(IObservableValue master,
                                           IObservableFactory detailFactory)

  Creates a detail observable map from a master observable value and a factory. This can be used to create observable maps that represent a map property of a selected object in a table.

  Parameters:
    `master` - the observable value to track
    `detailFactory` - a factory for createing `IObservableMap` instances given a current value of the master
  Returns:
    an observable map that, for any current value of the given master value, behaves like the observable map created by the factory for that current value.
  Since:
    1.1

### detailMap

    public static IObservableMap detailMap(IObservableValue master,
                                           IObservableFactory detailFactory,
                                           Object detailKeyType,
                                           Object detailValueType)

  Creates a detail observable map from a master observable value and a factory. This can be used to create observable maps that represent a map property of a selected object in a table.

  Parameters:
    `master` - the observable value to track
    `detailFactory` - a factory for createing `IObservableMap` instances given a current value of the master
    `detailKeyType` - the element type of the detail observable map's key set, typically of type java.lang.Class and can be `null`
    `detailValueType` - the element type of the detail observable map's values collection, typically of type java.lang.Class and can be `null`
  Returns:
    an observable map that, for any current value of the given master value, behaves like the observable map created by the factory for that current value.
  Since:
    1.2

### detailValues

    public static IObservableList detailValues(IObservableList masterList,
                                               IObservableFactory detailFactory,
                                               Object detailType)

  Returns a detail observable list where each element is the detail value of the element in the master observable list. The provided factory is used to create the detail observable values for every master element which then define the elements of the detail list. The detail list resides in the same realm as the given master list.

  Note that since the values of the returned list are detail values of the elements of the master list, the only modifications supported are through the `IObservableList.set(int, Object)` method. Modifications made through the returned list are made through the detail observables created by the specified observable factory.

  Parameters:
    `masterList` - The master observable list.
    `detailFactory` - The factory for creating `IObservableValue` instances for the elements of the master list which then define the elements of the new detail list.
    `detailType` - The value type of the detail values, typically of type `java.lang.Class`. May be `null`.
  Returns:
    A detail observable list with elements which correspond to the detail values of the elements of the master list.
  Since:
    1.4

### detailValues

    public static IObservableMap detailValues(IObservableSet masterSet,
                                              IObservableFactory detailFactory,
                                              Object detailType)

  Returns a detail observable map where the map's key set is the same as the given observable set, and where each value is the detail value of the element in the master observable set. The provided factory is used to create the detail observable values for every master key which then define the values of the detail map. The detail map resides in the same realm as the given master set.

  Note that since the values of the returned map are detail values of the elements of the master set, the only modifications supported are through the `IObservableMap.put(Object, Object)` and `Map.putAll(java.util.Map)` methods. Therefore, the returned map does not add entries for elements not already contained in the master set. Modifications made through the returned detail map are made through the detail observables created by the specified observable factory.

  Parameters:
    `masterSet` - The master observable set.
    `detailFactory` - The factory for creating `IObservableValue` instances for the elements of the master set which then define the values of the new detail map.
    `detailType` - The value type of the detail values, typically of type `java.lang.Class`. May be `null`.
  Returns:
    A detail observable map with the given master set as key set and with values which correspond to the detail values of the elements of the master set.
  Since:
    1.4

### detailValues

    public static IObservableMap detailValues(IObservableMap masterMap,
                                              IObservableFactory detailFactory,
                                              Object detailType)

  Returns a detail observable map where the map's key set is the same as the one of the given master observable map, and where each value is the detail value of the corresponding value in the master observable map. The provided factory is used to create the detail observable values for every master value which then define the values of the detail map. The detail map resides in the same realm as the given master map.

  Note that since the values of the returned map are detail values of the values of the master map, the only modifications supported are through the `IObservableMap.put(Object, Object)` and `Map.putAll(java.util.Map)` methods. Therefore, the returned map does not add entries for keys not already contained in the master map's key set. Modifications made through the returned detail map are made through the detail observables created by the specified observable factory.

  Parameters:
    `masterMap` - The master observable map.
    `detailFactory` - The factory for creating `IObservableValue` instances for the values of the master map which then define the values of the new detail map.
    `detailType` - The value type of the detail values, typically of type `java.lang.Class`. May be `null`.
  Returns:
    A detail observable map with the same key set as the given master observable map and with values which correspond to the detail values of the values of the master map.
  Since:
    1.4

Eclipse Platform Release 3.7

Guidelines for using Eclipse APIs.

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