Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.databinding.observable
Interface IObservable

All Known Subinterfaces:
IDecoratingObservable, IObservableCollection, IObservableList, IObservableMap, IObservableSet, IObservableValue, ISWTObservable, ISWTObservableList, ISWTObservableValue, IVetoableValue, IViewerObservable, IViewerObservableList, IViewerObservableSet, IViewerObservableValue
All Known Implementing Classes:
AbstractObservable, AbstractObservableList, AbstractObservableMap, AbstractObservableSet, AbstractObservableValue, AbstractVetoableValue, AggregateValidationStatus, BidiObservableMap, BidirectionalMap, CompositeMap, ComputedList, ComputedObservableMap, ComputedSet, ComputedValue, DateAndTimeObservableValue, DecoratingObservable, DecoratingObservableCollection, DecoratingObservableList, DecoratingObservableMap, DecoratingObservableSet, DecoratingObservableValue, DecoratingVetoableValue, DuplexingObservableValue, ListToSetAdapter, MappedSet, MultiList, ObservableList, ObservableMap, ObservableSet, SelectObservableValue, UnionSet, WritableList, WritableMap, WritableSet, WritableValue

public interface IObservable

An object with state that allows to listen for state changes.

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.

Since:
1.0
Restriction:
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.

Method Summary
 void addChangeListener ( IChangeListener listener)
          Adds the given change listener to the list of change listeners.
 void addDisposeListener ( IDisposeListener listener)
          Adds the given dispose listener to the list of dispose 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 isDisposed ()
          Returns whether the observable has been disposed
 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 removeDisposeListener ( IDisposeListener listener)
          Removes the given dispose listener from the list of dispose listeners.
 void removeStaleListener ( IStaleListener listener)
          Removes the given stale listener from the list of stale listeners.
 

Method Detail

getRealm

Realm getRealm()
Returns the realm for this observable. Unless otherwise specified, getters and setters must be accessed from within this realm. Listeners will be within this realm when they receive events from this observable.

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.

Returns:
the realm

addChangeListener

void addChangeListener(
IChangeListener listener)
Adds the given change listener to the list of change listeners. Change listeners are notified about changes of the state of this observable in a generic way, without specifying the change that happened. To get the changed state, a change listener needs to query for the current state of this observable.

Parameters:
listener -

removeChangeListener

void removeChangeListener(
IChangeListener listener)
Removes the given change listener from the list of change listeners. Has no effect if the given listener is not registered as a change listener.

Parameters:
listener -

addStaleListener

void addStaleListener(
IStaleListener listener)
Adds the given stale listener to the list of stale listeners. Stale listeners are notified when an observable object becomes stale, not when is becomes non-stale.

Parameters:
listener -
See Also:
isStale()

removeStaleListener

void removeStaleListener(
IStaleListener listener)
Removes the given stale listener from the list of stale listeners. Has no effect if the given listener is not registered as a stale listener.

Parameters:
listener -

isStale

boolean isStale()
Returns whether the state of this observable is stale and is expected to change soon. A non-stale observable that becomes stale will notify its stale listeners. A stale object that becomes non-stale does so by changing its state and notifying its change listeners, it does not notify its stale listeners about becoming non-stale. Clients that do not expect asynchronous changes may ignore staleness of observable objects.

Returns:
true if this observable's state is stale and will change soon.
"TrackedGetter"
- implementers must call ObservableTracker.getterCalled(IObservable).

addDisposeListener

void addDisposeListener(
IDisposeListener listener)
Adds the given dispose listener to the list of dispose listeners. Dispose listeners are notified when an observable has been disposed.

Parameters:
listener - the listener to add
Since:
1.2

removeDisposeListener

void removeDisposeListener(
IDisposeListener listener)
Removes the given dispose listener from the list of dispose listeners. Has no effect if the given listener is not registered as a dispose listener.

Parameters:
listener - the listener to remove
Since:
1.2

isDisposed

boolean isDisposed()
Returns whether the observable has been disposed

Returns:
whether the observable has been disposed
Since:
1.2

dispose

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.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

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


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire