public final class BeansObservables extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
Constructor and Description |
---|
BeansObservables() |
Modifier and Type | Method and Description |
---|---|
static IObservableFactory |
listFactory(Realm realm,
String propertyName,
Class elementType)
Returns a factory for creating observable lists in the given realm,
tracking the given property of a particular bean object
|
static IObservableFactory |
listFactory(String propertyName,
Class elementType)
Returns a factory for creating observable lists in the current default
realm, tracking the given property of a particular bean object
|
static IObservableFactory |
mapPropertyFactory(Realm realm,
String propertyName)
Returns a factory for creating an observable map.
|
static IObservableFactory |
mapPropertyFactory(String propertyName)
Returns a factory for creating an observable map.
|
static IObservableList |
observeDetailList(IObservableValue master,
String propertyName,
Class propertyType)
Helper method for
MasterDetailObservables.detailList(master, listFactory(master.getRealm(), propertyName, propertyType), propertyType) |
static IObservableList |
observeDetailList(Realm realm,
IObservableValue master,
String propertyName,
Class propertyType)
Deprecated.
|
static IObservableMap |
observeDetailMap(IObservableValue master,
String propertyName)
Helper method for
MasterDetailObservables.detailMap(master, mapFactory(master.getRealm(), propertyName)) |
static IObservableMap |
observeDetailMap(Realm realm,
IObservableValue master,
String propertyName)
Deprecated.
Use
observeDetailMap(IObservableValue, String)
instead |
static IObservableSet |
observeDetailSet(IObservableValue master,
String propertyName,
Class propertyType)
Helper method for
MasterDetailObservables.detailSet(master, setFactory(master.getRealm(), propertyName), propertyType) |
static IObservableSet |
observeDetailSet(Realm realm,
IObservableValue master,
String propertyName,
Class propertyType)
Deprecated.
Use
observeDetailSet(IObservableValue, String, Class)
instead. |
static IObservableValue |
observeDetailValue(IObservableValue master,
Class masterType,
String propertyName,
Class propertyType)
Helper method for
MasterDetailObservables.detailValue(master, valueFactory(master.getRealm(), propertyName), propertyType)
. |
static IObservableValue |
observeDetailValue(IObservableValue master,
String propertyName,
Class propertyType)
Helper method for
MasterDetailObservables.detailValue(master, valueFactory(master.getRealm(), propertyName), propertyType) |
static IObservableValue |
observeDetailValue(Realm realm,
IObservableValue master,
Class masterType,
String propertyName,
Class propertyType)
Deprecated.
|
static IObservableValue |
observeDetailValue(Realm realm,
IObservableValue master,
String propertyName,
Class propertyType)
Deprecated.
|
static IObservableList |
observeList(Object bean,
String propertyName)
Returns an observable list in the default realm tracking the
collection-typed named property of the given bean object.
|
static IObservableList |
observeList(Object bean,
String propertyName,
Class elementType)
Returns an observable list in the default realm tracking the
collection-typed named property of the given bean object.
|
static IObservableList |
observeList(Realm realm,
Object bean,
String propertyName)
Returns an observable list in the given realm tracking the
collection-typed named property of the given bean object.
|
static IObservableList |
observeList(Realm realm,
Object bean,
String propertyName,
Class elementType)
Returns an observable list in the given realm tracking the
collection-typed named property of the given bean object.
|
static IObservableMap |
observeMap(IObservableSet domain,
Class beanClass,
String propertyName)
Returns an observable map in the given observable set's realm tracking
the current values of the named property for the beans in the given set.
|
static IObservableMap |
observeMap(IObservableSet domain,
String propertyName)
Returns an observable map in the given observable set's realm tracking
the current values of the named property for the beans in the given set.
|
static IObservableMap |
observeMap(Object bean,
String propertyName)
Returns an observable map in the default realm tracking the map-typed
named property of the given bean object.
|
static IObservableMap |
observeMap(Object bean,
String propertyName,
Class keyType,
Class valueType)
Returns an observable map in the default realm tracking the map-typed
named property of the given bean object.
|
static IObservableMap |
observeMap(Realm realm,
Object bean,
String propertyName)
Returns an observable map in the given realm tracking the map-typed named
property of the given bean object.
|
static IObservableMap |
observeMap(Realm realm,
Object bean,
String propertyName,
Class keyType,
Class valueType)
Returns an observable map in the given realm tracking the map-typed named
property of the given bean object.
|
static IObservableMap[] |
observeMaps(IObservableSet domain,
Class beanClass,
String[] propertyNames)
Returns an array of observable maps in the given observable set's realm
tracking the current values of the named properties for the beans in the
given set.
|
static IObservableMap[] |
observeMaps(IObservableSet domain,
String[] propertyNames)
Returns an array of observable maps in the given observable set's realm
tracking the current values of the named properties for the beans in the
given set.
|
static IObservableSet |
observeSet(Object bean,
String propertyName)
Returns an observable set in the default realm tracking the
collection-typed named property of the given bean object
|
static IObservableSet |
observeSet(Object bean,
String propertyName,
Class elementType)
Returns an observable set in the current default realm tracking the
collection-typed named property of the given bean object.
|
static IObservableSet |
observeSet(Realm realm,
Object bean,
String propertyName)
Returns an observable set in the given realm tracking the
collection-typed named property of the given bean object
|
static IObservableSet |
observeSet(Realm realm,
Object bean,
String propertyName,
Class elementType)
Returns an observable set in the given realm tracking the
collection-typed named property of the given bean object.
|
static IObservableValue |
observeValue(Object bean,
String propertyName)
Returns an observable value in the default realm tracking the current
value of the named property of the given bean.
|
static IObservableValue |
observeValue(Realm realm,
Object bean,
String propertyName)
Returns an observable value in the given realm tracking the current value
of the named property of the given bean.
|
static IObservableFactory |
setFactory(Realm realm,
String propertyName)
Returns a factory for creating observable sets in the given realm,
tracking the given property of a particular bean object
|
static IObservableFactory |
setFactory(Realm realm,
String propertyName,
Class elementType)
Returns a factory for creating observable sets in the given realm,
tracking the given property of a particular bean object
|
static IObservableFactory |
setFactory(String propertyName)
Returns a factory for creating observable sets in the current default
realm, tracking the given property of a particular bean object
|
static IObservableFactory |
setFactory(String propertyName,
Class elementType)
Returns a factory for creating observable sets in the current default
realm, tracking the given property of a particular bean object
|
static IObservableFactory |
setToMapFactory(Class beanClass,
String propertyName)
Returns a factory for creating an observable map.
|
static IObservableFactory |
valueFactory(Realm realm,
String propertyName)
Returns a factory for creating observable values in the given realm,
tracking the given property of a particular bean object
|
static IObservableFactory |
valueFactory(String propertyName)
Returns a factory for creating observable values in the current default
realm, tracking the given property of a particular bean object
|
public static final boolean DEBUG
public static IObservableValue observeValue(Object bean, String propertyName)
bean
- the objectpropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableValue observeValue(Realm realm, Object bean, String propertyName)
realm
- the realmbean
- the objectpropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableMap observeMap(IObservableSet domain, String propertyName)
put
values to these elements will be ignored.domain
- the set of bean objectspropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableMap observeMap(IObservableSet domain, Class beanClass, String propertyName)
domain
- the set of bean objectsbeanClass
- the common base type of bean objects that may be in the setpropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableMap observeMap(Realm realm, Object bean, String propertyName)
realm
- the realmbean
- the bean objectpropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableMap observeMap(Realm realm, Object bean, String propertyName, Class keyType, Class valueType)
realm
- the realmbean
- the bean objectpropertyName
- the name of the property. May be nested e.g. "parent.name"keyType
- the element type of the observable map's key set, or
null
if untypedvalueType
- the element type of the observable map's values collection, or
null
if untypedpublic static IObservableMap observeMap(Object bean, String propertyName)
bean
- the bean objectpropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableMap observeMap(Object bean, String propertyName, Class keyType, Class valueType)
bean
- the bean objectpropertyName
- the name of the propertykeyType
- the element type of the observable map's key set, or
null
if untypedvalueType
- the element type of the observable map's values collection, or
null
if untypedpublic static IObservableMap[] observeMaps(IObservableSet domain, String[] propertyNames)
put
values to these elements
will be ignored.domain
- the set of objectspropertyNames
- the array of property names. May be nested e.g. "parent.name"public static IObservableMap[] observeMaps(IObservableSet domain, Class beanClass, String[] propertyNames)
domain
- the set of objectsbeanClass
- the common base type of objects that may be in the setpropertyNames
- the array of property names. May be nested e.g. "parent.name"public static IObservableList observeList(Realm realm, Object bean, String propertyName)
realm
- the realmbean
- the objectpropertyName
- the name of the collection-typed propertyobserveList(Realm, Object, String, Class)
public static IObservableList observeList(Object bean, String propertyName)
bean
- the objectpropertyName
- the name of the collection-typed propertyobserveList(Realm, Object, String, Class)
public static IObservableList observeList(Realm realm, Object bean, String propertyName, Class elementType)
PropertyChangeEvents
. This is done to provide
the same behavior as is expected from arrays as specified in the bean
spec in section 7.2.realm
- the realmbean
- the bean objectpropertyName
- the name of the propertyelementType
- type of the elements in the list. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableList observeList(Object bean, String propertyName, Class elementType)
PropertyChangeEvents
. This is done to provide
the same behavior as is expected from arrays as specified in the bean
spec in section 7.2.bean
- the bean objectpropertyName
- the name of the propertyelementType
- type of the elements in the list. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableSet observeSet(Realm realm, Object bean, String propertyName)
realm
- the realmbean
- the bean objectpropertyName
- the name of the propertypublic static IObservableSet observeSet(Object bean, String propertyName)
bean
- the bean objectpropertyName
- the name of the propertypublic static IObservableFactory valueFactory(Realm realm, String propertyName)
realm
- the realm to usepropertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableFactory valueFactory(String propertyName)
propertyName
- the name of the property. May be nested e.g. "parent.name"public static IObservableFactory listFactory(Realm realm, String propertyName, Class elementType)
realm
- the realm to usepropertyName
- the name of the propertyelementType
- public static IObservableFactory listFactory(String propertyName, Class elementType)
propertyName
- the name of the propertyelementType
- public static IObservableFactory setFactory(Realm realm, String propertyName)
realm
- the realm to usepropertyName
- the name of the propertypublic static IObservableFactory setFactory(String propertyName)
propertyName
- the name of the propertypublic static IObservableValue observeDetailValue(Realm realm, IObservableValue master, String propertyName, Class propertyType)
observeDetailValue(IObservableValue, String, Class)
insteadMasterDetailObservables.detailValue(master, valueFactory(realm,
propertyName), propertyType)
realm
- master
- propertyName
- the name of the property. May be nested e.g. "parent.name"propertyType
- can be null
MasterDetailObservables
public static IObservableValue observeDetailValue(IObservableValue master, String propertyName, Class propertyType)
MasterDetailObservables.detailValue(master, valueFactory(master.getRealm(), propertyName), propertyType)
master
- propertyName
- the name of the property. May be nested e.g. "parent.name"propertyType
- can be null
MasterDetailObservables
public static IObservableValue observeDetailValue(Realm realm, IObservableValue master, Class masterType, String propertyName, Class propertyType)
observeDetailValue(IObservableValue, Class, String, Class)
instead.MasterDetailObservables.detailValue(master, valueFactory(realm,
propertyName), propertyType)
. This method returns an
IBeanObservable
with a PropertyDescriptor
based on the
given master type and property name.realm
- the realmmaster
- the master observable value, for example tracking the
selection in a listmasterType
- the type of the master observable valuepropertyName
- the property name. May be nested e.g. "parent.name"propertyType
- can be null
MasterDetailObservables
public static IObservableValue observeDetailValue(IObservableValue master, Class masterType, String propertyName, Class propertyType)
MasterDetailObservables.detailValue(master, valueFactory(master.getRealm(), propertyName), propertyType)
. This method returns an IBeanObservable
with a
PropertyDescriptor
based on the given master type and property
name.master
- the master observable value, for example tracking the
selection in a listmasterType
- the type of the master observable valuepropertyName
- the property name. May be nested e.g. "parent.name"propertyType
- can be null
MasterDetailObservables
public static IObservableList observeDetailList(Realm realm, IObservableValue master, String propertyName, Class propertyType)
observeDetailList(IObservableValue, String, Class)
insteadMasterDetailObservables.detailList(master, listFactory(realm,
propertyName, propertyType), propertyType)
realm
- master
- propertyName
- propertyType
- can be null
MasterDetailObservables
public static IObservableList observeDetailList(IObservableValue master, String propertyName, Class propertyType)
MasterDetailObservables.detailList(master, listFactory(master.getRealm(), propertyName, propertyType), propertyType)
master
- propertyName
- propertyType
- can be null
MasterDetailObservables
public static IObservableSet observeDetailSet(Realm realm, IObservableValue master, String propertyName, Class propertyType)
observeDetailSet(IObservableValue, String, Class)
instead.MasterDetailObservables.detailSet(master, setFactory(realm,
propertyName), propertyType)
realm
- master
- propertyName
- propertyType
- can be null
MasterDetailObservables
public static IObservableSet observeDetailSet(IObservableValue master, String propertyName, Class propertyType)
MasterDetailObservables.detailSet(master, setFactory(master.getRealm(), propertyName), propertyType)
master
- propertyName
- propertyType
- can be null
MasterDetailObservables
public static IObservableMap observeDetailMap(Realm realm, IObservableValue master, String propertyName)
observeDetailMap(IObservableValue, String)
insteadMasterDetailObservables.detailMap(master, mapFactory(realm, propertyName))
realm
- the realmmaster
- propertyName
- public static IObservableMap observeDetailMap(IObservableValue master, String propertyName)
MasterDetailObservables.detailMap(master, mapFactory(master.getRealm(), propertyName))
master
- propertyName
- public static IObservableSet observeSet(Realm realm, Object bean, String propertyName, Class elementType)
PropertyChangeEvents
. This is done to provide the same
behavior as is expected from arrays as specified in the bean spec in
section 7.2.realm
- the realmbean
- the bean objectpropertyName
- the name of the propertyelementType
- type of the elements in the set. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableSet observeSet(Object bean, String propertyName, Class elementType)
PropertyChangeEvents
. This is done to provide the same
behavior as is expected from arrays as specified in the bean spec in
section 7.2.bean
- the bean objectpropertyName
- the name of the propertyelementType
- type of the elements in the set. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableFactory setFactory(Realm realm, String propertyName, Class elementType)
realm
- the realm to usepropertyName
- the name of the propertyelementType
- type of the elements in the set. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableFactory setFactory(String propertyName, Class elementType)
propertyName
- the name of the propertyelementType
- type of the elements in the set. If null
and the
property is an array the type will be inferred. If
null
and the property type cannot be inferred
element type will be null
.public static IObservableFactory setToMapFactory(Class beanClass, String propertyName)
IObservableSet
, will create an
IObservableMap
in the same realm as the underlying set that
tracks the current values of the named property for the beans in the
given set.beanClass
- the common base type of bean objects that may be in the setpropertyName
- the name of the property. May be nested e.g. "parent.name"IObservableMap
objectspublic static IObservableFactory mapPropertyFactory(Realm realm, String propertyName)
IObservableMap
in the
given realm that tracks the map-typed named property for the specified
bean.realm
- the realm assigned to observables created by the returned
factory.propertyName
- the name of the propertyIObservableMap
objects.public static IObservableFactory mapPropertyFactory(String propertyName)
IObservableMap
in the
current default realm that tracks the map-typed named property for the
specified bean.propertyName
- the name of the propertyIObservableMap
objects.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.