API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.util. Observable View Source
Author(s)
Chris Warth
Since
JDK1.0
Version
1.39, 11/17/05
Serial
Hierarchy
 Object
      Observable
Implements
Subclasses
Description
public class Observable
  This class represents an observable object, or "data" in the model-view paradigm.
Constructors
public Observable ()
Construct an Observable with zero Observers.
Methods
Hide/Show inherited methods
publicsynchronized void addObserver (Observer o)
  Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.
protectedsynchronized void clearChanged ()
  Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.
publicsynchronized int countObservers ()
  Returns the number of observers of this Observable object.
publicsynchronized void deleteObserver (Observer o)
  Deletes an observer from the set of observers of this object.
publicsynchronized void deleteObservers ()
Clears the observer list so that this object no longer has any observers.
publicsynchronized boolean hasChanged ()
  Tests if this object has changed.
public void notifyObservers ()
  If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
public void notifyObservers (Object arg)
  If this object has changed, as indicated by the hasChanged method, then notify all of its observers and then call the clearChanged method to indicate that this object has no longer changed.
protectedsynchronized void setChanged ()
Marks this Observable object as having been changed; the hasChanged method will now return true.
Fields
Hide/Show inherited fields
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar