|
Eclipse Platform Release 3.3 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
An object with state that allows to listen for state changes.
This interface is not intended to be implemented by clients. Clients should instead subclass one of the classes in the framework that implement this interface. Note that direct implementers of this interface outside of the framework will be broken in future releases when methods are added to this interface.
Implementations must not manage listeners themselves, listener management
must be delegated to a private instance of type ChangeSupport
if
it is not inherited from AbstractObservable
.
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 |
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. |
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. |
Method Detail |
public Realm getRealm()
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.
public void addChangeListener(IChangeListener listener)
listener
- public void removeChangeListener(IChangeListener listener)
listener
- public void addStaleListener(IStaleListener listener)
listener
- isStale()
public void removeStaleListener(IStaleListener listener)
listener
- public boolean isStale()
ObservableTracker.getterCalled(IObservable)
.public void dispose()
|
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.