Packageardisia.components.popUpButton
Classpublic class PopUpButton
InheritancePopUpButton Inheritance spark.components.SkinnableContainer
Implements mx.managers.IFocusManagerComponent

The PopUpButton control combines both a basic button with a popup button that will pop up the supplied popup content when clicked. Designed to deliver similar functionality to the halo PopUpButton while supporting the Spark skinning architecture.

Only the primary main button dispatches "click" events.

A Halo Menu cannot be added as PopUp content because the Menu class handles closing itself, which creates memory leaks when used in this component.

View the technical documentation on the Ardisia Labs website for more information.

Default MXML PropertypopUp



Public Properties
 PropertyDefined By
  closeOnActivity : Boolean = true
If true, the popup will be closed when mouse/resize activity occurs that is not related to the popup.
PopUpButton
  label : String
Text to appear on the main button skin part.
PopUpButton
  openAlways : Boolean = true
If true, will pop up the popup content when the openButtonPart is clicked or the control has focus and the spacebar is depressed.
PopUpButton
  popUp : UIComponent
Specifies the content to popup when open() is called.
PopUpButton
Public Methods
 MethodDefined By
  
close():void
Closes the popup.
PopUpButton
  
open():void
Opens the popup.
PopUpButton
Protected Methods
 MethodDefined By
  
eventHandler(event:Event):void
Handles events for the component.
PopUpButton
  
openButtonPartHandler(event:Event):void
Handles events for the open button skin part.
PopUpButton
  
systemManagerHandler(event:Event):void
Handles events on the systemManager.
PopUpButton
Events
 Event Summary Defined By
  Dispatched when the popup is closed.PopUpButton
  Dispatched when the popup opens and is visible.PopUpButton
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
mainButtonPart:spark.components.Button
Required: true Part Type: Static
Principal button that dispatches the "click" event.
PopUpButton
  
openButtonPart:spark.components.Button
Required: true Part Type: Static
Secondary button that displays the popup content when clicked.
PopUpButton
  
popupAnchorPart:spark.components.PopUpAnchor
Required: true Part Type: Static
Anchor that positions and pops up the content.
PopUpButton
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
open
State when the popup content is displayed and visible. PopUpButton
Property Detail
closeOnActivityproperty
public var closeOnActivity:Boolean = true

If true, the popup will be closed when mouse/resize activity occurs that is not related to the popup.

If false, close() must be called manually to remove the popup content.

The default value is true.

labelproperty 
label:String

Text to appear on the main button skin part.

The default value is "".


Implementation
    public function get label():String
    public function set label(value:String):void
openAlwaysproperty 
public var openAlways:Boolean = true

If true, will pop up the popup content when the openButtonPart is clicked or the control has focus and the spacebar is depressed.

If false, open() must be called manually to display the popup content.

The default value is true.

popUpproperty 
popUp:UIComponent

Specifies the content to popup when open() is called.

Cannot be a Halo Menu.

This property is bindable.

The default value is null.

This property can be used as the source for data binding.


Implementation
    public function get popUp():UIComponent
    public function set popUp(value:UIComponent):void
Method Detail
close()method
public function close():void

Closes the popup.

eventHandler()method 
protected function eventHandler(event:Event):void

Handles events for the component.

Parameters

event:Event — the Event that triggered the handler

open()method 
public function open():void

Opens the popup.

openButtonPartHandler()method 
protected function openButtonPartHandler(event:Event):void

Handles events for the open button skin part.

Parameters

event:Event — the Event that triggered the handler

systemManagerHandler()method 
protected function systemManagerHandler(event:Event):void

Handles events on the systemManager.

Parameters

event:Event — the Event that triggered the handler

Event Detail
close Event
Event Object Type: ardisia.components.popUpButton.events.PopUpButtonEvent
PopUpButtonEvent.type property = ardisia.components.popUpButton.events.PopUpButtonEvent

Dispatched when the popup is closed.

open Event  
Event Object Type: ardisia.components.popUpButton.events.PopUpButtonEvent
PopUpButtonEvent.type property = ardisia.components.popUpButton.events.PopUpButtonEvent

Dispatched when the popup opens and is visible.