| Package | vegas.events |
| Class | public class FrontController |
| Inheritance | FrontController CoreObject |
A front controller centralizes functions such as view selection, security, and templating, and applies them consistently across all pages or views. Consequently, when the behavior of these functions need to change, only a small part of the application needs to be changed: the controller and its helper classes.
| Method | Defined by | ||
|---|---|---|---|
|
FrontController(channel:String = null, target:EventDispatcher = null)
Creates a new FrontController instance.
| FrontController | ||
|
clear():void
Removes all entries in the FrontController.
| FrontController | ||
|
contains(eventName:String):Boolean
Returns 'true' if the eventName is registered in the FrontController.
| FrontController | ||
|
fireEvent(e:*):void
Dispatch an event into the FrontController
| FrontController | ||
|
flush():void
[static]
Flush all global FrontController singletons.
| FrontController | ||
|
Returns the internal EventDispatcher singleton reference of this FrontController.
| FrontController | ||
|
getInstance(channel:String = null):FrontController
[static]
Returns a global
FrontController singleton. | FrontController | ||
|
getListener(eventName:String):*
Returns a EventListener
| FrontController | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
insert(eventName:String, listener:*):void
Add a new entry into the FrontController.
| FrontController | ||
|
insertBatch(eventName:String, listener:EventListener):void
Adds a new EventListener into an EventListenerBatch in the FrontController.
| FrontController | ||
|
isEventListenerBatch(eventName:String):Boolean
Indicates if the specified eventlistener registered with the 'eventName' value in argument is an EventListenerBatch instance.
| FrontController | ||
|
remove(eventName:String):void
Remove an entry into the FrontController.
| FrontController | ||
|
removeInstance(channel:String):Boolean
[static]
Removes a global FrontController singleton.
| FrontController | ||
|
setEventDispatcher(target:EventDispatcher):void
Sets the EventDispatcher reference of this FrontController.
| FrontController | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
|
size():int
Returns the number of elements in the controller.
| FrontController | ||
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
![]() |
toString():String
Returns the string representation of this instance.
| CoreObject | |
| FrontController | () | constructor |
public function FrontController(channel:String = null, target:EventDispatcher = null)Creates a new FrontController instance.
Parameterschannel:String (default = null) — the channel of this FrontController.
|
|
target:EventDispatcher (default = null) — the EventDispatcher reference to switch with the default EventDispatcher singleton in the controller.
Example :
var controller:FrontController = new FrontController() ;
|
| clear | () | method |
public function clear():voidRemoves all entries in the FrontController.
| contains | () | method |
public function contains(eventName:String):BooleanReturns 'true' if the eventName is registered in the FrontController.
ParameterseventName:String |
Boolean |
| fireEvent | () | method |
public function fireEvent(e:*):voidDispatch an event into the FrontController
Parameterse:* |
| flush | () | method |
public static function flush():voidFlush all global FrontController singletons.
| getEventDispatcher | () | method |
public function getEventDispatcher():EventDispatcherReturns the internal EventDispatcher singleton reference of this FrontController.
ReturnsEventDispatcher —
the internal EventDispatcher singleton reference of this FrontController.
|
| getInstance | () | method |
public static function getInstance(channel:String = null):FrontController
Returns a global FrontController singleton.
channel:String (default = null) — The channel of the FrontController (default the EventDispatcher.DEFAULT_SINGLETON_NAME value).
|
FrontController —
a global FrontController singleton.
|
| getListener | () | method |
public function getListener(eventName:String):*Returns a EventListener
ParameterseventName:String — eventName:String
|
* — an EventListener or a event callback Function.
|
| insert | () | method |
public function insert(eventName:String, listener:*):voidAdd a new entry into the FrontController.
ParameterseventName:String |
|
listener:* — or listener:Function
|
— If the 'eventName' value in argument is null or undefined.
|
|
— If the 'listener' object in argument is null or undefined.
|
| insertBatch | () | method |
public function insertBatch(eventName:String, listener:EventListener):void
Adds a new EventListener into an EventListenerBatch in the FrontController.
If this listener argument is 'null' or 'undefined' and if the eventName argument isn't register with an EventListenerBatch in the FrontController,
an empty EventListenerBatch is created and register in the FrontController with the specified 'eventName'.
eventName:String — The name of the event type.
|
|
listener:EventListener — (optional) The EventListener mapped in the FrontController with the specified event type (This listener is added in an EventListenerBatch).
|
— If the 'eventName' value in argument not must be 'null' or 'undefined'.
|
| isEventListenerBatch | () | method |
public function isEventListenerBatch(eventName:String):BooleanIndicates if the specified eventlistener registered with the 'eventName' value in argument is an EventListenerBatch instance.
ParameterseventName:String |
Boolean — true if the specified eventlistener registered with the 'eventName' value in argument is an EventListenerBatch instance.
|
| remove | () | method |
public function remove(eventName:String):voidRemove an entry into the FrontController.
ParameterseventName:String — The name of the event type.
|
| removeInstance | () | method |
public static function removeInstance(channel:String):BooleanRemoves a global FrontController singleton.
Parameterschannel:String — The channel of the FrontController to remove.
|
Boolean |
| setEventDispatcher | () | method |
public function setEventDispatcher(target:EventDispatcher):voidSets the EventDispatcher reference of this FrontController.
Parameterstarget:EventDispatcher — The EventDispatcher reference of this FrontController.
|
| size | () | method |
public function size():intReturns the number of elements in the controller.
Returnsint — the number of elements in the controller.
|