|
Eclipse Platform Release 3.3 |
|||||||||||
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 bindings. |
static int |
MERGED
Constant denoting an aggregation strategy that merges multiple non-OK status objects in a MultiStatus . |
Constructor Summary | |
---|---|
AggregateValidationStatus(IObservableCollection bindings,
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 bindings)
Returns a status that always returns the most severe status from the given bindings. |
static IStatus |
getStatusMerged(Collection bindings)
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 bindings 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 ValuesConstructor Detail |
public AggregateValidationStatus(IObservableCollection bindings, int strategy)
bindings
- an observable collection containing elements of type IStatusstrategy
- a strategy constant, one of MERGED
or
MAX_SEVERITY
.Method Detail |
public void addChangeListener(IChangeListener listener)
IObservable
addChangeListener
in interface IObservable
listener
- IObservable.addChangeListener(org.eclipse.core.databinding.observable.IChangeListener)
public void addStaleListener(IStaleListener listener)
IObservable
addStaleListener
in interface IObservable
listener
- IObservable.addStaleListener(org.eclipse.core.databinding.observable.IStaleListener)
public void addValueChangeListener(IValueChangeListener listener)
addValueChangeListener
in interface IObservableValue
listener
- IObservableValue.addValueChangeListener(org.eclipse.core.databinding.observable.value.IValueChangeListener)
public void dispose()
IObservable
dispose
in interface IObservable
public Realm getRealm()
IObservable
Because 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 IObservable
public Object getValue()
IObservableValue
Realm
of the observable.
getValue
in interface IObservableValue
public Object getValueType()
IObservableValue
null
if this
observable value is untyped.
getValueType
in interface IObservableValue
null
public boolean isStale()
IObservable
isStale
in interface IObservable
public void removeChangeListener(IChangeListener listener)
IObservable
removeChangeListener
in interface IObservable
listener
- public void removeStaleListener(IStaleListener listener)
IObservable
removeStaleListener
in interface IObservable
listener
- public void removeValueChangeListener(IValueChangeListener listener)
removeValueChangeListener
in interface IObservableValue
listener
- public void setValue(Object value)
IObservableValue
Realm
of the observable.
setValue
in interface IObservableValue
value
- the value to setpublic static IStatus getStatusMerged(Collection bindings)
MultiStatus
. Returns an OK status result if all statuses from
the given bindings are the an OK status. Returns a single status if there
is only one non-OK status.
bindings
- a collection of bindings
public static IStatus getStatusMaxSeverity(Collection bindings)
bindings
- a collection of bindings
|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2007. All rights reserved.