Packagefeathers.controls.popups
Classpublic class BottomDrawerPopUpContentManager
InheritanceBottomDrawerPopUpContentManager Inheritance starling.events.EventDispatcher
Implements IPersistentPopUpContentManager, IPopUpContentManagerWithPrompt

Product Version : Feathers 2.3.0

Displays pop-up content as a mobile-style drawer that opens from the bottom of the stage.



Public Properties
 PropertyDefined By
  closeButtonFactory : Function = null
Creates the Button that closes the pop-up.
BottomDrawerPopUpContentManager
  closeButtonLabel : String
The text to display in the label of the close button.
BottomDrawerPopUpContentManager
  customCloseButtonStyleName : String = "null"
Adds a style name to the close button.
BottomDrawerPopUpContentManager
  customPanelStyleName : String = "null"
Adds a style name to the Panel that wraps the content.
BottomDrawerPopUpContentManager
  isOpen : Boolean
[read-only] Indicates if the pop-up content is open or not.
BottomDrawerPopUpContentManager
  openOrCloseDuration : Number
The duration, in seconds, of the animation to open or close the pop-up.
BottomDrawerPopUpContentManager
  openOrCloseEase : Object
The easing function used for opening or closing the pop-up.
BottomDrawerPopUpContentManager
  overlayFactory : Function
This function may be used to customize the modal overlay displayed by the pop-up manager.
BottomDrawerPopUpContentManager
  panelFactory : Function = null
Creates the Panel that wraps the content.
BottomDrawerPopUpContentManager
  prompt : String
A prompt to display in the panel's title.
BottomDrawerPopUpContentManager
Public Methods
 MethodDefined By
  
Constructor.
BottomDrawerPopUpContentManager
  
close():void
Closes the pop-up content.
BottomDrawerPopUpContentManager
  
dispose():void
Cleans up the manager.
BottomDrawerPopUpContentManager
  
open(content:DisplayObject, source:DisplayObject):void
Displays the pop-up content.
BottomDrawerPopUpContentManager
Events
 Event Summary Defined By
  Dispatched when the pop-up content closes.BottomDrawerPopUpContentManager
  Dispatched when the pop-up content opens.BottomDrawerPopUpContentManager
Property Detail
closeButtonFactoryproperty
public var closeButtonFactory:Function = null

Creates the Button that closes the pop-up.

In the following example, a custom close button factory is provided:

manager.closeButtonFactory = function():Button
{
    var closeButton:Button = new Button();
    closeButton.defaultSkin = new Image( texture );
    return closeButton;
};

The default value is null.

See also

closeButtonLabelproperty 
closeButtonLabel:String

The text to display in the label of the close button.

In the following example, a custom close button label is provided:

manager.closeButtonLabel = "Save";

The default value is "Done".


Implementation
    public function get closeButtonLabel():String
    public function set closeButtonLabel(value:String):void
customCloseButtonStyleNameproperty 
public var customCloseButtonStyleName:String = "null"

Adds a style name to the close button.

In the following example, a custom style name is provided:

manager.customCloseButtonStyleName = "my-custom-close-button";

The default value is null.

See also

customPanelStyleNameproperty 
public var customPanelStyleName:String = "null"

Adds a style name to the Panel that wraps the content.

In the following example, a custom style name is provided:

manager.customPanelStyleName = "my-custom-pop-up-panel";

The default value is null.

See also

isOpenproperty 
isOpen:Boolean  [read-only]

Indicates if the pop-up content is open or not.


Implementation
    public function get isOpen():Boolean
openOrCloseDurationproperty 
openOrCloseDuration:Number

The duration, in seconds, of the animation to open or close the pop-up.

In the following example, the duration is changed to 2 seconds:

manager.openOrCloseDuration = 2.0;

The default value is 0.5.


Implementation
    public function get openOrCloseDuration():Number
    public function set openOrCloseDuration(value:Number):void
openOrCloseEaseproperty 
openOrCloseEase:Object

The easing function used for opening or closing the pop-up.

In the following example, the animation ease is changed:

manager.openOrCloseEase = Transitions.EASE_IN_OUT;

The default value is starling.animation.Transitions.EASE_OUT.


Implementation
    public function get openOrCloseEase():Object
    public function set openOrCloseEase(value:Object):void

See also

overlayFactoryproperty 
overlayFactory:Function

This function may be used to customize the modal overlay displayed by the pop-up manager. If the value of overlayFactory is null, the pop-up manager's default overlay factory will be used instead.

This function is expected to have the following signature:

function():DisplayObject

In the following example, the overlay is customized:

manager.overlayFactory = function():DisplayObject
{
    var quad:Quad = new Quad(1, 1, 0xff00ff);
    quad.alpha = 0;
    return quad;
};

The default value is null.


Implementation
    public function get overlayFactory():Function
    public function set overlayFactory(value:Function):void

See also

panelFactoryproperty 
public var panelFactory:Function = null

Creates the Panel that wraps the content.

In the following example, a custom panel factory is provided:

manager.panelFactory = function():Panel
{
    var panel:Panel = new Panel();
    panel.backgroundSkin = new Image( texture );
    return panel;
};

The default value is null.

See also

promptproperty 
prompt:String

A prompt to display in the panel's title.

Note: If using this manager with a component that has its own prompt (like PickerList), this value may be overridden by the component.

In the following example, a custom title is provided:

manager.prompt = "Pick a value";

The default value is null.


Implementation
    public function get prompt():String
    public function set prompt(value:String):void
Constructor Detail
BottomDrawerPopUpContentManager()Constructor
public function BottomDrawerPopUpContentManager()

Constructor.

Method Detail
close()method
public function close():void

Closes the pop-up content. If it is not opened, nothing happens.

dispose()method 
public function dispose():void

Cleans up the manager.

open()method 
public function open(content:DisplayObject, source:DisplayObject):void

Displays the pop-up content.

Parameters

content:DisplayObject — The content for the pop-up content manager to display.
 
source:DisplayObject — The source of the pop-up. May be used to position and/or size the pop-up. May be completely ignored instead.

Event Detail
close Event
Event Object Type: starling.events.Event
Event.type property = starling.events.Event.CLOSE

Dispatched when the pop-up content closes.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
datanull
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.

open Event  
Event Object Type: starling.events.Event
Event.type property = starling.events.Event.OPEN

Dispatched when the pop-up content opens.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
datanull
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.