| Package | feathers.controls.popups |
| Class | public class CalloutPopUpContentManager |
| Inheritance | CalloutPopUpContentManager EventDispatcher Object |
| Implements | IPopUpContentManager |
| Product Version : | Feathers 1.0.0 |
See also
| Property | Defined By | ||
|---|---|---|---|
| calloutFactory : Function
The factory used to create the Callout instance. | CalloutPopUpContentManager | ||
| isModal : Boolean = true
Determines if the callout will be modal or not. | CalloutPopUpContentManager | ||
| isOpen : Boolean [read-only]
Indicates if the pop-up content is open or not. | CalloutPopUpContentManager | ||
| overlayFactory : Function
If isModal is true, this function may be
used to customize the modal overlay displayed by the pop-up manager. | CalloutPopUpContentManager | ||
| supportedPositions : Vector.<String>
The position of the callout, relative to its origin. | CalloutPopUpContentManager | ||
| Method | Defined By | ||
|---|---|---|---|
Constructor. | CalloutPopUpContentManager | ||
![]() | addEventListener(type:String, listener:Function):void Registers an event listener at a certain object. | EventDispatcher | |
close():void
Closes the pop-up content. | CalloutPopUpContentManager | ||
![]() | dispatchEvent(event:Event):void Dispatches an event to all objects that have registered listeners for its type. | EventDispatcher | |
![]() | dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void Dispatches an event with the given parameters to all objects that have registered
listeners for the given type. | EventDispatcher | |
dispose():void
Cleans up the manager. | CalloutPopUpContentManager | ||
![]() | hasEventListener(type:String, listener:Function = null):Boolean If called with one argument, figures out if there are any listeners registered for
the given event type. | EventDispatcher | |
Displays the pop-up content. | CalloutPopUpContentManager | ||
![]() | removeEventListener(type:String, listener:Function):void Removes an event listener from the object. | EventDispatcher | |
![]() | removeEventListeners(type:String = null):void Removes all event listeners with a certain type, or all of them if type is null. | EventDispatcher | |
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the pop-up content closes. | CalloutPopUpContentManager | |||
| Dispatched when the pop-up content opens. | CalloutPopUpContentManager | |||
| calloutFactory | property |
public var calloutFactory:Function
The factory used to create the Callout instance. If
null, Callout.calloutFactory() will be used.
Note: If you change this value while a callout is open, the new value will not go into effect until the callout is closed and a new callout is opened.
The default value is null.
See also
| isModal | property |
public var isModal:Boolean = trueDetermines if the callout will be modal or not.
Note: If you change this value while a callout is open, the new value will not go into effect until the callout is closed and a new callout is opened.
In the following example, the callout is not modal:
manager.isModal = false; The default value is true.
| isOpen | property |
isOpen:Boolean [read-only] Indicates if the pop-up content is open or not.
public function get isOpen():Boolean| overlayFactory | property |
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.
public function get overlayFactory():Function public function set overlayFactory(value:Function):voidSee also
| supportedPositions | property |
public var supportedPositions:Vector.<String>
The position of the callout, relative to its origin. Accepts a
Vector.<String> containing one or more of the
constants from feathers.layout.RelativePosition or
null. If null, the callout will attempt to
position itself using values in the following order:
RelativePosition.BOTTOMRelativePosition.TOPRelativePosition.RIGHTRelativePosition.LEFTNote: If you change this value while a callout is open, the new value will not go into effect until the callout is closed and a new callout is opened.
In the following example, the callout's supported positions are restricted to the top and bottom of the origin:
manager.supportedPositions = new <String>[RelativePosition.TOP, RelativePosition.BOTTOM];In the following example, the callout's position is restricted to the right of the origin:
manager.supportedPositions = new <String>[RelativePosition.RIGHT]; The default value is null.
See also
| CalloutPopUpContentManager | () | Constructor |
public function CalloutPopUpContentManager()Constructor.
| close | () | method |
public function close():voidCloses the pop-up content. If it is not opened, nothing happens.
| dispose | () | method |
public function dispose():voidCleans up the manager.
| open | () | method |
public function open(content:DisplayObject, source:DisplayObject):voidDisplays 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.
|
| close | Event |
starling.events.Eventstarling.events.Event.CLOSEDispatched when the pop-up content closes.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
currentTarget | The 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. |
data | null |
target | The 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 |
starling.events.Eventstarling.events.Event.OPENDispatched when the pop-up content opens.
The properties of the event object have the following values:
| Property | Value |
|---|---|
bubbles | false |
currentTarget | The 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. |
data | null |
target | The 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. |