| Package | examples.common |
| Class | public class PopUpExample03 |
| Inheritance |
PopUpExample03
View
|
A sample of the PopUp#makeContent() method.
Tips:
| Variable | Defined by | |||
|---|---|---|---|---|
|
makeContentButton
: Button
Shows the PopUp Dialog using PopUp.makeContent().
|
PopUpExample03 | |||
| Method | Defined by | |||
|---|---|---|---|---|
|
makeContentButton_clickHandler( event:MouseEvent ) : void
Calls PopUp.makeContent() to display the Dialog with a IVisualElement content.
|
PopUpExample03 | |||
| makeContentButton | variable |
public var makeContentButton : ButtonShows the PopUp Dialog using PopUp.makeContent().
| makeContentButton_clickHandler() | method |
protected function makeContentButton_clickHandler( event:MouseEvent ) : void
Calls PopUp.makeContent() to display the Dialog with a IVisualElement content.
<?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>