Packagefin.desktop
Classpublic class Notification
InheritanceNotification Inheritance flash.events.EventDispatcher

A Notification represents a window which is shown briefly to the user on the bottom-right corner of the primary monitor. A notification is typically used to alert the user of some important event which requires his or her attention. Multiple notifications can be generated at once but will queue if more than 5 are already displayed. Notifications can be dismissed by dragging them to the right with the mouse and can communicate securely with their invoking applications.



Public Methods
 MethodDefined By
  
Notification(options:NotificationOptions, callback:Function = null, errorCallback:Function = null)
Notification constructor
Notification
  
close(callback:Function = null, errorCallback:Function = null):void
Closes the notification
Notification
  
getInstances():Dictionary
[static]
Notification
  
sendMessage(message:Object, callback:Function = null, errorCallback:Function = null):void
Sends a message to the notification
Notification
  
sendMessageToApplication(message:Object, callback:Function = null, errorCallback:Function = null):void
Sends a message from the notification to the application that created the notification.
Notification
Constructor Detail
Notification()Constructor
public function Notification(options:NotificationOptions, callback:Function = null, errorCallback:Function = null)

Notification constructor

Parameters
options:NotificationOptions — The options of this notification
 
callback:Function (default = null) — A function that is called if successful in creating the notification
 
errorCallback:Function (default = null) — A function that is called if the method fails

Events
CLICK:NotificationEvent — [dispatched when user clicks on the notification]
 
CLOSED:NotificationEvent — [dispatched when notification is closed]
 
DISMISSED:NotificationEvent — [dispatched when dismissed by the user]
 
ERROR:NotificationEvent — [dispatched if there is an error]
 
MESSAGE:NotificationEvent — [dispatched when a message is received from the notification ]
 
SHOW:NotificationEvent — [dispatched notification is shown]
Method Detail
close()method
public function close(callback:Function = null, errorCallback:Function = null):void

Closes the notification

Parameters

callback:Function (default = null) — A function that is called if successful.
 
errorCallback:Function (default = null) — A function that is called if action failed.

getInstances()method 
public static function getInstances():Dictionary

Returns
Dictionary
sendMessage()method 
public function sendMessage(message:Object, callback:Function = null, errorCallback:Function = null):void

Sends a message to the notification

Parameters

message:Object — The JSON message to be sent to the notification
 
callback:Function (default = null) — A function that is called if successful.
 
errorCallback:Function (default = null) — A function that is called if action failed.

sendMessageToApplication()method 
public function sendMessageToApplication(message:Object, callback:Function = null, errorCallback:Function = null):void

Sends a message from the notification to the application that created the notification. The message is handled by the notification's onMessage callback.

Parameters

message:Object — The JSON message to be sent to the application
 
callback:Function (default = null) — A function that is called if successful.
 
errorCallback:Function (default = null) — A function that is called if action failed.