oracle.ide.addin
Interface Subject
- All Known Subinterfaces:
- Container, DerivedLibrary, Document, JavaNode, JotFile, Layout, Library, LibraryList, Node, TextDocument, VetoableSubject, WorkEnvironment
- All Known Implementing Classes:
- IdeSubject, IdeLayout, ObservableDataFolder, Connections, JotManager, JPaths, JLibraryManager
- public interface Subject
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.
- See Also:
oracle.ide.Observer
,
oracle.ide.UpdateMessage
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. |
OBJECT_MODIFIED
public static final int OBJECT_MODIFIED
attach
public void attach(Observer observer)
- Registers an observer interested in being notified when the internal
state of the class implementing the
Subject
interface
changes.
Implementors should do nothing when the same observer is added more
than once.
- Parameters:
observer
- the Observer
interested in change notification
messages.
detach
public 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.
Implementors should do nothing when the same observer is removed more
than once.
- Parameters:
observer
- the Observer
disinterested in change
notification messages.
notifyObservers
public void notifyObservers(java.lang.Object subject,
UpdateMessage change)
- Notifies all observers that the state of the subject has changed.
- Parameters:
subject
- the subject whose state has changed.change
- what changed.