|
Eclipse Platform Release 3.4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.eclipse.core.databinding.AggregateValidationStatus
This class can be used to aggregate status values from a data binding context
into a single status value. Instances of this class can be used as an
observable value with a value type of IStatus, or the static methods
can be called directly if an aggregated status result is only needed once.
| Field Summary | |
static int |
MAX_SEVERITY
Constant denoting an aggregation strategy that always returns the most severe status from the given validation status providers. |
static int |
MERGED
Constant denoting an aggregation strategy that merges multiple non-OK status objects in a MultiStatus. |
| Constructor Summary | |
AggregateValidationStatus(DataBindingContext dbc,
int strategy)
Creates a new aggregate validation status observable for the given data binding context. |
|
AggregateValidationStatus(IObservableCollection validationStatusProviders,
int strategy)
|
|
AggregateValidationStatus(Realm realm,
IObservableCollection validationStatusProviders,
int strategy)
|
|
| Method Summary | |
void |
addChangeListener(IChangeListener listener)
Adds the given change listener to the list of change listeners. |
void |
addStaleListener(IStaleListener listener)
Adds the given stale listener to the list of stale listeners. |
void |
addValueChangeListener(IValueChangeListener listener)
|
void |
dispose()
Disposes of this observable object, removing all listeners registered with this object, and all listeners this object might have registered on other objects. |
Realm |
getRealm()
Returns the realm for this observable. |
static IStatus |
getStatusMaxSeverity(Collection validationStatusProviders)
Returns a status that always returns the most severe status from the given validation status providers. |
static IStatus |
getStatusMerged(Collection validationStatusProviders)
Returns a status object that merges multiple non-OK status objects in a MultiStatus. |
Object |
getValue()
Returns the value. |
Object |
getValueType()
The value type of this observable value, or null if this
observable value is untyped. |
boolean |
isStale()
Returns whether the state of this observable is stale and is expected to change soon. |
void |
removeChangeListener(IChangeListener listener)
Removes the given change listener from the list of change listeners. |
void |
removeStaleListener(IStaleListener listener)
Removes the given stale listener from the list of stale listeners. |
void |
removeValueChangeListener(IValueChangeListener listener)
|
void |
setValue(Object value)
Sets the value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int MERGED
MultiStatus. Returns an OK status result if
all statuses from the given validation status providers are the an OK
status. Returns a single status if there is only one non-OK status.
getStatusMerged(Collection),
Constant Field Valuespublic static final int MAX_SEVERITY
getStatusMaxSeverity(Collection),
Constant Field Values| Constructor Detail |
public AggregateValidationStatus(DataBindingContext dbc,
int strategy)
dbc - a data binding contextstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.
public AggregateValidationStatus(IObservableCollection validationStatusProviders,
int strategy)
validationStatusProviders - an observable collection containing elements of type
ValidationStatusProviderstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.DataBindingContext.getValidationStatusProviders()
public AggregateValidationStatus(Realm realm,
IObservableCollection validationStatusProviders,
int strategy)
realm - RealmvalidationStatusProviders - an observable collection containing elements of type
ValidationStatusProviderstrategy - a strategy constant, one of MERGED or
MAX_SEVERITY.DataBindingContext.getValidationStatusProviders()| Method Detail |
public void addChangeListener(IChangeListener listener)
IObservable
addChangeListener in interface IObservablelistener - IObservable.addChangeListener(org.eclipse.core.databinding.observable.IChangeListener)public void addStaleListener(IStaleListener listener)
IObservable
addStaleListener in interface IObservablelistener - IObservable.addStaleListener(org.eclipse.core.databinding.observable.IStaleListener)public void addValueChangeListener(IValueChangeListener listener)
addValueChangeListener in interface IObservableValuelistener - IObservableValue.addValueChangeListener(org.eclipse.core.databinding.observable.value.IValueChangeListener)public void dispose()
IObservable
dispose in interface IObservablepublic Realm getRealm()
IObservableBecause observables can only be accessed from within one realm, and they always fire events on that realm, their state can be observed in an incremental way. It is always safe to call getters of an observable from within a change listener attached to that observable.
getRealm in interface IObservablepublic Object getValue()
IObservableValueRealm of the observable.
getValue in interface IObservableValuepublic Object getValueType()
IObservableValuenull if this
observable value is untyped.
getValueType in interface IObservableValuenullpublic boolean isStale()
IObservable
isStale in interface IObservablepublic void removeChangeListener(IChangeListener listener)
IObservable
removeChangeListener in interface IObservablelistener - public void removeStaleListener(IStaleListener listener)
IObservable
removeStaleListener in interface IObservablelistener - public void removeValueChangeListener(IValueChangeListener listener)
removeValueChangeListener in interface IObservableValuelistener - public void setValue(Object value)
IObservableValueRealm of the observable.
setValue in interface IObservableValuevalue - the value to setpublic static IStatus getStatusMerged(Collection validationStatusProviders)
MultiStatus. Returns an OK status result if all statuses from
the given validation status providers are the an OK status. Returns a
single status if there is only one non-OK status.
validationStatusProviders - a collection of validation status providers
public static IStatus getStatusMaxSeverity(Collection validationStatusProviders)
validationStatusProviders - a collection of validation status providers
|
Eclipse Platform Release 3.4 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.