Packages This Package Prev Next Index
public class java.util.Observable
extends java.lang.Object (I-§1.12)
{
// Constructors
public Observable(); §3.5.1
// Methods
public void addObserver(Observer o); §3.5.2
protected void clearChanged(); §3.5.3
public int countObservers(); §3.5.4
public void deleteObserver(Observer o); §3.5.5
public void deleteObservers(); §3.5.6
public boolean hasChanged(); §3.5.7
public void notifyObservers(); §3.5.8
public void notifyObservers(Object arg); §3.5.9
protected void setChanged(); §3.5.10
}
This class represents an observable object, or "data" in the model-view paradigm. It can be
subclassed to represent an object that the application wants to have observed.
An observable object can have one or more observers (I-§3.12). After an observerable instance changes, an application calling the Observerable's notifyObservers method (§3.5.8, §3.5.9) causes all of its observers to be notified of the change by a call to their update method (I-§3.12.1).
public Observable()
public void addObserver(Observer o)
o
- an observer to be added
protected void clearChanged()
public int countObservers()
public void deleteObserver(Observer o)
o
- the observer to be deleted
public void deleteObservers()
public boolean hasChanged()
public void notifyObservers()
public void notifyObservers(Object arg)
arg
- any object.
protected void setChanged()
Packages This Package Prev Next IndexJava API Document (HTML generated by dkramer on April 22, 1996)