flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mschma...@apache.org
Subject svn commit: r1229400 - in /incubator/flex/whiteboard: mobile-popups/ mschmalle/ mschmalle/mobile-popups/ navigators/mobile-popups/ navigators/mobile-popups/src/ navigators/mobile-popups/src/org/ navigators/mobile-popups/src/org/apache/ navigators/mobil...
Date Mon, 09 Jan 2012 22:26:36 GMT
Author: mschmalle
Date: Mon Jan  9 22:26:35 2012
New Revision: 1229400

URL: http://svn.apache.org/viewvc?rev=1229400&view=rev
Log:
moved mobile-popups into mschmalle

Added:
    incubator/flex/whiteboard/mschmalle/   (with props)
    incubator/flex/whiteboard/mschmalle/mobile-popups/
      - copied from r1229392, incubator/flex/whiteboard/mobile-popups/
    incubator/flex/whiteboard/navigators/mobile-popups/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/defaults.css
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/IDialog.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/PopUp.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/TextDialog.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/DialogBase.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/PopUpLayoutPlacement.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/TextView.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/DialogEvent.as
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/TextDialogSkin.mxml
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/TextViewSkin.mxml
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/   (with props)
    incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/PopUpLayoutUtils.as
Removed:
    incubator/flex/whiteboard/mobile-popups/

Propchange: incubator/flex/whiteboard/mschmalle/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/defaults.css
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/defaults.css?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/defaults.css (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/defaults.css Mon Jan  9 22:26:35 2012
@@ -0,0 +1,40 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+@namespace components "org.apache.spark.components.*";
+@namespace supportClasses "org.apache.spark.components.supportClasses.*";
+
+components|TextDialog
+{
+	skinClass:ClassReference("org.apache.spark.skins.TextDialogSkin");
+	color:#FFFFFF;
+	backgroundColor:#000000;
+	borderColor:#E5E5E5;
+	borderWeight:5;
+	cornerRadius:15;
+	dropShadowVisible:true;
+	backgroundColor:#000000;
+}
+
+supportClasses|TextView
+{
+	skinClass:ClassReference("org.apache.spark.skins.supportClasses.TextViewSkin");
+}

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/
------------------------------------------------------------------------------
    bugtraq:number = true

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/IDialog.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/IDialog.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/IDialog.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/IDialog.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,191 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components
+{
+
+import flash.display.DisplayObjectContainer;
+
+import mx.core.IFactory;
+import mx.core.IVisualElement;
+
+/**
+ * The <code>IDialog</code> interface defines a popup component 
+ * that displays a <code>title</code>, <code>icon</code> and 
+ * <code>content</code> view.
+ * 
+ * <p>By calling the dialog's <code>open()</code> and <code>close()</code> 
+ * methods, the underlying display mechanism is hidden from the 
+ * developer. A developer can override default behavior at anytime.</p>
+ * 
+ * <p><strong>Note:</strong> The <code>IDialog</code> API allows 
+ * for deffered content creation in the <code>contentRenderer</code> 
+ * factory or direct assignment of an instantiated <code>IVisualElement</code> 
+ * using the <code>content</code> property directly.</p>
+ * 
+ * <p>The <code>PopUp</code> class is designed to create a layer of 
+ * abstraction to allow dialogs to be created and displayed in 
+ * many different ways.</p>
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ */
+public interface IDialog extends IVisualElement
+{
+	//--------------------------------------------------------------------------
+	// 
+	//  Properties
+	// 
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  title
+	//----------------------------------
+	
+	/**
+	 * The <strong>text</strong> that will appear in the dialog's titlebar 
+	 * above the content view.
+	 * 
+	 * @productversion 1.0
+	 */
+	function get title():String;
+	
+	/**
+	 * @private
+	 */
+	function set title(value:String):void;
+	
+	//----------------------------------
+	//  icon
+	//----------------------------------
+	
+	/**
+	 * The visual <strong>icon</strong> that will appear in the dialog's titlebar 
+	 * above the content view.
+	 * 
+	 * @productversion 1.0
+	 */
+	function get icon():Object;
+	
+	/**
+	 * @private
+	 */
+	function set icon(value:Object):void;
+	
+	//----------------------------------
+	//  contentRenderer
+	//----------------------------------
+	
+	/**
+	 * An <code>IFactory</code> instance that is used to create the 
+	 * dialog's <code>content</code>.
+	 * 
+	 * <p>Using the <code>contentRenderer</code>, the dialog's content 
+	 * can easily change while keeping the original dialog's frame. </p>
+	 * 
+	 * <p>Another benefit is using a <code>contentRenderer</code> can 
+	 * cut down on the amount of <em>MXML classes</em> used to create 
+	 * special dialogs. A developer will create the standard dialog 
+	 * and then only need to create specific views for each dialog's 
+	 * <code>content</code>.</p>
+	 * 
+	 * @productversion 1.0
+	 */
+	function get contentRenderer():IFactory;
+	
+	/**
+	 * @private
+	 */
+	function set contentRenderer(value:IFactory):void;
+	
+	//----------------------------------
+	//  content
+	//----------------------------------
+	
+	/**
+	 * The <code>IVisualElement</code> <code>content</code> view that 
+	 * is positioned by default below the <code>titleBar</code>.
+	 * 
+	 * <p>The <code>content</code> can be populated in two ways;</p>
+	 * 
+	 * <ul>
+	 * <li>By setting the <code>contentRenderer</code> to an <code>IFactory</code> 
+	 * instance that will be created when the <code>IDialog#open()</code> 
+	 * method is called.</li>
+	 * <li>By setting the <code>content</code> with an already instantiated 
+	 * <code>IVisualElement</code>.</li>
+	 * </ul>
+	 * 
+	 * @productversion 1.0
+	 */
+	function get content():IVisualElement;
+	
+	/**
+	 * @private
+	 */
+	function set content(value:IVisualElement):void;
+	
+	//----------------------------------
+	//  isOpen
+	//----------------------------------
+	
+	/**
+	 * Returns whether the <code>IDialog#open()</code> method has been 
+	 * called and the <code>IDialog</code> has been added to the <code>Stage</code> 
+	 * by the <code>PopUpManager</code> or <code>ISystemManager</code>.
+	 * 
+	 * <p>This property will return <code>false</code> when the 
+	 * <code>IDialog#close()</code> method has been called and the 
+	 * <code>IDialog</code> has been removed from the <code>Stage</code> 
+	 * by the <code>PopUpManager</code> or <code>ISystemManager</code>.</p>
+	 * 
+	 * @productversion 1.0
+	 */
+	function get isOpen():Boolean;
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Methods
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Opens the dialog by default with the <code>PopUpManager</code>.
+	 * 
+	 * @param owner The owner that this <code>IDialog</code> is being displayed over.
+	 * @param modal Whether the <code>IDialog</code> will be opened as a modal
+	 * (disallowing userinteraction below it).
+	 * @productversion 1.0
+	 */
+	function open(owner:DisplayObjectContainer, modal:Boolean = false):void;
+	
+	/**
+	 * Closes the dialog by default with the <code>PopUpManager</code>.
+	 * 
+	 * @param commit Whether to commit the data passed to it from the application 
+	 * during <code>open()</code>.
+	 * @param data
+	 * @productversion 1.0
+	 */
+	function close(commit:Boolean = false, data:* = undefined):void;
+}
+}
\ No newline at end of file

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/PopUp.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/PopUp.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/PopUp.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/PopUp.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,833 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components
+{
+
+import flash.display.DisplayObjectContainer;
+import flash.events.Event;
+import flash.events.TimerEvent;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+import flash.utils.Timer;
+
+import mx.core.EdgeMetrics;
+import mx.core.FlexGlobals;
+import mx.core.IFactory;
+import mx.core.IMXMLObject;
+import mx.core.IVisualElement;
+import mx.core.UIComponent;
+import mx.managers.ISystemManager;
+
+import org.apache.spark.components.supportClasses.PopUpLayoutPlacement;
+import org.apache.spark.events.DialogEvent;
+import org.apache.spark.utils.PopUpLayoutUtils;
+
+import spark.core.IDisplayText;
+
+//----------------------------------
+//  Events
+//----------------------------------
+
+/**
+ * Dispatched when the IDialog is opened.
+ */
+[Event(name="dialogOpen", type="org.apache.spark.events.DialogEvent")]
+
+/**
+ * Dispatched when the IDialog is closed.
+ */
+[Event(name="dialogClose", type="org.apache.spark.events.DialogEvent")]
+
+//----------------------------------
+//  Class
+//----------------------------------
+
+/**
+ * A PopUp is a user interface wrapper for creating IDialog and other popups
+ * seamlessly.
+ * 
+ * <p>The <code>PopUp</code> class helps you <em>create</em> and <em>show</em> 
+ * message views and dialogs.</p>
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ * @see PopUp#show()
+ * @see PopUp#makeText()
+ * @see PopUp#makeContent()
+ * @see PopUp#makeDialog()
+ * @see PopUp#makeAlert()
+ * @see PopUp#makeMessageAlert()
+ */
+public class PopUp implements IMXMLObject
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Public :: Constants
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Show the <strong>view</strong> or <strong>text</strong> notification for 
+	 * a long period of time (<em>4 seconds</em>).
+	 * 
+	 * @default 2000
+	 */
+	public static const LENGTH_SHORT:int = 2000;
+	
+	/**
+	 * Show the <strong>view</strong> or <strong>text</strong> notification for 
+	 * a short period of time (<em>2 seconds</em>).
+	 * 
+	 * @default 4000
+	 */
+	public static const LENGTH_LONG:int = 4000;
+	
+	/**
+	 * Show the popup for an indefinite amount of time.
+	 */
+	public static const LENGTH_NONE:int = 0;
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Private :: Variables
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * @private 
+	 */
+	private var mTimer:Timer;
+	
+	/**
+	 * @private 
+	 */
+	private var mOwner:DisplayObjectContainer;
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Public :: Properties
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  modal
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _modal:Boolean = false;
+	
+	/**
+	 * Whether the dialog being popped up will stop underlying screen interaction.
+	 */
+	public function get modal():Boolean
+	{
+		return _modal;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set modal(value:Boolean):void
+	{
+		_modal = value;
+	}
+	
+	//----------------------------------
+	//  duration
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _duration:int = LENGTH_SHORT;
+	
+	/**
+	 * The length of time in milliseconds the notification is shown, the
+	 * default is <code>LENGTH_SHORT</code>.
+	 * 
+	 * @default LENGTH_SHORT
+	 */
+	public function get duration():int
+	{
+		return _duration;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set duration(value:int):void
+	{
+		_duration = Math.max(LENGTH_NONE, value);
+	}
+	
+	//----------------------------------
+	//  contentRenderer
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _contentRenderer:IFactory;
+	
+	/**
+	 * The content renderer <code>IFactory</code> that can deffer creation until 
+	 * a later time.
+	 */
+	public function get contentRenderer():IFactory
+	{
+		return _contentRenderer;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set contentRenderer(value:IFactory):void
+	{
+		_contentRenderer = value;
+	}
+	
+	//----------------------------------
+	//  content
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _content:IVisualElement;
+	
+	/**
+	 * The <code>IVisualElement</code> instance used as the view for the notification.
+	 * asdasdasdasd
+	 */
+	public function get content():IVisualElement
+	{
+		return _content;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set content(value:IVisualElement):void
+	{
+		_content = value;
+	}
+	
+	//----------------------------------
+	//  dialog
+	//----------------------------------
+	
+	/**
+	 * @private 
+	 */
+	private var _dialog:IDialog;
+	
+	/**
+	 * Returns the <code>IDialog</code> currently being managed by this 
+	 * <code>PopUp</code>.
+	 */
+	public function get dialog():IDialog 
+	{
+		return _dialog;
+	}
+	
+	/**
+	 * @private 
+	 */
+	public function set dialog(value:IDialog):void
+	{
+		setDialog(value);
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function setDialog(value:IDialog):void
+	{
+		_dialog = value;
+	}
+	
+	//----------------------------------
+	//  text
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _text:String;
+	
+	/**
+	 * The <code>String</code> text used for the notification.
+	 * @see #makeText()
+	 */
+	public function get text():String
+	{
+		return _text;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set text(value:String):void
+	{
+		_text = value;
+	}
+	
+	//----------------------------------
+	//  layoutPlacement
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _layoutPlacement:String = PopUpLayoutPlacement.CENTER;
+	
+	/**
+	 * The layout placement of the notification.
+	 * 
+	 * @see org.apache.spark.components.supportClasses.PopUpLayoutPlacement
+	 */
+	public function get layoutPlacement():String
+	{
+		return _layoutPlacement;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set layoutPlacement(value:String):void
+	{
+		if (!PopUpLayoutPlacement.isValid(value))
+			return;
+		
+		_layoutPlacement = value;
+	}
+	
+	//----------------------------------
+	//  layoutOffset
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var _layoutOffset:Point = new Point();
+	
+	/**
+	 * The layout offset (<code>x</code> and <code>y</code>) of 
+	 * the notification.
+	 */
+	public function get layoutOffset():Point
+	{
+		return _layoutOffset;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set layoutOffset(value:Point):void
+	{
+		_layoutOffset = value;
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constructor.
+	 */
+	public function PopUp()
+	{
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Public :: Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Shows the <code>PopUp</code> notification on the <code>owner</code>.
+	 * 
+	 * <p>If the <code>content</code> property has not been set, the method 
+	 * will use the <code>contentRenderer</code> factory to create the 
+	 * content.</p>
+	 * 
+	 * <pre>
+	 * var popup:PopUp = new PopUp();
+	 * popup.duration = PopUp.LENGTH_LONG;
+	 * popup.text = "Hello PopUp!";
+	 * popup.show(this);
+	 * </pre>
+	 * 
+	 * @param owner The <code>DisplayObjectContianer</code> that will host the notification. 
+	 * Note that the PopUpManager uses this reference and the bounds of the owner will be used 
+	 * for positioning.
+	 * @param modal A Boolean indicating whether the PopUp blocks background activity.
+	 * @throws Error content or contentRenderer must be defined in PopUp
+	 */
+	public function show(owner:DisplayObjectContainer = null, modal:Boolean = false):void
+	{
+		mOwner = owner;
+		
+		if (mOwner == null)
+			mOwner = DisplayObjectContainer(FlexGlobals.topLevelApplication);
+		
+		var instance:IDialog = dialog;
+		// create the dialog that will hold the content
+		if (!instance)
+		{
+			instance = new TextDialog();
+			setDialog(instance);
+		}
+		
+		content = createContent();
+		configureContent(content);
+		configureDialog(instance);
+		
+		addDialogHandlers(instance);
+		
+		startTimer();
+		
+		openDialog(instance, mOwner, modal);		
+		layoutDialog(instance, mOwner);
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function startTimer():void
+	{
+		if (duration != LENGTH_NONE)
+		{
+			// create the timer
+			mTimer = new Timer(duration, 1);
+			mTimer.addEventListener(TimerEvent.TIMER_COMPLETE, timer_timeCompleteHandler);
+			mTimer.start();
+		}
+	}
+	
+	/**
+	 * Creates the <code>content</code> if the <code>content</code>
+	 * is undefined.
+	 */
+	protected function createContent():IVisualElement
+	{
+		var instance:IVisualElement = content;
+		
+		// - contentRenderer is null until a user sets it on this instance
+		// - if the user sets it that means it overrides the dialog.contentRenderer
+		// AND it overriddes the content of the dialog
+		// if the content is set on the PopUp, that instance overrides everything
+		if (contentRenderer != null)
+			instance = contentRenderer.newInstance() as IVisualElement;
+		
+		return instance;
+	}
+	
+	/**
+	 * Configures the dialog's content component.
+	 */
+	protected function configureContent(content:IVisualElement):void
+	{
+
+	}
+	
+	/**
+	 * Configures the popup's dialog.
+	 * 
+	 * @param dialog The dialog to configure.
+	 */
+	protected function configureDialog(dialog:IDialog):void
+	{
+		// if content was set on this instance, it will override content
+		// already set on the dialog
+		if (content != null)
+			dialog.content = content;
+		
+		if (dialog is IDisplayText)
+			IDisplayText(dialog).text = text;
+	}
+	
+	/**
+	 * Opens the popup's dialog.
+	 * 
+	 * @param dialog The dialog to open.
+	 * @param owner The display object owner of the dialog.
+	 * @param isModal Whether to dialog will be opened as a modal or non modal popup.
+	 */
+	protected function openDialog(dialog:IDialog, owner:DisplayObjectContainer, isModal:Boolean):void
+	{
+		// dimensions are not available until open() is called
+		dialog.open(owner, (modal) ? true : isModal);
+	}
+	
+	/**
+	 * Lays out the dialog, uses LayoutUtils and alyoutPlacement to determine 
+	 * the position of the popup.
+	 * 
+	 * @param dialog The dialog being layed out.
+	 * @param owner The display object owner of the dialog.
+	 */
+	protected function layoutDialog(dialog:IDialog, owner:DisplayObjectContainer):void
+	{
+		// the top and left need to be converted to owner coords, usually this is Stage
+		var parent:DisplayObjectContainer = owner.parent;
+		var edges:EdgeMetrics = new EdgeMetrics(layoutOffset.x, layoutOffset.y, layoutOffset.x, layoutOffset.y);
+		
+		// to be able to center on the owner, the owners coords have to be
+		// converted to gloabl stage coords AND the edges
+		var point:Point = owner.parent.localToGlobal(new Point(owner.x, owner.y));
+		var rect:Rectangle = new Rectangle(point.x, point.y, owner.width, owner.height);
+		
+		PopUpLayoutUtils.layoutElement2(dialog, layoutPlacement, rect, edges);
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function addDialogHandlers(dialog:IDialog):void
+	{
+		dialog.addEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
+		dialog.addEventListener(DialogEvent.DIALOG_CLOSE, dialogCloseHandler, false, 0, false);
+		// StageOrientationEvent.ORIENTATION_CHANGE
+		systemManager.getSandboxRoot().stage.addEventListener(
+			"orientationChange", stage_orientationChangeHandler, true);
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function removedFromStageHandler(event:Event):void
+	{
+		removeDialogHandlers(IDialog(event.currentTarget));
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function removeDialogHandlers(dialog:IDialog):void
+	{
+		dialog.removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStageHandler);
+		dialog.removeEventListener(DialogEvent.DIALOG_CLOSE, dialogCloseHandler);
+		// StageOrientationEvent.ORIENTATION_CHANGE
+		systemManager.getSandboxRoot().stage.removeEventListener(
+			"orientationChange", stage_orientationChangeHandler, true);
+	}
+	
+	/**
+	 * @private 
+	 */
+	protected function dialogCloseHandler(event:DialogEvent):void
+	{
+		removeDialogHandlers(IDialog(event.currentTarget));
+		
+		close();
+	}
+	
+	/**
+	 * @private 
+	 */
+	public function initialized(document:Object, id:String):void
+	{
+	}
+	
+	/**
+	 * Cancels or <em>closes</em> the <code>PopUp</code> notification.
+	 * 
+	 * <pre>popup.cancel();</pre>
+	 */
+	public function close():void
+	{
+		if (!dialog) // this dosn't feel right
+			return;
+		
+		dialog.close();
+		setDialog(null);
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Public Class :: Properties
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Creates a <code>PopUp</code> notification using the default 
+	 * <code>PopUpTextView</code> or the <code>contentRenderer</code> if defined.
+	 * 
+	 * <pre>PopUp.makeText("Hello World", PopUp.LENGTH_LONG).show();</pre>
+	 * 
+	 * @param text The <code>String</code> text that will appear in the notification.
+	 * @param duration The time in milliseconds to show the notification.
+	 * @return A new <code>PopUp</code> notification, Note; the <code>show()</code> 
+	 * method still needs be called.
+	 * @see com.teotigraphix.ui.components.TextDialog
+	 * @productversion 1.0
+	 */
+	public static function makeText(text:String, duration:int):PopUp
+	{
+		var instance:PopUp = new PopUp();
+		instance.setDialog(new TextDialog());
+		instance.duration = duration;
+		instance.text = text;
+		return instance;
+	}
+	
+	/**
+	 * Creates a <code>PopUp</code> notification using the default 
+	 * <code>content</code> or the <code>contentRenderer</code> if defined for
+	 * the actual view.
+	 * 
+	 * <pre>
+	 * [Embed(source="assets/icons/android.png")]
+	 * private var iconClass:Class;
+	 * 
+	 * protected function makeContentButton_clickHandler(event:MouseEvent):void
+	 * {
+	 * 	var content:IconLabelRenderer = new IconLabelRenderer();
+	 * 	content.icon = iconClass;
+	 * 	content.text = "Hello makeContent()!";
+	 * 	PopUp.makeContent(content, PopUp.LENGTH_SHORT).show(this);
+	 * }</pre>
+	 * 
+	 * @param content The <code>IVisualElement</code> to display as the 
+	 * notifications view.
+	 * @param duration The time in milliseconds to show the notification.
+	 * @return A new <code>PopUp</code> notification, Note; the <code>show()</code> 
+	 * method still needs be called.
+	 * @see com.teotigraphix.ui.components.Dialog
+	 * @productversion 1.0
+	 */
+	public static function makeContent(content:IVisualElement, duration:int):PopUp
+	{
+		/*
+		var instance:PopUp = new PopUp();
+		instance.duration = duration;
+		
+		var dialog:Dialog = new Dialog();
+		dialog.content = content;
+		instance.setDialog(dialog);
+
+		return instance;
+		*/
+		return null;
+	}
+	
+	/**
+	 * Creates a <code>PopUp</code> notification using the default 
+	 * <code>Dialog</code>.
+	 * 
+	 * The <code>contentRenderer</code>, <code>title</code> and <code>icon</code> 
+	 * are set on the new <code>IDialog</code> instance.
+	 * 
+	 * <pre>
+	 * protected function makeDialog_clickHandler(event:MouseEvent):void
+	 * {
+	 * 	PopUp.makeDialog(new ClassFactory(DeclartiveDialog), "Hello Dialog!", titleIconClass).show();
+	 * }</pre>
+	 * 
+	 * @param contentRenderer The <code>IFactory</code> used to create the 
+	 * <code>IDialog#content</code>.
+	 * @param title The <code>String</code> title set on the <code>IDialog</code>.
+	 * @param icon The visual icon set in the <code>IDialog</code> <code>titleBar</code>.
+	 * @return A new <code>PopUp</code> notification, note; the <code>show()</code> 
+	 * method still needs be called.
+	 * @productversion 1.0
+	 */
+	public static function makeDialog(contentRenderer:IFactory, 
+									  title:String = null, 
+									  icon:Object = null):PopUp
+	{
+		/*
+		var instance:PopUp = new PopUp();
+		instance.duration = LENGTH_NONE;
+		
+		var dialog:Dialog = new Dialog();
+		dialog.contentRenderer = contentRenderer;
+		dialog.title = title;
+		dialog.icon = icon;
+		instance.setDialog(dialog);
+		
+		return instance;
+		*/
+		return null;
+	}
+	
+	/**
+	 * Creates a <code>PopUp</code> <strong>modal</strong> <code>IDialog</code> 
+	 * using the default <code>AlertDialog</code>.
+	 * 
+	 * <p>The <code>AlertDialog</code> will be populated with the 
+	 * <code>title</code>, <code>icon</code>, <code>message</code> and 
+	 * <code>messageIcon</code>. The Alert dialog by default will use 
+	 * the <strong>OK</strong> and <strong>Cancel</strong> buttons 
+	 * for dismissal.</p>
+	 * 
+	 * <p>This method also uses the <code>TextIconView</code> for it's 
+	 * content renderer. To style the content target the <code>tg|TextIconView</code> 
+	 * type selector.</p>
+	 * 
+	 * <p>The <code>PopUp.modal</code> property is set to true to 
+	 * disallow any user interaction below the <code>AlertDialog</code>.</p>
+	 * 
+	 * [Embed(source="assets/common/android_normal.png")]
+	 * private var iconClass:Class;
+	 * 
+	 * <pre>
+	 * [Embed(source="assets/common/emblem-important-160.png")]
+	 * private var titleIconClass:Class;
+	 * 
+	 * protected function makeAlert_clickHandler(event:MouseEvent):void
+	 * {
+	 * 	PopUp.makeAlert("Hello AlertDialog!", titleIconClass, 
+	 * 		"The alert message", iconClass).show();
+	 * }
+	 * </pre>
+	 * 
+	 * @param title The <code>String</code> title set on the <code>IDialog</code>.
+	 * @param icon The visual icon set in the <code>IDialog</code> <code>titleBar</code>.
+	 * @param message The <code>String</code> message set on the <code>IDialog</code>.
+	 * @param messageIcon The visual icon set in the <code>IDialog</code> <code>content</code>.
+	 * @see com.teotigraphix.ui.components.supportClasses.TextIconView
+	 * @productversion 1.0
+	 */
+	public static function makeAlert(title:String, 
+									 icon:Object = null, 
+									 message:String = null, 
+									 messageIcon:Object = null):PopUp
+	{
+		/*
+		var instance:PopUp = new PopUp();
+		instance.duration = LENGTH_NONE;
+		instance.modal = true;
+		
+		var dialog:AlertDialog = new AlertDialog();
+		dialog.title = title;
+		dialog.icon = icon;
+		dialog.message = message;
+		dialog.messageIcon = messageIcon;
+		dialog.contentRenderer = new ClassFactory(TextIconView);
+		instance.setDialog(dialog);
+		
+		return instance;
+		*/
+		return null;
+	}
+	
+	/**
+	 * Creates a <code>PopUp</code> message alert using the default 
+	 * <code>AlertDialog</code>.
+	 * 
+	 * <p>The message alert dialog has no <code>titleBar</code>, just an 
+	 * <code>icon</code> and <code>message</code>.</p>
+	 * 
+	 * <pre>
+	 * [Embed(source="assets/common/android_normal.png")]
+	 * private var iconClass:Class;
+	 * 
+	 * protected function makeMessageAlert_clickHandler(event:MouseEvent):void
+	 * {
+	 * 	PopUp.makeMessageAlert("The alert message without\n" +
+	 * 		"the titlebar", iconClass).show();
+	 * }</pre>
+	 * 
+	 * @param message The <code>String</code> message for the dialog.
+	 * @param messageIcon The <code>Object</code> used for the <code>content</code>'s icon.
+	 * @see com.teotigraphix.ui.components.supportClasses.TextIconView
+	 * @productversion 1.0
+	 */
+	public static function makeMessageAlert(message:String, messageIcon:Object = null):PopUp
+	{
+		/*
+		var instance:PopUp = new PopUp();
+		instance.duration = LENGTH_NONE;
+		
+		var dialog:AlertDialog = new AlertDialog();
+		dialog.message = message;
+		dialog.messageIcon = messageIcon;
+		dialog.contentRenderer = new ClassFactory(TextIconView);
+		
+		instance.setDialog(dialog);
+		return instance;
+		*/
+		return null;
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Protected :: Handlers
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * @private 
+	 */
+	protected function timer_timeCompleteHandler(event:TimerEvent):void
+	{
+		mTimer.removeEventListener(TimerEvent.TIMER_COMPLETE, timer_timeCompleteHandler);
+		mTimer = null;
+		
+		close();
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Stage :: Handlers
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * @private  [StageOrientationEvent]
+	 */
+	protected function stage_orientationChangeHandler(event:Event):void
+	{
+		UIComponent(topLevelApplication).callLater(layoutDialog, [dialog, mOwner]);
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Private :: Properties
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * @private 
+	 */
+	private static function get topLevelApplication():DisplayObjectContainer
+	{
+		return DisplayObjectContainer(FlexGlobals.topLevelApplication);
+	}
+	
+	/**
+	 * @private 
+	 */
+	private static function get systemManager():ISystemManager
+	{
+		return FlexGlobals.topLevelApplication.systemManager;
+	}
+}
+}
\ No newline at end of file

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/TextDialog.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/TextDialog.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/TextDialog.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/TextDialog.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,139 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components
+{
+
+import mx.core.ClassFactory;
+
+import org.apache.spark.components.supportClasses.DialogBase;
+import org.apache.spark.components.supportClasses.TextView;
+
+import spark.core.IDisplayText;
+
+//----------------------------------
+//  IconFile
+//----------------------------------
+
+//[IconFile("TextDialog.png")]
+
+//----------------------------------
+//  Class
+//----------------------------------
+
+/**
+ * The default popup container <code>PopUp</code> uses for it's text notification.
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ * @mxml
+ */
+public class TextDialog extends DialogBase implements IDisplayText
+{
+	//--------------------------------------------------------------------------
+	// 
+	//  IDisplayText API :: Properties
+	// 
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  text
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var textChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _text:String;
+	
+	/**
+	 * The dialog's text message.
+	 */
+	public function get text():String
+	{
+		return _text;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set text(value:String):void
+	{
+		if (_text == value)
+			return;
+		
+		_text = value;
+		
+		textChanged = true;
+		invalidateProperties();
+	}
+	
+	//----------------------------------
+	//  isTruncated
+	//----------------------------------
+	
+	/**
+	 * @private 
+	 */
+	public function get isTruncated():Boolean
+	{
+		if (content is IDisplayText)
+			return IDisplayText(content).isTruncated;
+		return false;
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constructor.
+	 */
+	public function TextDialog()
+	{
+		super();
+		
+		contentRenderer = new ClassFactory(TextView);
+	}
+	
+	/**
+	 * @private 
+	 */
+	override protected function commitProperties():void
+	{
+		super.commitProperties();
+		
+		if (textChanged)
+		{
+			if (content is IDisplayText)
+				IDisplayText(content).text = text;
+			textChanged = false;
+		}
+	}
+}
+}
\ No newline at end of file

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/DialogBase.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/DialogBase.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/DialogBase.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/DialogBase.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,444 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components.supportClasses
+{
+
+import flash.events.Event;
+
+import mx.core.IFactory;
+import mx.core.IVisualElement;
+
+import org.apache.spark.components.IDialog;
+
+import spark.components.SkinnablePopUpContainer;
+import spark.core.IDisplayText;
+import spark.primitives.BitmapImage;
+
+//----------------------------------
+//  Styles
+//----------------------------------
+
+/**
+ * Whether the drop shadow is visible on the dialog.
+ */
+[Style(name="dropShadowVisible", inherit="no", type="Boolean")]
+
+/**
+ * The thickness of the dialog's border.
+ */
+[Style(name="borderThickness", inherit="no", type="Number")]
+
+/**
+ * The dialog's border color.
+ */
+[Style(name="borderColor", inherit="no", type="uint")]
+
+/**
+ * The dialog's border alpha.
+ */
+[Style(name="borderAlpha", inherit="no", type="Number")]
+
+/**
+ * The dialog's background color.
+ */
+[Style(name="backgroundColor", inherit="no", type="uint")]
+
+/**
+ * The dialog's background alpha.
+ */
+[Style(name="backgroundAlpha", inherit="no", type="Number")]
+
+/**
+ * The dialog's border corner radius.
+ */
+[Style(name="cornerRadius", inherit="no", type="Number")]
+
+/**
+ * The dialog's top left corner radius.
+ * 
+ * <p>This overrides the cornerRadius for the top left.</p>
+ */
+[Style(name="cornerRadiusTL", inherit="no", type="Number")]
+
+/**
+ * The dialog's top right corner radius.
+ * 
+ * <p>This overrides the cornerRadius for the top right.</p>
+ */
+[Style(name="cornerRadiusTR", inherit="no", type="Number")]
+
+/**
+ * The dialog's bottom left corner radius.
+ * 
+ * <p>This overrides the cornerRadius for the bottom left.</p>
+ */
+[Style(name="cornerRadiusBL", inherit="no", type="Number")]
+
+/**
+ * The dialog's bottom right corner radius.
+ * 
+ * <p>This overrides the cornerRadius for the bottom right.</p>
+ */
+[Style(name="cornerRadiusBR", inherit="no", type="Number")]
+
+//----------------------------------
+//  Class
+//----------------------------------
+
+/**
+ * The base <code>IDialog</code> implementation that holds <code>title</code>, 
+ * <code>icon</code> and <code>content</code>.
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ * @mxml
+ */
+public class DialogBase extends SkinnablePopUpContainer implements IDialog
+{
+	//--------------------------------------------------------------------------
+	// 
+	//  Public :: SkinParts
+	// 
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  titleDisplay
+	//----------------------------------
+	
+	[SkinPart(required="false")]
+	
+	/**
+	 * The skinpart that will display the <code>title</code> text.
+	 */
+	public var titleDisplay:IDisplayText;
+	
+	//----------------------------------
+	//  iconDisplay
+	//----------------------------------
+	
+	[SkinPart(required="false")]
+	
+	/**
+	 * The skinpart that will display the <code>icon</code> image.
+	 */
+	public var iconDisplay:BitmapImage;
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Public :: Properties
+	// 
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  title
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var titleChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _title:String;
+	
+	[Bindable("titleChanged")]
+	[Inspectable(category="General", defaultValue="")]
+	
+	/**
+	 * @copy com.teotigraphix.ui.components.IDialog#title
+	 */
+	public function get title():String
+	{
+		return _title;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set title(value:String):void
+	{
+		if (_title == value)
+			return;
+		
+		_title = value;
+		
+		titleChanged = true;
+		invalidateProperties();
+		
+		dispatchEvent(new Event("titleChanged"));
+	}
+	
+	//----------------------------------
+	//  icon
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var iconChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _icon:Object;
+	
+	[Bindable("iconChanged")]
+	[Inspectable(category="General", defaultValue="")]
+	
+	/**
+	 * @copy com.teotigraphix.ui.components.IDialog#icon
+	 */
+	public function get icon():Object
+	{
+		return _icon;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set icon(value:Object):void
+	{
+		if (_icon == value)
+			return;
+		
+		_icon = value;
+		
+		iconChanged = true;
+		invalidateProperties();
+		
+		dispatchEvent(new Event("iconChanged"));
+	}
+	
+	//----------------------------------
+	//  contentRenderer
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var contentRendererChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _contentRenderer:IFactory;
+	
+	[Bindable("contentRendererChanged")]
+	[Inspectable(category="General", defaultValue="")]
+	
+	/**
+	 * @copy com.teotigraphix.ui.components.IDialog#contentRenderer
+	 */
+	public function get contentRenderer():IFactory
+	{
+		return _contentRenderer;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set contentRenderer(value:IFactory):void
+	{
+		if (_contentRenderer == value)
+			return;
+		
+		_contentRenderer = value;
+		
+		contentRendererChanged = true;
+		invalidateProperties();
+		
+		dispatchEvent(new Event("contentRendererChanged"));
+	}
+	
+	//----------------------------------
+	//  content
+	//----------------------------------
+	
+	/**
+	 * @private
+	 */
+	private var contentChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _content:IVisualElement;
+	
+	[Bindable("contentChanged")]
+	[Inspectable(category="General", defaultValue="")]
+	
+	/**
+	 * @copy com.teotigraphix.ui.components.IDialog#content
+	 */
+	public function get content():IVisualElement
+	{
+		if (!contentGroup)
+			return null;
+		
+		return _content;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set content(value:IVisualElement):void
+	{
+		if (value == _content)
+			return;
+		
+		_content = value;
+		
+		contentChanged = true;
+		invalidateProperties();
+		
+		dispatchEvent(new Event("contentChanged"));
+	}
+		
+	//--------------------------------------------------------------------------
+	// 
+	//  Constructor
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constructor.
+	 */
+	override public function DialogBase()
+	{
+		super();
+	}
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Overridden Protected :: Methods
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * @private 
+	 */
+	override protected function partAdded(partName:String, instance:Object):void
+	{
+		super.partAdded(partName, instance);
+		
+		if (instance == titleDisplay)
+		{
+			commitTitle();
+		}
+		
+		if (instance == iconDisplay)
+		{
+			commitIcon();
+		}
+	}
+	
+	/**
+	 * @private 
+	 */
+	override protected function partRemoved(partName:String, instance:Object):void
+	{
+		super.partRemoved(partName, instance);
+	}
+	
+	/**
+	 * @private 
+	 */
+	override protected function commitProperties():void
+	{
+		super.commitProperties();
+		
+		if (titleChanged)
+		{
+			commitTitle();
+			titleChanged = false;
+		}
+		
+		if (iconChanged)
+		{
+			commitIcon();
+			iconChanged = false;
+		}
+		
+		if (contentRendererChanged) 
+		{
+			commitContentRenderer();
+			contentRendererChanged = false;
+		}
+		
+		if (contentChanged)
+		{
+			commitContent();
+			contentChanged = false;
+		}
+	}
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Protected :: Methods
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Commits the <code>title</code> property.
+	 */
+	protected function commitTitle():void
+	{
+		if (titleDisplay)
+			titleDisplay.text = title;
+	}
+	
+	/**
+	 * Commits the <code>icon</code> property.
+	 */
+	protected function commitIcon():void
+	{
+		if (iconDisplay)
+			iconDisplay.source = icon;
+	}
+	
+	/**
+	 * Commits the <code>contentRenderer</code> property.
+	 */
+	protected function commitContentRenderer():void
+	{
+		if (!contentRenderer || content != null)
+			return;
+		
+		content = contentRenderer.newInstance();
+	}	
+	
+	/**
+	 * Commits the <code>content</code> property.
+	 */
+	protected function commitContent():void
+	{
+		if (!contentGroup)
+			return;
+		
+		contentGroup.removeAllElements();
+		contentGroup.addElement(content);
+	}
+}
+}
\ No newline at end of file

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/PopUpLayoutPlacement.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/PopUpLayoutPlacement.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/PopUpLayoutPlacement.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/PopUpLayoutPlacement.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,145 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components.supportClasses
+{
+
+/**
+ * An enumerated class of PopUp layout placement values.
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ */
+public final class PopUpLayoutPlacement
+{
+	//--------------------------------------------------------------------------
+	//
+	// Public :: Constants
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constant that identifies the <strong>top</strong> layout placement.
+	 */
+	public static const TOP:String = "top";
+	
+	/**
+	 * Constant that identifies the <strong>topRight</strong> layout placement.
+	 */
+	public static const TOP_RIGHT:String = "topRight";	
+	
+	/**
+	 * Constant that identifies the <strong>right</strong> layout placement.
+	 */
+	public static const RIGHT:String = "right";
+	
+	/**
+	 * Constant that identifies the <strong>bottomRight</strong> layout placement.
+	 */
+	public static const BOTTOM_RIGHT:String = "bottomRight";
+	
+	/**
+	 * Constant that identifies the <strong>bottom</strong> layout placement.
+	 */
+	public static const BOTTOM:String = "bottom";
+	
+	/**
+	 * Constant that identifies the <strong>bottomLeft</strong> layout placement.
+	 */
+	public static const BOTTOM_LEFT:String = "bottomLeft";
+	
+	/**
+	 * Constant that identifies the <strong>left</strong> layout placement.
+	 */
+	public static const LEFT:String = "left";
+	
+	/**
+	 * Constant that identifies the <strong>topLeft</strong> layout placement.
+	 */
+	public static const TOP_LEFT:String = "topLeft";
+	
+	/**
+	 * Constant that identifies the <strong>center</strong> layout placement.
+	 */
+	public static const CENTER:String = "center";
+	
+	/**
+	 * Constant that identifies the <strong>horizontal</strong> fill layout placement.
+	 */
+	public static const CENTER_FILL_HORIZONTAL:String = "centerFillHorizontal";
+	
+	/**
+	 * Constant that identifies the <strong>vertical</strong> fill layout placement.
+	 */
+	public static const CENTER_FILL_VERTICAL:String = "centerFillVertical";
+	
+	/**
+	 * Constant that identifies the <strong>fill</strong> layout placement.
+	 */
+	public static const CENTER_FILL:String = "centerFill";
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Public Class :: Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Returns whether the placement <code>value</code> passed is a valid placement.
+	 * 
+	 * @param value A string indicating the placement to check for valid.
+	 * @return A Boolean indicating whether the placement value is valid.
+	 */
+	public static function isValid(value:String):Boolean
+	{
+		switch(value)
+		{
+			case TOP:
+			case TOP_RIGHT:
+			case RIGHT:
+			case BOTTOM_RIGHT:
+			case BOTTOM:
+			case BOTTOM_LEFT:
+			case LEFT:
+			case TOP_LEFT:
+			case CENTER:
+			case CENTER_FILL_HORIZONTAL:
+			case CENTER_FILL_VERTICAL:
+			case CENTER_FILL:
+				return true;
+			default:
+				return false;
+		}
+	}
+	
+	/**
+	 * Returns an enumerated Array.
+	 * 
+	 * @return An Array of placement values.
+	 */
+	public static function toArray():Array
+	{
+		return [TOP, TOP_RIGHT, RIGHT, BOTTOM_RIGHT, 
+			BOTTOM, BOTTOM_LEFT, LEFT, TOP_LEFT, CENTER];
+	}
+}
+}
\ No newline at end of file

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/TextView.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/TextView.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/TextView.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/components/supportClasses/TextView.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,156 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.components.supportClasses
+{
+
+import flash.events.Event;
+
+import spark.components.Label;
+import spark.core.IDisplayText;
+import spark.components.supportClasses.SkinnableComponent;
+
+/**
+ * The default view for displaying text in a <code>Toast</code> notification.
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ */
+public class TextView extends SkinnableComponent implements IDisplayText
+{
+	//--------------------------------------------------------------------------
+	//
+	//  Public :: SkinParts
+	//
+	//--------------------------------------------------------------------------
+	
+	[SkinPart(required="false")]
+	
+	/**
+	 * The <code>Label</code> skin part the displays the <code>text</code> property.
+	 * @see #text
+	 */
+	public var labelDisplay:Label;
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Public :: Properties
+	//
+	//--------------------------------------------------------------------------
+	
+	//----------------------------------
+	//  text
+	//----------------------------------
+	
+	/**
+	 * @private 
+	 */
+	private var textChanged:Boolean = false;
+	
+	/**
+	 * @private
+	 */
+	private var _text:String;
+	
+	[Bindable("textChanged")]
+	[Inspectable(defaultValue="")]
+	
+	/**
+	 * The <code>String</code> text data that gets displayed by the 
+	 * <code>labelDisplay</code> skin part.
+	 * 
+	 * @see #labelDisplay
+	 */
+	public function get text():String
+	{
+		return _text;
+	}
+	
+	/**
+	 * @private
+	 */
+	public function set text(value:String):void
+	{
+		if (_text == value)
+			return;
+		
+		_text = value;
+		
+		textChanged = true;
+		invalidateProperties();
+		
+		dispatchEvent(new Event("textChanged"));
+	}
+	
+	//----------------------------------
+	//  isTruncated
+	//----------------------------------
+	
+	/**
+	 * Whether the <code>text</code> is truncated in the <code>labelDisplay</code>.
+	 */
+	public function get isTruncated():Boolean
+	{
+		if (labelDisplay)
+			return labelDisplay.isTruncated;
+		return false;
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constructor.
+	 */
+	public function TextView()
+	{
+		super();
+		
+		// this allows the Label to break if wider then the owner
+		percentWidth = 100;
+	}
+	
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden Protected :: Methods
+	//
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Commits the <code>text</code> value.
+	 */
+	override protected function commitProperties():void
+	{
+		super.commitProperties();
+		
+		if (textChanged)
+		{
+			if (labelDisplay)
+				labelDisplay.text = text;
+			textChanged = false;
+		}
+	}
+}
+}
\ No newline at end of file

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/DialogEvent.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/DialogEvent.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/DialogEvent.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/events/DialogEvent.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,95 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.events
+{
+
+import flash.events.Event;
+
+/**
+ * Events for the <code>org.apache.spark.components.Dialog</code> 
+ * component.
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ */
+public class DialogEvent extends Event
+{
+	//--------------------------------------------------------------------------
+	// 
+	//  Public :: Constants
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Dispatched when IDialog closes.
+	 * 
+	 * @eventType dialogClose
+	 */
+	public static const DIALOG_CLOSE:String = "dialogClose";
+	
+	/**
+	 * Dispatched when IDialog opens.
+	 * 
+	 * @eventType dialogOpen
+	 */
+	public static const DIALOG_OPEN:String = "dialogOpen";
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Constructor
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Constructor, creates a new DialogEvent instance.
+	 */
+	public function DialogEvent(type:String, 
+								bubbles:Boolean = false, 
+								cancelable:Boolean = false)
+	{
+		super(type, bubbles, cancelable);
+	}
+	
+	//--------------------------------------------------------------------------
+	// 
+	//  Overridden Public :: Methods
+	// 
+	//--------------------------------------------------------------------------
+	
+	/**
+	 * Clones the <code>DialogEvent</code>.
+	 */
+	override public function clone():Event
+	{
+		return new DialogEvent(type, bubbles, cancelable);
+	}
+	
+	/**
+	 * Returns a formatted <code>String</code> of the <code>DialogEvent</code>.
+	 */
+	override public function toString():String
+	{
+		return formatToString("DialogEvent", "type", "bubbles", "cancelable", "eventPhase");
+	}
+}
+}
\ No newline at end of file

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/TextDialogSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/TextDialogSkin.mxml?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/TextDialogSkin.mxml (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/TextDialogSkin.mxml Mon Jan  9 22:26:35 2012
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
+<!---
+* The default skin for the <code>TextDialog</code> component.
+* 
+* @author Michael Schmalle
+* @copyright Teoti Graphix, LLC
+* @productversion 1.0
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		xmlns:s="library://ns.adobe.com/flex/spark" 
+		alpha.disabled="0.5">
+	
+	<fx:Metadata>
+		[HostComponent("org.apache.spark.components.TextDialog")]
+	</fx:Metadata> 
+	
+	<fx:Script>
+		<![CDATA[
+			
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, 
+														  unscaledHeight:Number):void
+			{
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+			
+			/**
+			 * @private
+			 */
+			protected function updateStyle(element:IStyleClient, styleProp:String):void
+			{
+				if (element.getStyle(styleProp) != getStyle(styleProp))
+				{
+					element.setStyle(styleProp, getStyle(styleProp));
+				}
+			}
+			
+		]]>        
+	</fx:Script>
+	
+	<s:states>
+		<s:State name="normal"/>
+		<s:State name="disabled"/>
+		<s:State name="closed" stateGroups="closedGroup"/>
+		<s:State name="disabledAndClosed" stateGroups="closedGroup"/>
+	</s:states>
+	
+	<!-- Transitions for open and close -->
+	<s:transitions>
+		<s:Transition fromState="closed" toState="normal" autoReverse="true">
+			<s:Fade duration="150" target="{chrome}"/>
+		</s:Transition>
+		
+		<s:Transition fromState="disabledAndClosed" toState="disabled" autoReverse="true">
+			<s:Fade duration="150" target="{chrome}"/>
+		</s:Transition>
+		
+		<s:Transition fromState="normal" toState="closed" autoReverse="true">
+			<s:Fade duration="150" target="{chrome}"/>
+		</s:Transition>
+		
+		<s:Transition fromState="disabled" toState="disabledAndClosed" autoReverse="true">
+			<s:Fade duration="150" target="{chrome}"/>
+		</s:Transition>
+	</s:transitions>
+	
+	<!--- Defines the background and content group used by this skin. -->
+	<s:Group id="chrome" 
+			 left="0" right="0" top="0" bottom="0" 
+			 visible.closedGroup="false">
+		
+		<s:RectangularDropShadow id="dropShadow"
+								 color="0x000000" angle="90" distance="11" 
+								 blurX="20" blurY="20" alpha="0.32" 
+								 tlRadius="10" blRadius="10" brRadius="10" trRadius="10"
+								 left="0" top="0" right="0" bottom="0"/>
+		
+		<s:Rect top="0" left="0" right="0" bottom="0" 
+				radiusX="10" radiusY="10">
+			<s:fill>
+				<s:SolidColor color="#E5E5E5"/>
+			</s:fill>
+		</s:Rect>
+		
+		<s:Rect top="5" left="5" right="5" bottom="5" 
+				radiusX="5" radiusY="5">
+			<s:fill>
+				<s:SolidColor color="#000000"/>
+			</s:fill>
+		</s:Rect>
+		
+		<s:Group id="contentGroup" 
+				 left="15" right="15" top="15" bottom="15" 
+				 minWidth="0" minHeight="0">
+			<s:layout>
+				<s:BasicLayout/>
+			</s:layout>
+		</s:Group>
+		
+	</s:Group>
+	
+</s:Skin>

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/TextViewSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/TextViewSkin.mxml?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/TextViewSkin.mxml (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/skins/supportClasses/TextViewSkin.mxml Mon Jan  9 22:26:35 2012
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+-->
+<!---
+* The default skin for the <code>TextView</code> component.
+* 
+* @author Michael Schmalle
+* @copyright Teoti Graphix, LLC
+* @productversion 1.0
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+		xmlns:s="library://ns.adobe.com/flex/spark">
+	
+	<fx:Metadata>
+		[HostComponent("org.apache.spark.components.supportClasses.TextView")]
+	</fx:Metadata>	
+	
+	<!---
+		The Label that displays the <code>TextView.text</code>
+		property. 
+	-->
+	<s:Label id="labelDisplay" textAlign="center" width="100%"/>
+	
+</s:Skin>

Propchange: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/
------------------------------------------------------------------------------
    bugtraq:number = true

Added: incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/PopUpLayoutUtils.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/PopUpLayoutUtils.as?rev=1229400&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/PopUpLayoutUtils.as (added)
+++ incubator/flex/whiteboard/navigators/mobile-popups/src/org/apache/spark/utils/PopUpLayoutUtils.as Mon Jan  9 22:26:35 2012
@@ -0,0 +1,330 @@
+/*
+Copyright (c) 2011 Teoti Graphix, LLC - http://www.teotigraphix.com
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of 
+this software and associated documentation files (the "Software"), to deal in 
+the Software without restriction, including without limitation the rights to 
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 
+of the Software, and to permit persons to whom the Software is furnished to do 
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all 
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+package org.apache.spark.utils
+{
+
+import flash.geom.Rectangle;
+
+import mx.core.EdgeMetrics;
+import mx.core.IInvalidating;
+import mx.core.IVisualElement;
+import mx.styles.IStyleClient;
+
+import org.apache.spark.components.supportClasses.PopUpLayoutPlacement;
+
+/**
+ * @private 
+ * 
+ * @author Michael Schmalle
+ * @copyright Teoti Graphix, LLC
+ * @productversion 1.0
+ */
+public class PopUpLayoutUtils
+{
+	/**
+	 * @private
+	 */
+	public static function layoutElement(element:IVisualElement,
+										 position:String,
+										 unscaledWidth:Number,
+										 unscaledHeight:Number,
+										 edges:EdgeMetrics = null):void
+	{
+		var b:EdgeMetrics = (edges != null) ? edges : EdgeMetrics.EMPTY;
+		
+		var top:Number = b.top;
+		var bottom:Number = b.bottom;
+		var left:Number = b.left;
+		var right:Number = b.right;
+		
+		var paddingTop:Number = getStyle(element, "paddingTop", 0);
+		var paddingBottom:Number = getStyle(element, "paddingBottom", 0);
+		var paddingLeft:Number = getStyle(element, "paddingLeft", 0);
+		var paddingRight:Number = getStyle(element, "paddingRight", 0);
+		
+		var calcX:Number = left;
+		var calcY:Number = top;
+		
+		//element.setLayoutBoundsSize(NaN, NaN);
+		var calcWidth:Number = element.getLayoutBoundsWidth();
+		var calcHeight:Number = element.getLayoutBoundsHeight();
+		
+		var excededWidth:Boolean = false;
+		var excededHeight:Boolean = false;
+		
+		// test that the child is not larger han parent
+		if (calcWidth >= unscaledWidth) 
+		{
+			calcWidth = unscaledWidth;
+			element.width = calcWidth;
+			// I think this is the only way to get the right height instantly
+			if (element is IInvalidating)
+				IInvalidating(element).validateNow();
+			calcHeight  = element.getLayoutBoundsHeight();
+			excededWidth = true;
+		}
+		if (calcHeight >= unscaledHeight) 
+		{
+			calcHeight = unscaledHeight;
+			element.height = calcHeight;
+			// I think this is the only way to get the right height instantly
+			if (element is IInvalidating)
+				IInvalidating(element).validateNow();
+			calcWidth  = element.getLayoutBoundsWidth();
+			excededHeight = true;
+		}
+		
+		switch (position)
+		{
+			case PopUpLayoutPlacement.TOP_LEFT :
+				calcX = left;
+				calcY = top;			
+				break;
+			
+			case PopUpLayoutPlacement.TOP :
+				calcX = (unscaledWidth - calcWidth) / 2;
+				calcY = top;
+				break;
+			
+			case PopUpLayoutPlacement.TOP_RIGHT :
+				calcX = (unscaledWidth - calcWidth - right);
+				calcY = top;
+				break;
+			
+			case PopUpLayoutPlacement.RIGHT :
+				calcX = (unscaledWidth - calcWidth - right);
+				calcY = (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM_RIGHT :
+				calcX = (unscaledWidth - calcWidth - right);
+				calcY = (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM :
+				calcX = (unscaledWidth - calcWidth) / 2;
+				calcY = (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM_LEFT :
+				calcX = left;
+				calcY = (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.LEFT :
+				calcX = left;
+				calcY = (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER :
+				calcX = (unscaledWidth - calcWidth) / 2;
+				calcY = (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL_HORIZONTAL :
+				calcX = b.left;
+				calcY = (excededHeight) ? b.top : (unscaledHeight - calcHeight) / 2;
+				calcWidth = unscaledWidth - b.left - b.right;
+				calcHeight = (excededHeight) ? unscaledHeight - b.top - b.bottom : calcHeight;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL_VERTICAL :
+				calcX = (excededWidth) ? b.right : (unscaledWidth - calcWidth) / 2;
+				calcY = b.top
+				calcWidth = (excededWidth) ? unscaledWidth - b.left - b.right : calcWidth;
+				calcHeight = unscaledHeight - b.top - b.bottom;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL :
+				calcX = b.left
+				calcY = b.top;
+				calcWidth = unscaledWidth - b.left - b.right;
+				calcHeight = unscaledHeight - b.top - b.bottom;
+				break;
+		}
+		
+		element.x = Math.floor(calcX);
+		element.y = Math.floor(calcY);
+		element.width = calcWidth;
+		element.height = calcHeight;
+	}
+	
+	/**
+	 * @private
+	 */
+	public static function layoutElement2(element:IVisualElement,
+										  position:String,
+										  rect:Rectangle,
+										  edges:EdgeMetrics = null):void
+	{
+		var b:EdgeMetrics = (edges != null) ? edges : EdgeMetrics.EMPTY;
+		
+		var top:Number = b.top;
+		var bottom:Number = b.bottom;
+		var left:Number = b.left;
+		var right:Number = b.right;
+		
+		var paddingTop:Number = getStyle(element, "paddingTop", 0);
+		var paddingBottom:Number = getStyle(element, "paddingBottom", 0);
+		var paddingLeft:Number = getStyle(element, "paddingLeft", 0);
+		var paddingRight:Number = getStyle(element, "paddingRight", 0);
+		
+		var calcX:Number = left;
+		var calcY:Number = top;
+		
+		//element.setLayoutBoundsSize(NaN, NaN);
+		var calcWidth:Number = element.getLayoutBoundsWidth();
+		var calcHeight:Number = element.getLayoutBoundsHeight();
+		
+		var unscaledWidth:Number = rect.width;
+		var unscaledHeight:Number = rect.height;
+		
+		var excededWidth:Boolean = false;
+		var excededHeight:Boolean = false;
+		
+		// test that the child is not larger han parent
+		if (calcWidth >= unscaledWidth) 
+		{
+			calcWidth = unscaledWidth;
+			element.width = calcWidth;
+			// I think this is the only way to get the right height instantly
+			if (element is IInvalidating)
+				IInvalidating(element).validateNow();
+			calcHeight  = element.getLayoutBoundsHeight();
+			excededWidth = true;
+		}
+		if (calcHeight >= unscaledHeight) 
+		{
+			calcHeight = unscaledHeight;
+			element.height = calcHeight;
+			// I think this is the only way to get the right height instantly
+			if (element is IInvalidating)
+				IInvalidating(element).validateNow();
+			calcWidth  = element.getLayoutBoundsWidth();
+			excededHeight = true;
+		}
+		
+		switch (position)
+		{
+			case PopUpLayoutPlacement.TOP_LEFT :
+				calcX = rect.x + left;
+				calcY = rect.y + top;			
+				break;
+			
+			case PopUpLayoutPlacement.TOP :
+				calcX = rect.x + (unscaledWidth - calcWidth) / 2;
+				calcY = rect.y + top;
+				break;
+			
+			case PopUpLayoutPlacement.TOP_RIGHT :
+				calcX = rect.x + (unscaledWidth - calcWidth - right);
+				calcY = rect.y + top;
+				break;
+			
+			case PopUpLayoutPlacement.RIGHT :
+				calcX = rect.x + (unscaledWidth - calcWidth - right);
+				calcY = rect.y + (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM_RIGHT :
+				calcX = rect.x + (unscaledWidth - calcWidth - right);
+				calcY = rect.y + (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM :
+				calcX = rect.x + (unscaledWidth - calcWidth) / 2;
+				calcY = rect.y + (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.BOTTOM_LEFT :
+				calcX = rect.x + left;
+				calcY = rect.y + (unscaledHeight - calcHeight - bottom);
+				break;
+			
+			case PopUpLayoutPlacement.LEFT :
+				calcX = rect.x + left;
+				calcY = rect.y + (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER :
+				calcX = rect.x + (unscaledWidth - calcWidth) / 2;
+				calcY = rect.y + (unscaledHeight - calcHeight) / 2;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL_HORIZONTAL :
+				calcX = rect.x + b.left;
+				calcY = (excededHeight) ? rect.y + b.top :  rect.y + (unscaledHeight - calcHeight) / 2;
+				calcWidth = unscaledWidth - b.left - b.right;
+				calcHeight = (excededHeight) ? unscaledHeight - b.top - b.bottom : calcHeight;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL_VERTICAL :
+				calcX = (excededWidth) ? b.right : (unscaledWidth - calcWidth) / 2;
+				calcY = b.top
+				calcWidth = (excededWidth) ? unscaledWidth - b.left - b.right : calcWidth;
+				calcHeight = unscaledHeight - b.top - b.bottom;
+				break;
+			
+			case PopUpLayoutPlacement.CENTER_FILL :
+				calcX = b.left
+				calcY = b.top;
+				calcWidth = unscaledWidth - b.left - b.right;
+				calcHeight = unscaledHeight - b.top - b.bottom;
+				break;
+		}
+		
+		element.x = Math.floor(calcX);
+		element.y = Math.floor(calcY);
+		element.width = calcWidth;
+		element.height = calcHeight;
+	}
+	
+	/**
+	 * @private 
+	 */
+	private static function getStyle(element:IVisualElement, 
+									 name:String, 
+									 defaultValue:*):*
+	{
+		var client:IStyleClient = element as IStyleClient;
+		if (client == null)
+			return defaultValue;
+		
+		return client.getStyle(name);
+	}
+	
+	/**
+	 * @private
+	 */
+	public static function findParent(owner:Object, type:Class):Object
+	{
+		var parent:Object = owner;
+		while(parent != null)
+		{
+			if (parent is type)
+				return parent;
+			parent = parent.parent;
+		}
+		return null;
+	}
+}
+}
\ No newline at end of file



Mime
View raw message