Packagefeathers.controls.popups
Classpublic class DropDownPopUpContentManager
InheritanceDropDownPopUpContentManager Inheritance starling.events.EventDispatcher
Implements IPopUpContentManager

Displays pop-up content as a desktop-style drop-down.



Public Properties
 PropertyDefined By
  fitContentMinWidthToOrigin : Boolean
If enabled, the pop-up content's minWidth property will be set to the width property of the origin, if it is smaller.
DropDownPopUpContentManager
  gap : Number
The space, in pixels, between the source and the pop-up.
DropDownPopUpContentManager
  isModal : Boolean
Determines if the pop-up will be modal or not.
DropDownPopUpContentManager
  isOpen : Boolean
[read-only] Indicates if the pop-up content is open or not.
DropDownPopUpContentManager
  overlayFactory : Function
If isModal is true, this function may be used to customize the modal overlay displayed by the pop-up manager.
DropDownPopUpContentManager
  primaryDirection : String
The space, in pixels, between the source and the pop-up.
DropDownPopUpContentManager
Public Methods
 MethodDefined By
  
Constructor.
DropDownPopUpContentManager
  
close():void
Closes the pop-up content.
DropDownPopUpContentManager
  
dispose():void
Cleans up the manager.
DropDownPopUpContentManager
  
open(content:DisplayObject, source:DisplayObject):void
Displays the pop-up content.
DropDownPopUpContentManager
Events
 Event Summary Defined By
  Dispatched when the pop-up content closes.DropDownPopUpContentManager
  Dispatched when the pop-up content opens.DropDownPopUpContentManager
Public Constants
 ConstantDefined By
  PRIMARY_DIRECTION_DOWN : String = down
[static] The pop-up content will be positioned below the source, if possible.
DropDownPopUpContentManager
  PRIMARY_DIRECTION_UP : String = up
[static] The pop-up content will be positioned above the source, if possible.
DropDownPopUpContentManager
Property Detail
fitContentMinWidthToOriginproperty
fitContentMinWidthToOrigin:Boolean

If enabled, the pop-up content's minWidth property will be set to the width property of the origin, if it is smaller.

The default value is true.


Implementation
    public function get fitContentMinWidthToOrigin():Boolean
    public function set fitContentMinWidthToOrigin(value:Boolean):void
gapproperty 
gap:Number

The space, in pixels, between the source and the pop-up.


Implementation
    public function get gap():Number
    public function set gap(value:Number):void
isModalproperty 
isModal:Boolean

Determines if the pop-up will be modal or not.

Note: If you change this value while a pop-up is displayed, the new value will not go into effect until the pop-up is removed and a new pop-up is added.

In the following example, the pop-up is modal:

         manager.isModal = true;

The default value is false.


Implementation
    public function get isModal():Boolean
    public function set isModal(value:Boolean):void
isOpenproperty 
isOpen:Boolean  [read-only]

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


Implementation
    public function get isOpen():Boolean
overlayFactoryproperty 
overlayFactory:Function

If isModal is true, 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.isModal = true;
         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

primaryDirectionproperty 
primaryDirection:String

The space, in pixels, between the source and the pop-up.

The default value is DropDownPopUpContentManager.PRIMARY_DIRECTION_DOWN.


Implementation
    public function get primaryDirection():String
    public function set primaryDirection(value:String):void

See also

Constructor Detail
DropDownPopUpContentManager()Constructor
public function DropDownPopUpContentManager()

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.

Constant Detail
PRIMARY_DIRECTION_DOWNConstant
public static const PRIMARY_DIRECTION_DOWN:String = down

The pop-up content will be positioned below the source, if possible.

See also

PRIMARY_DIRECTION_UPConstant 
public static const PRIMARY_DIRECTION_UP:String = up

The pop-up content will be positioned above the source, if possible.

See also