Package | org.puremvc.as3.interfaces |
Interface | public interface IView |
Implementors | View |
In PureMVC, IView
implementors assume these responsibilities:
In PureMVC, the View
class assumes these responsibilities:
IMediator
instances.IMediators
.INotification
in the application.IObservers
to an INotification
's observer list.INotification
.IObservers
of a given INotification
when it broadcast.See also
Method | Defined by | ||
---|---|---|---|
hasMediator(mediatorName:String):Boolean
Check if a Mediator is registered or not
| IView | ||
notifyObservers(note:INotification):void
Notify the
IObservers for a particular INotification . | IView | ||
registerMediator(mediator:IMediator):void
Register an
IMediator instance with the View . | IView | ||
registerObserver(notificationName:String, observer:IObserver):void
Register an
IObserver to be notified
of INotifications with a given name. | IView | ||
removeMediator(mediatorName:String):IMediator
Remove an
IMediator from the View . | IView | ||
removeObserver(notificationName:String, notifyContext:Object):void
Remove a group of observers from the observer list for a given Notification name.
| IView | ||
retrieveMediator(mediatorName:String):IMediator
Retrieve an
IMediator from the View . | IView |
hasMediator | () | method |
public function hasMediator(mediatorName:String):Boolean
Check if a Mediator is registered or not
ParametersmediatorName:String |
Boolean — whether a Mediator is registered with the given mediatorName .
|
notifyObservers | () | method |
public function notifyObservers(note:INotification):void
Notify the IObservers
for a particular INotification
.
All previously attached IObservers
for this INotification
's
list are notified and are passed a reference to the INotification
in
the order in which they were registered.
note:INotification — the INotification to notify IObservers of.
|
registerMediator | () | method |
public function registerMediator(mediator:IMediator):void
Register an IMediator
instance with the View
.
Registers the IMediator
so that it can be retrieved by name,
and further interrogates the IMediator
for its
INotification
interests.
If the IMediator
returns any INotification
names to be notified about, an Observer
is created encapsulating
the IMediator
instance's handleNotification
method
and registering it as an Observer
for all INotifications
the
IMediator
is interested in.
mediator:IMediator — the name to associate with this IMediator instance
|
registerObserver | () | method |
public function registerObserver(notificationName:String, observer:IObserver):void
Register an IObserver
to be notified
of INotifications
with a given name.
notificationName:String — the name of the INotifications to notify this IObserver of
|
|
observer:IObserver — the IObserver to register
|
removeMediator | () | method |
public function removeMediator(mediatorName:String):IMediator
Remove an IMediator
from the View
.
mediatorName:String — name of the IMediator instance to be removed.
|
IMediator —
the IMediator that was removed from the View
|
removeObserver | () | method |
public function removeObserver(notificationName:String, notifyContext:Object):void
Remove a group of observers from the observer list for a given Notification name.
Parameters
notificationName:String — which observer list to remove from
|
|
notifyContext:Object — removed the observers with this object as their notifyContext
|
retrieveMediator | () | method |
public function retrieveMediator(mediatorName:String):IMediator
Retrieve an IMediator
from the View
.
mediatorName:String — the name of the IMediator instance to retrieve.
|
IMediator —
the IMediator instance previously registered with the given mediatorName .
|