Package examples.common
Class public  class PopUpExample03
Inheritance PopUpExample03 Inheritance View

A sample of the PopUp#makeContent() method.

Tips: Author:

Michael Schmalle
Copyright:

Teoti Graphix, LLC
Images:


Public Variables
    Variable Defined by
     
Shows the PopUp Dialog using PopUp.makeContent().
PopUpExample03
Protected Methods
    Method Defined by
     
makeContentButton_clickHandler( event:MouseEvent ) : void
Calls PopUp.makeContent() to display the Dialog with a IVisualElement content.
PopUpExample03
Public Variable detail
makeContentButton variable  
public var makeContentButton : Button

Shows the PopUp Dialog using PopUp.makeContent().

Protected Method detail
makeContentButton_clickHandler() method  
protected function makeContentButton_clickHandler( event:MouseEvent ) : void

Calls PopUp.makeContent() to display the Dialog with a IVisualElement content.

Source Code:
<?xml version="1.0" encoding="utf-8"?>
<!--
@LICENSE@
-->
<!--

PopUpExample03.mxml

@PROJECT_BLOCK@

-->
<!---
* A sample of the PopUp#makeContent() method.
* 
* @title PopUp Example 3
* @tip Use the PopUp.makeContent() method to show quick textual and iconic notifications to the user.
* @source
* @mobile
* @image assets/examples/common/PopUpExample03_160.png 
* @author Michael Schmalle
* @copyright Teoti Graphix, LLC
* @front
-->
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" 
        title="PopUp.makeContent() Example">
    
    <fx:Script>
        <![CDATA[
            
            import com.example.common.renderers.IconLabelRenderer;
            import com.teotigraphix.ui.components.PopUp;
            
            [Embed(source="assets/common/android_normal.png")]
            private var iconClass:Class;
            
            /**
             * Calls PopUp.makeContent() to display the Dialog with a IVisualElement content.
             */
            protected function makeContentButton_clickHandler(event:MouseEvent):void
            {
                // create and icon label renderer and pass it
                var content:IconLabelRenderer = new IconLabelRenderer();
                content.icon = iconClass;
                content.text = "Hello makeContent()!";
                PopUp.makeContent(content, PopUp.LENGTH_SHORT).show(navigator);
            }
            
        ]]>
    </fx:Script>
    
    <s:layout>
        <s:VerticalLayout horizontalAlign="center" verticalAlign="middle"/>
    </s:layout>
    
    <s:Label text="Uses the PopUp.makeContent() to show a popup with a contentRenderer."
             width="100%" textAlign="center"/>
    
    <!--- Shows the PopUp Dialog using PopUp.makeContent(). -->
    <s:Button id="makeContentButton"
              label="PopUp.makeContent().show(this)"
              click="makeContentButton_clickHandler(event)"/>
    
</s:View>
Mobile UI Toolkit1 v1.0.x Documentation - Thu Dec 15 10:21:33 EST 2011