|
Extension SDK 10.1.2 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Subject
interface defines the API to register observers
interested in receiving notifications of subject changes.
Classes that can be viewed by multiple views should implement the
Subject
interface in order to notify their observers
that changes have ocurred.
Observer
,
UpdateMessage
Field Summary | |
static int |
OBJECT_MODIFIED
|
Method Summary | |
void |
attach(Observer observer)
Registers an observer interested in being notified when the internal state of the class implementing the Subject interface
changes. |
void |
detach(Observer observer)
Unregisters an observer that is not interested anymore in being notified when the internal state of the class implementing the Subject
interface changes. |
void |
notifyObservers(java.lang.Object subject,
UpdateMessage change)
Notifies all observers that the state of the subject has changed. |
Field Detail |
public static final int OBJECT_MODIFIED
Method Detail |
public void attach(Observer observer)
Subject
interface
changes.
Implementors should do nothing when the same observer is added more
than once.
observer
- the Observer
interested in change notification
messages.public void detach(Observer observer)
Subject
interface changes.
Implementors should do nothing when the same observer is removed more
than once.
observer
- the Observer
disinterested in change
notification messages.public void notifyObservers(java.lang.Object subject, UpdateMessage change)
subject
- the subject whose state has changed.change
- what changed.
|
Extension SDK | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1997, 2004, Oracle. All rights reserved.