ObservableNameObservableSynopsis
DescriptionSubclasses of the Observable class are used to implement the model portion of the model-view paradigm. The idea is that an Observable object, the model, represents some data that is being manipulated through a user interface, while Observer objects provide the user with a view of the data. When the Observable object is modified, it tells the Observer objects that the model has been modified by calling notifyObservers(). An Observer object registers with an Observable object to receive notifications when the Observable is modified. The Observer object is then notified of changes via the update() method. Class Summary
public class java.util.Observable extends java.lang.Object { // Constructors public Observable(); // Instance Methods public synchronized void addObserver(Observer o); public synchronized int countObservers(); public synchronized void deleteObserver(Observer o); public synchronized void deleteObservers(); public synchronized boolean hasChanged(); public void notifyObservers(); public void notifyObservers(Object arg); // Protected Instance Methods protected synchronized void clearChanged(); protected synchronized void setChanged(); } ConstructorsObservablepublic Observable()
InstanceMethodsaddObserverpublic synchronized void addObserver(Observer o)
countObserverspublic synchronized int countObservers()
deleteObserverpublic synchronized void deleteObserver(Observer o)
deleteObserverspublic synchronized void deleteObservers()
hasChangedpublic synchronized boolean hasChanged()
notifyObserverspublic void notifyObservers()
public void notifyObservers(Object arg)
Protected Instance MethodsclearChangedprotected synchronized void clearChanged()
setChangedprotected synchronized void setChanged()
Inherited Methods
See AlsoObserver |
|