Packagecom.flexicious.controls.toaster
Classpublic class Toaster
InheritanceToaster Inheritance flash.events.EventDispatcher

Class that provides toaster style notifications for flex. Use the showToaster static method to create toasters.



Public Properties
 PropertyDefined By
  currentToaster : IToasterMessageRenderer
The current toaster renderer.
Toaster
  DEFAULT_TOASTER : IFactory
[static] The default toaster renderer.
Toaster
Public Methods
 MethodDefined By
  
Toaster
  
destroyToaster(skipMove:Boolean = false):Boolean
Toaster
  
getAnimations(from:Point, to:Point, moveAnimate:Boolean, fadeAnimate:Boolean, animationDuration:Number, closing:Boolean = false):Parallel
Toaster
  
getBoundsForAnimation(toasterPosition:String, closing:Boolean = false):Array
Returns the from an to points
Toaster
  
showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true, icon:Object = null):Boolean
Shows the given toaster message
Toaster
  
showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true):Toaster
[static] Shows the given toaster message
Toaster
Protected Methods
 MethodDefined By
  
onClosingEffectEnd(event:EffectEvent):void
Toaster
  
onOpeningEffectEnd(event:EffectEvent):void
Toaster
Events
 Event Summary Defined By
  When the toaster item has closed.Toaster
  When the toaster item is about to close, prior to the animationToaster
  When the toaster item is shown for the first time, post the animationToaster
  When the toaster item is showning for the first time, prior to the animation.Toaster
Public Constants
 ConstantDefined By
  POSITION_BOTTOM_CENTER : String = BOTTOM_CENTER
[static]
Toaster
  POSITION_BOTTOM_LEFT : String = BOTTOM_LEFT
[static]
Toaster
  POSITION_BOTTOM_RIGHT : String = BOTTOM_RIGHT
[static]
Toaster
  POSITION_MIDDLE_CENTER : String = MIDDLE_CENTER
[static]
Toaster
  POSITION_MIDDLE_LEFT : String = MIDDLE_LEFT
[static]
Toaster
  POSITION_MIDDLE_RIGHT : String = MIDDLE_RIGHT
[static]
Toaster
  POSITION_TOP_CENTER : String = TOP_CENTER
[static]
Toaster
  POSITION_TOP_LEFT : String = TOP_LEFT
[static]
Toaster
  POSITION_TOP_RIGHT : String = TOP_RIGHT
[static]
Toaster
Property Detail
currentToasterproperty
public var currentToaster:IToasterMessageRenderer

The current toaster renderer. Is null when toaster is not showing

DEFAULT_TOASTERproperty 
public static var DEFAULT_TOASTER:IFactory

The default toaster renderer.

Constructor Detail
Toaster()Constructor
public function Toaster()



Method Detail
destroyToaster()method
public function destroyToaster(skipMove:Boolean = false):Boolean

Parameters

skipMove:Boolean (default = false)

Returns
Boolean
getAnimations()method 
public function getAnimations(from:Point, to:Point, moveAnimate:Boolean, fadeAnimate:Boolean, animationDuration:Number, closing:Boolean = false):Parallel

Parameters

from:Point
 
to:Point
 
moveAnimate:Boolean
 
fadeAnimate:Boolean
 
animationDuration:Number
 
closing:Boolean (default = false)

Returns
Parallel
getBoundsForAnimation()method 
public function getBoundsForAnimation(toasterPosition:String, closing:Boolean = false):Array

Returns the from an to points

Parameters

toasterPosition:String
 
closing:Boolean (default = false)

Returns
Array
onClosingEffectEnd()method 
protected function onClosingEffectEnd(event:EffectEvent):void

Parameters

event:EffectEvent

onOpeningEffectEnd()method 
protected function onOpeningEffectEnd(event:EffectEvent):void

Parameters

event:EffectEvent

showToaster()method 
public function showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true, icon:Object = null):Boolean

Shows the given toaster message

Parameters

message:String — The message to display in the toaster notification
 
toasterPosition:String (default = NaN) — A classfactory for the actual renderer control. Defaults to DefaultToasterRenderer.
 
toasterRenderer:IFactory (default = null) — Number of milli seconds to animate the move or the fade animation for the toaster to appear and disappear. Defaults to 1000
 
animationDuration:Number (default = 1000) — Number of milli seconds to keep the toaster visible. Defaults to 5000
 
visibleDuration:Number (default = 5000) — The position for the toaster. One of the Toaster.POSITION_XXXX constants. Defaults to Toaster.POSITION_BOTTOM_RIGHT
 
moveAnimate:Boolean (default = true) — Whether to use the move animation.
 
fadeAnimate:Boolean (default = true) — Whether to use the fade animation.
 
icon:Object (default = null) — An object that can be passed into the source property associated with the toaster renderer.

Returns
Boolean
showToaster()method 
public static function showToaster(message:String, toasterPosition:String, toasterRenderer:IFactory = null, animationDuration:Number = 1000, visibleDuration:Number = 5000, moveAnimate:Boolean = true, fadeAnimate:Boolean = true):Toaster

Shows the given toaster message

Parameters

message:String — The message to display in the toaster notification
 
toasterPosition:String (default = NaN) — A classfactory for the actual renderer control. Defaults to DefaultToasterRenderer.
 
toasterRenderer:IFactory (default = null) — Number of milli seconds to animate the move or the fade animation for the toaster to appear and disappear. Defaults to 1000
 
animationDuration:Number (default = 1000) — Number of milli seconds to keep the toaster visible. Defaults to 5000
 
visibleDuration:Number (default = 5000) — The position for the toaster. One of the Toaster.POSITION_XXXX constants. Defaults to Toaster.POSITION_BOTTOM_RIGHT
 
moveAnimate:Boolean (default = true) — Whether to use the move animation.
 
fadeAnimate:Boolean (default = true) — Whether to use the fade animation.

Returns
Toaster — The toaster instance used to show the toaster.
Event Detail
toasterClosed Event

When the toaster item has closed.

toasterClosing Event  

When the toaster item is about to close, prior to the animation

toasterOpen Event  

When the toaster item is shown for the first time, post the animation

toasterOpening Event  

When the toaster item is showning for the first time, prior to the animation.

Constant Detail
POSITION_BOTTOM_CENTERConstant
public static const POSITION_BOTTOM_CENTER:String = BOTTOM_CENTER

POSITION_BOTTOM_LEFTConstant 
public static const POSITION_BOTTOM_LEFT:String = BOTTOM_LEFT

POSITION_BOTTOM_RIGHTConstant 
public static const POSITION_BOTTOM_RIGHT:String = BOTTOM_RIGHT

POSITION_MIDDLE_CENTERConstant 
public static const POSITION_MIDDLE_CENTER:String = MIDDLE_CENTER

POSITION_MIDDLE_LEFTConstant 
public static const POSITION_MIDDLE_LEFT:String = MIDDLE_LEFT

POSITION_MIDDLE_RIGHTConstant 
public static const POSITION_MIDDLE_RIGHT:String = MIDDLE_RIGHT

POSITION_TOP_CENTERConstant 
public static const POSITION_TOP_CENTER:String = TOP_CENTER

POSITION_TOP_LEFTConstant 
public static const POSITION_TOP_LEFT:String = TOP_LEFT

POSITION_TOP_RIGHTConstant 
public static const POSITION_TOP_RIGHT:String = TOP_RIGHT