You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ft...@apache.org on 2012/12/16 05:39:00 UTC

svn commit: r1422462 [1/3] - in /incubator/flex/sdk/branches/develop/frameworks/projects/experimental: ./ assets/ assets/dividers/ bundles/en_US/ src/ src/org/apache/flex/components/ src/org/apache/flex/components/sparkAlert/ src/org/apache/flex/compon...

Author: fthomas
Date: Sun Dec 16 04:38:49 2012
New Revision: 1422462

URL: http://svn.apache.org/viewvc?rev=1422462&view=rev
Log:
FLEX-33284 New Spark Components

Added:
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDivider.png   (with props)
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDividerCursor.png   (with props)
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDivider.png   (with props)
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDividerCursor.png   (with props)
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/alert.properties
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/dividers.properties
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/spark-manifest.xml
      - copied, changed from r1422292, incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/Alert.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/AlertSkin.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/ColorPicker.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/ColorChangeEvent.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerButtonSkin.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerSkin.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/util/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/util/ColorPickerUtil.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/DividedGroup.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/Divider.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/HDivider.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/HDividerGroup.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/VDivider.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkDividers/VDividerGroup.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/IListItemRenderer.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/Menu.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/MenuBar.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/MenuCoreItemRenderer.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/events/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/events/MenuEvent.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/skin/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/skin/MenuBarItemRenderer.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/skin/MenuBarSkin.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/skin/MenuItemRenderer.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkMenu/skin/MenuSkin.mxml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkProgressBar/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkProgressBar/ProgressBar.as
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkProgressBar/skin/
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkProgressBar/skin/ProgressBarSkin.mxml
Modified:
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/build.xml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundle-config.xml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/compile-config.xml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml
    incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/ExperimentalClasses.as

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDivider.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDivider.png?rev=1422462&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDivider.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDividerCursor.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDividerCursor.png?rev=1422462&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/HDividerCursor.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDivider.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDivider.png?rev=1422462&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDivider.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDividerCursor.png
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDividerCursor.png?rev=1422462&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/assets/dividers/VDividerCursor.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/build.xml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/build.xml?rev=1422462&r1=1422461&r2=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/build.xml (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/build.xml Sun Dec 16 04:38:49 2012
@@ -35,17 +35,17 @@
 			<!-- Load the <compc> task. We can't do this at the <project> level -->
 			<!-- because targets that run before flexTasks.jar gets built would fail. -->
 			<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/lib/flexTasks.jar"/>
-			<compc fork="true"
-				   output="${FLEX_HOME}/frameworks/locale/@{locale}/experimental_rb.swc">
+                <compc fork="true"
+                       output="${FLEX_HOME}/frameworks/locale/@{locale}/experimental_rb.swc">
 				<jvmarg line="${compc.jvm.args}"/>
                 <load-config filename="bundle-config.xml" />
                 <arg value="+playerglobal.version=${playerglobal.version}" />
                 <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
                 <arg value="+locale=@{locale}" />
-			</compc>
+                </compc>
 		</sequential>
-	</macrodef>	
-	
+	</macrodef>
+
 	<macrodef name="fat-swc">
 		<attribute name="locale"/>
 		<sequential>
@@ -59,7 +59,7 @@
 				</zipfileset>
 			</zip>
 		</sequential>
-	</macrodef>	
+	</macrodef>
 
 	<macrodef name="bundle-clean">
 		<attribute name="locale"/>
@@ -71,8 +71,8 @@
 				</fileset>
 			</delete>
 		</sequential>
-	</macrodef>	
-	
+	</macrodef>
+
 	<macrodef name="bundler">
 		<attribute name="locale"/>
 		<element name="run.fat.swc" optional="yes"/>
@@ -82,33 +82,33 @@
 			<run.fat.swc/>
 		</sequential>
 	</macrodef>
-	
+
 	<target name="main" depends="clean,compile" description="Clean build of experimental.swc and default locale">
 		<bundle locale="${locale}"/>
 	</target>
-	
+
 	<target name="other.locales" depends="bundles" description="Build other locale SWCs"/>
-	
+
 	<!-- This is a private target for building experimental.swc for various locales. -->
 	<!-- The targets below set the 'locale' parameter and call it with <antcall>. -->
 	<target name="bundles">
 		<!-- these languages do not have localized docs-->
 		<!-- TODO add misisng locales -->
 	</target>
-	
+
 	<target name="clean" depends="bundles-clean">
 		<delete failonerror="false">
 			<fileset dir="${basedir}" >
 				<include name="bundles.properties"/>
 			    <include name="bundles/en_US/packages.dita"/>
 			</fileset>
-			<fileset dir="${FLEX_HOME}/frameworks/libs/experimental">
+			<fileset dir="${FLEX_HOME}/frameworks/libs">
 				<include name="experimental.swc"/>
 				<include name="experimental.swc.incr"/>
 			</fileset>
 		</delete>
 	</target>
-	
+
 	<target name="bundles-clean">
 		<delete failonerror="false">
 			<fileset dir="${FLEX_HOME}/frameworks/locale">
@@ -117,7 +117,7 @@
 			</fileset>
 		</delete>
 	</target>
-	
+
 	<target name="compile" description="Compiles experimental.swc">
 		<echo message="Compiling frameworks/libs/experimental.swc"/>
 
@@ -137,15 +137,15 @@
 			Write a bundle list of referenced resource bundles
 			into the file bundles.properties in this directory.
 		-->
-		<compc fork="true"
-			   output="${FLEX_HOME}/frameworks/libs/experimental.swc">
+        <compc fork="true"
+               output="${FLEX_HOME}/frameworks/libs/experimental.swc">
 			<jvmarg line="${compc.jvm.args}"/>
             <load-config filename="compile-config.xml" />
             <arg value="+playerglobal.version=${playerglobal.version}" />
             <arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
-		</compc>
+        </compc>
 	</target>
-	
+
 	<target name="doc" depends="clean-temp-docs" description="updates experimental.swc with asdoc xml">
 		<!-- Load the <asdoc> task. We can't do this at the <project> level -->
 		<!-- because targets that run before flexTasks.jar gets built would fail. -->

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundle-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundle-config.xml?rev=1422462&r1=1422461&r2=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundle-config.xml (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundle-config.xml Sun Dec 16 04:38:49 2012
@@ -22,6 +22,7 @@
         <external-library-path>
             <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
             <path-element>../../libs/framework.swc</path-element>
+            <path-element>../../libs/spark.swc</path-element>
         </external-library-path>
         
         <include-libraries/>
@@ -43,7 +44,8 @@
     <include-namespaces/>
     
     <include-resource-bundles>
-        <bundle>empty</bundle>
+        <bundle>alert</bundle>
+        <bundle>dividers</bundle>
     </include-resource-bundles>
         
     <target-player>${playerglobal.version}</target-player>

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/alert.properties
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/alert.properties?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/alert.properties (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/alert.properties Sun Dec 16 04:38:49 2012
@@ -0,0 +1,4 @@
+YesLabel = Yes
+NoLabel =  No
+CancelLabel = Cancel
+OkLabel = Ok
\ No newline at end of file

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/dividers.properties
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/dividers.properties?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/dividers.properties (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/bundles/en_US/dividers.properties Sun Dec 16 04:38:49 2012
@@ -0,0 +1,4 @@
+atLeastTwoChildrenRequiredError = You need at least 2 children!
+childDoesntHavePercentHeightError = You have to specify percent height on all children
+childDoesntHavePercentWidthError = You have to specify percent width on all children
+totalPercentsGreaterThanOneHundredError = The percents sum is greater than 100 
\ No newline at end of file

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/compile-config.xml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/compile-config.xml?rev=1422462&r1=1422461&r2=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/compile-config.xml (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/compile-config.xml Sun Dec 16 04:38:49 2012
@@ -20,21 +20,24 @@
 
     <compiler>
         <accessible>true</accessible>
-        
+
         <external-library-path>
             <path-element>${env.PLAYERGLOBAL_HOME}/${playerglobal.version}/playerglobal.swc</path-element>
+            <path-element>../../libs/framework.swc</path-element>
+            <path-element>../../libs/spark.swc</path-element>
         </external-library-path>
-        
+
         <keep-as3-metadata>
             <name>Bindable</name>
             <name>Managed</name>
             <name>ChangeEvent</name>
             <name>NonCommittingChangeEvent</name>
             <name>Transient</name>
+            <name>SkinPart</name>
         </keep-as3-metadata>
-        
+
         <locale/>
-        
+
         <library-path/>
 
         <namespaces>
@@ -42,25 +45,34 @@
                 <uri>http://flex.apache.org/experimental/ns</uri>
                 <manifest>manifest.xml</manifest>
             </namespace>
+            <namespace>
+                <uri>library://ns.adobe.com/flex/spark</uri>
+                <manifest>spark-manifest.xml</manifest>
+            </namespace>
         </namespaces>
-        
+
         <source-path>
             <path-element>src</path-element>
         </source-path>
-        
+
+        <show-deprecation-warnings>false</show-deprecation-warnings>
         <warn-no-constructor>false</warn-no-constructor>
     </compiler>
-    
+
+	<include-namespaces>
+		 <uri>http://flex.apache.org/experimental/ns</uri>
+	</include-namespaces>
+
     <include-classes>
         <class>ExperimentalClasses</class>
     </include-classes>
-    
+
     <include-file>
-        <name>defaults.css</name>
+        <name>experimental.css</name>
         <path>defaults.css</path>
     </include-file>
-        
+
     <resource-bundle-list>bundles.properties</resource-bundle-list>
-    
+
     <target-player>${playerglobal.version}</target-player>
 </flex-config>

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml?rev=1422462&r1=1422461&r2=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml Sun Dec 16 04:38:49 2012
@@ -1,28 +1,57 @@
-<?xml version="1.0"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-
-<!--
-
-    Experimental Components
-
--->
-<componentPackage>
-
-</componentPackage>
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<!--
+
+    Experimental Components
+
+-->
+<componentPackage>
+	<!-- Alert class and it's skin -->
+	<component id="Alert" class="org.apache.flex.components.sparkAlert.Alert"/>
+	<component id="AlertSkin" class="org.apache.flex.components.sparkAlert.skin.AlertSkin"/>
+	<!-- ColorPicker class and it's skins -->
+	<component id="ColorPicker" class="org.apache.flex.components.sparkColorPicker.ColorPicker"/>
+	<component id="ColorPickerSkin" class="org.apache.flex.components.sparkColorPicker.skin.ColorPickerSkin"/>
+	<component id="ColorButtonPickerSkin" class="org.apache.flex.components.sparkColorPicker.skin.ColorPickerButtonSkin"/>
+	<component id="ColorChangeEvent" class="org.apache.flex.components.sparkColorPicker.events.ColorChangeEvent"/>
+	<!-- Horizontal and Vertical dividers and their groups -->
+	<component id="Divider" class="org.apache.flex.components.sparkDividers.Divider"/>
+	<component id="HDivider" class="org.apache.flex.components.sparkDividers.HDivider"/>
+	<component id="VDivider" class="org.apache.flex.components.sparkDividers.VDivider"/>
+	<component id="DividerGroup" class="org.apache.flex.components.sparkDividers.DividedGroup"/>
+	<component id="HDividerGroup" class="org.apache.flex.components.sparkDividers.HDividerGroup"/>
+	<component id="VDividerGroup" class="org.apache.flex.components.sparkDividers.VDividerGroup"/>
+	<!-- Menu classes and skins -->
+	<component id="Menu" class="org.apache.flex.components.sparkMenu.Menu"/>
+	<component id="MenuEvent" class="org.apache.flex.components.sparkMenu.events.MenuEvent"/>
+	<component id="MenuSkin" class="org.apache.flex.components.sparkMenu.skin.MenuSkin"/>
+	<component id="MenuItemRenderer" class="org.apache.flex.components.sparkMenu.skin.MenuItemRenderer"/>
+	<component id="MenuBar" class="org.apache.flex.components.sparkMenu.MenuBar"/>
+	<component id="MenuBarSkin" class="org.apache.flex.components.sparkMenu.skin.MenuBarSkin"/>
+	<component id="MenuBarItemRenderer" class="org.apache.flex.components.sparkMenu.skin.MenuBarItemRenderer"/>
+	<component id="IListItemRenderer" class="org.apache.flex.components.sparkMenu.IListItemRenderer"/>
+	<!-- ProgressBar classes and skins -->
+	<component id="ProgressBar" class="org.apache.flex.components.sparkProgressBar.ProgressBar"/>
+	<component id="ProgressBarSkin" class="org.apache.flex.components.sparkProgressBar.skin.ProgressBarSkin"/>
+
+    <component id="SolidColor" class="mx.graphics.SolidColor" lookupOnly="true"/>
+    <component id="SolidColorStroke" class="mx.graphics.SolidColorStroke" lookupOnly="true"/>
+</componentPackage>

Copied: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/spark-manifest.xml (from r1422292, incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml)
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/spark-manifest.xml?p2=incubator/flex/sdk/branches/develop/frameworks/projects/experimental/spark-manifest.xml&p1=incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml&r1=1422292&r2=1422462&rev=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/manifest.xml (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/spark-manifest.xml Sun Dec 16 04:38:49 2012
@@ -1,28 +1,48 @@
-<?xml version="1.0"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
-
-<!--
-
-    Experimental Components
-
--->
-<componentPackage>
-
-</componentPackage>
+<?xml version="1.0"?>
+<!--
+
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+-->
+
+<!--
+
+    Experimental Components
+
+-->
+<componentPackage>
+
+    <!-- Special Components -->
+    <component id="State" class="mx.states.State" lookupOnly="true"/>
+
+    <!-- Flex 3 Graphics -->
+    <component id="BitmapFill" class="mx.graphics.BitmapFill" lookupOnly="true"/>
+    <component id="BitmapResizeMode" class="mx.graphics.BitmapResizeMode" lookupOnly="true"/>
+    <component id="CompoundTransform" class="mx.geom.CompoundTransform" lookupOnly="true"/>
+    <component id="GradientEntry" class="mx.graphics.GradientEntry" lookupOnly="true"/>
+    <component id="LinearGradient" class="mx.graphics.LinearGradient" lookupOnly="true"/>
+    <component id="LinearGradientStroke" class="mx.graphics.LinearGradientStroke" lookupOnly="true"/>
+    <component id="RadialGradient" class="mx.graphics.RadialGradient" lookupOnly="true"/>
+    <component id="RadialGradientStroke" class="mx.graphics.RadialGradientStroke" lookupOnly="true"/>
+    <component id="SolidColor" class="mx.graphics.SolidColor" lookupOnly="true"/>
+    <component id="SolidColorStroke" class="mx.graphics.SolidColorStroke" lookupOnly="true"/>
+    <component id="Stroke" class="mx.graphics.Stroke" lookupOnly="true"/>
+    <component id="Transform" class="mx.geom.Transform" lookupOnly="true"/>
+
+    <!-- Spark Graphics -->
+    <component id="BitmapGraphic" class="spark.primitives.BitmapImage" lookupOnly="true"/>
+    <component id="BitmapImage" class="spark.primitives.BitmapImage" lookupOnly="true"/>
+</componentPackage>

Modified: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/ExperimentalClasses.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/ExperimentalClasses.as?rev=1422462&r1=1422461&r2=1422462&view=diff
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/ExperimentalClasses.as (original)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/ExperimentalClasses.as Sun Dec 16 04:38:49 2012
@@ -16,20 +16,15 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-
 package
 {
-	
 	internal class ExperimentalClasses
 	{
-		
 		/**
 		 *  @private
 		 *  This class is used to link additional classes into experimental.swc
 		 *  beyond those that are found by dependecy analysis starting
 		 *  from the classes specified in manifest.xml.
 		 */
-		
 	}
-	
 }

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/Alert.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/Alert.as?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/Alert.as (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/Alert.as Sun Dec 16 04:38:49 2012
@@ -0,0 +1,840 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.components.sparkAlert
+{
+	import flash.display.Sprite;
+	import flash.events.EventPhase;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+	import flash.ui.Keyboard;
+	import flash.utils.getQualifiedClassName;
+
+	import mx.core.FlexGlobals;
+	import mx.core.IFlexDisplayObject;
+	import mx.core.IFlexModule;
+	import mx.core.IFlexModuleFactory;
+	import mx.core.UIComponent;
+	import mx.events.CloseEvent;
+	import mx.events.FlexEvent;
+	import mx.managers.IActiveWindowManager;
+	import mx.managers.ISystemManager;
+	import mx.managers.PopUpManager;
+	import mx.resources.ResourceManager;
+	import mx.styles.CSSStyleDeclaration;
+	import mx.styles.IStyleManager2;
+	import mx.styles.StyleManager;
+
+	import org.apache.flex.components.sparkAlert.skin.AlertSkin;
+
+	import spark.components.Button;
+	import spark.components.Group;
+	import spark.components.Panel;
+	import spark.components.supportClasses.TextBase;
+
+
+	//--------------------------------------
+	//  Styles
+	//--------------------------------------
+
+	/**
+	 *  Name of the CSS style declaration that specifies
+	 *  styles for the Alert buttons.
+	 *
+	 *  @default "alertButtonStyle"
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Style(name="buttonStyleName", type="String", inherit="no")]
+
+	/**
+	 *  Name of the CSS style declaration that specifies
+	 *  styles for the Alert message text.
+	 *
+	 *  <p>You only set this style by using a type selector, which sets the style
+	 *  for all Alert controls in your application.
+	 *  If you set it on a specific instance of the Alert control, it can cause the control to
+	 *  size itself incorrectly.</p>
+	 *
+	 *  @default undefined
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Style(name="messageStyleName", type="String", inherit="no")]
+
+
+	//--------------------------------------
+	//  Other metadata
+	//--------------------------------------
+
+	[RequiresDataBinding(true)]
+
+	[ResourceBundle("alert")]
+
+	/**
+	 *  The Alert control is a pop-up dialog box that can contain a message,
+	 *  a title, buttons (any combination of OK, Cancel, Yes, and No) and an icon.
+	 *  The Alert control is modal, which means it will retain focus until the user closes it.
+	 *
+	 *  <p>Import the org.apache.flex.components.spark.components.alert.Alert class into your application,
+	 *  and then call the static <code>show()</code> method in ActionScript to display
+	 *  an Alert control. You cannot create an Alert control in MXML.</p>
+	 *
+	 *  <p>The Alert control closes when you select a button in the control,
+	 *  or press the Escape key.</p>
+	 *
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	/**
+	 * @author Bogdan Dinu (http://www.badu.ro)
+	 */
+	public class Alert extends Panel
+	{
+		[SkinPart(required="false")]
+		public var messageDisplay	: TextBase;
+
+		[SkinPart(required="false")]
+		public var buttonGroup:Group;
+
+		[SkinPart(required="false")]
+		public var iconGroup:Group;
+
+		//----------------------------------
+		//  buttonHeight
+		//----------------------------------
+
+		[Inspectable(category="Size")]
+
+		/**
+		 *  Height of each Alert button, in pixels.
+		 *  All buttons must be the same height.
+		 *
+		 *  @default 24
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static var buttonHeight:Number = 24;
+
+		//----------------------------------
+		//  buttonWidth
+		//----------------------------------
+
+		[Inspectable(category="Size")]
+
+		/**
+		 *  Width of each Alert button, in pixels.
+		 *  All buttons must be the same width.
+		 *
+		 *  @default 65
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static var buttonWidth:Number = 65;
+		/**
+		 *  Value that enables a Yes button on the Alert control when passed
+		 *  as the <code>flags</code> parameter of the <code>show()</code> method.
+		 *  You can use the | operator to combine this bitflag
+		 *  with the <code>OK</code>, <code>CANCEL</code>,
+		 *  <code>NO</code>.
+		 *
+		 *   @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static const YES : uint = 0x0001;
+		/**
+		 *  Value that enables a No button on the Alert control when passed
+		 *  as the <code>flags</code> parameter of the <code>show()</code> method.
+		 *  You can use the | operator to combine this bitflag
+		 *  with the <code>OK</code>, <code>CANCEL</code>,
+		 *  <code>YES</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static const NO : uint = 0x0002;
+		/**
+		 *  Value that enables an OK button on the Alert control when passed
+		 *  as the <code>flags</code> parameter of the <code>show()</code> method.
+		 *  You can use the | operator to combine this bitflag
+		 *  with the <code>CANCEL</code>, <code>YES</code>,
+		 *  <code>NO</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static const OK : uint = 0x0004;
+		/**
+		 *  Value that enables a Cancel button on the Alert control when passed
+		 *  as the <code>flags</code> parameter of the <code>show()</code> method.
+		 *  You can use the | operator to combine this bitflag
+		 *  with the <code>OK</code>, <code>YES</code>,
+		 *  <code>NO</code>.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static const CANCEL : uint = 0x0008;
+		/**
+		 *  The label for the Yes button.
+		 *
+		 *  <p>If you use a different label, you may need to adjust the
+		 *  <code>buttonWidth</code> property to fully display the label.</p>
+		 *
+		 *  The English resource bundle sets this property to "YES".
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private static var _yesLabel : String;
+		private static var _yesLabelOverride : String;
+		[Inspectable(category="General")]
+		public static function get YES_LABEL():String
+		{
+			if (!_yesLabel) _yesLabel = ResourceManager.getInstance().getString('alert','YesLabel');
+			return _yesLabelOverride ? _yesLabelOverride : _yesLabel;
+		}
+
+		public static function set YES_LABEL(value:String):void
+		{
+			_yesLabelOverride = value;
+		}
+		/**
+		 *  The label for the No button.
+		 *
+		 *  <p>If you use a different label, you may need to adjust the
+		 *  <code>buttonWidth</code> property to fully display it.</p>
+		 *
+		 *  The English resource bundle sets this property to "NO".
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private static var _noLabel : String;
+		private static var _noLabelOverride : String;
+		[Inspectable(category="General")]
+		public static function get NO_LABEL():String
+		{
+			if (!_noLabel) _noLabel = ResourceManager.getInstance().getString('alert','NoLabel');
+			return _noLabelOverride ? _noLabelOverride : _noLabel;
+		}
+
+		public static function set NO_LABEL(value:String):void
+		{
+			_noLabelOverride = value;
+		}
+		/**
+		 *  The label for the OK button.
+		 *
+		 *  <p>If you use a different label, you may need to adjust the
+		 *  <code>buttonWidth</code> property to fully display the label.</p>
+		 *
+		 *  The English resource bundle sets this property to "OK".
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private static var _okLabel : String;
+		private static var _okLabelOverride : String;
+		[Inspectable(category="General")]
+		public static function get OK_LABEL():String
+		{
+			if (!_okLabel) _okLabel = ResourceManager.getInstance().getString('Alert','OkLabel');
+			return _okLabelOverride ? _okLabelOverride : _okLabel;
+		}
+
+		public static function set OK_LABEL(value:String):void
+		{
+			_okLabelOverride = value;
+		}
+		/**
+		 *  The label for the Cancel button.
+		 *
+		 *  <p>If you use a different label, you may need to adjust the
+		 *  <code>buttonWidth</code> property to fully display it.</p>
+		 *
+		 *  The English resource bundle sets this property to "CANCEL".
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private static var _cancelLabel : String;
+		private static var _cancelLabelOverride : String;
+		[Inspectable(category="General")]
+		public static function get CANCEL_LABEL():String
+		{
+			if (!_cancelLabel) _cancelLabel = ResourceManager.getInstance().getString('alert','CancelLabel');
+			return _cancelLabelOverride ? _cancelLabelOverride : _cancelLabel;
+		}
+
+		public static function set CANCEL_LABEL(value:String):void
+		{
+			_cancelLabelOverride = value;
+		}
+
+		private static var defaultStylesSet                : Boolean;
+
+		private var _message:String;
+		private var _defaultButtonIndex:uint = 0;
+		private var _buttons:Vector.<Button>;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Static method that pops up the Alert control. The Alert control
+		 *  closes when you select a button in the control, or press the Escape key.
+		 *
+		 *  @param text Text string that appears in the Alert control.
+		 *  This text is centered in the alert dialog box.
+		 *
+		 *  @param title Text string that appears in the title bar.
+		 *  This text is left justified.
+		 *
+		 *  @param flags Which buttons to place in the Alert control.
+		 *  Valid values are <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+		 *  <code>Alert.YES</code>, and <code>Alert.NO</code>.
+		 *  The default value is <code>Alert.OK</code>.
+		 *  Use the bitwise OR operator to display more than one button.
+		 *  For example, passing <code>(Alert.YES | Alert.NO)</code>
+		 *  displays Yes and No buttons.
+		 *  Regardless of the order that you specify buttons,
+		 *  they always appear in the following order from left to right:
+		 *  OK, Yes, No, Cancel.
+		 *
+		 *  @param parent Object upon which the Alert control centers itself.
+		 *
+		 *  @param closeHandler Event handler that is called when any button
+		 *  on the Alert control is pressed.
+		 *  The event object passed to this handler is an instance of CloseEvent;
+		 *  the <code>detail</code> property of this object contains the value
+		 *  <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+		 *  <code>Alert.YES</code>, or <code>Alert.NO</code>.
+		 *
+		 *  @param iconClass Class of the icon that is placed to the left
+		 *  of the text in the Alert control.
+		 *
+		 *  @param defaultButtonFlag A bitflag that specifies the default button.
+		 *  You can specify one and only one of
+		 *  <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+		 *  <code>Alert.YES</code>, or <code>Alert.NO</code>.
+		 *  The default value is <code>Alert.OK</code>.
+		 *  Pressing the Enter key triggers the default button
+		 *  just as if you clicked it. Pressing Escape triggers the Cancel
+		 *  or No button just as if you selected it.
+		 *
+		 *  @param moduleFactory The moduleFactory where this Alert should look for
+		 *  its embedded fonts and style manager.
+		 *
+		 *  @return A reference to the Alert control.
+		 *
+		 *  @see mx.events.CloseEvent
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public static function show(
+			message:String = "",
+			title:String = "",
+			flags : uint = OK,
+			parent:Sprite = null,
+			closeHandler:Function = null,
+			iconClass:Class = null,
+			defaultButtonIndex:uint = 0 /* Alert.OK */,
+			modal:Boolean = true,
+			moduleFactory:IFlexModuleFactory = null
+		):Alert
+		{
+			if (!parent)
+			{
+				var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
+				// no types so no dependencies
+				var mp:Object = sm.getImplementation("mx.managers.IMarshallPlanSystemManager");
+				if (mp && mp.useSWFBridge())
+					parent = Sprite(sm.getSandboxRoot());
+				else
+					parent = Sprite(FlexGlobals.topLevelApplication);
+			}
+
+			var alert:Alert = new Alert();
+			alert.buttonsFlag = flags;
+			alert.defaultButtonIndex = defaultButtonIndex;
+
+			alert.message = message;
+			alert.title = title;
+			alert.iconClass = iconClass;
+
+			if (closeHandler != null)
+				alert.addEventListener(CloseEvent.CLOSE, closeHandler);
+
+			// Setting a module factory allows the correct embedded font to be found.
+			if (moduleFactory)
+				alert.moduleFactory = moduleFactory;
+			else if (parent is IFlexModule)
+				alert.moduleFactory = IFlexModule(parent).moduleFactory;
+			else
+			{
+				if (parent is IFlexModuleFactory)
+					alert.moduleFactory = IFlexModuleFactory(parent);
+				else
+					alert.moduleFactory = FlexGlobals.topLevelApplication.moduleFactory;
+
+				// also set document if parent isn't a UIComponent
+				if (!parent is UIComponent)
+					alert.document = FlexGlobals.topLevelApplication.document;
+			}
+
+			alert.addEventListener(FlexEvent.CREATION_COMPLETE, staticCreationComplete);
+			PopUpManager.addPopUp(alert, parent, modal);
+
+			return alert;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class event handlers
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		private static function staticCreationComplete(event:FlexEvent):void
+		{
+			if (event.target is IFlexDisplayObject && event.eventPhase == EventPhase.AT_TARGET)
+			{
+				var alert:Alert = Alert(event.target);
+				alert.removeEventListener(FlexEvent.CREATION_COMPLETE, staticCreationComplete);
+				alert.setActualSize(alert.getExplicitOrMeasuredWidth(), alert.getExplicitOrMeasuredHeight());
+				PopUpManager.centerPopUp( alert );
+			}
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function Alert()
+		{
+			super();
+			title = "";
+			message = "";
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		//--------------------------------------------------------------------------
+		//
+		//  Properties
+		//
+		//--------------------------------------------------------------------------
+
+
+		//----------------------------------
+		//  buttonFlags
+		//----------------------------------
+
+		private var _buttonsFlag : uint;
+		/**
+		 *  A bitmask that contains <code>Alert.OK</code>, <code>Alert.CANCEL</code>,
+		 *  <code>Alert.YES</code>, and/or <code>Alert.NO</code> indicating
+		 *  the buttons available in the Alert control.
+		 *
+		 *  @default Alert.OK
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function get buttonsFlag():uint
+		{
+			return _buttonsFlag;
+		}
+		public function set buttonsFlag( flags : uint ):void
+		{
+			_buttonsFlag = flags;
+		}
+
+		//----------------------------------
+		//  defaultButtonFlag
+		//----------------------------------
+
+		[Inspectable(category="General")]
+
+		/**
+		 *  A bitflag that contains either <code>Alert.OK</code>,
+		 *  <code>Alert.CANCEL</code>, <code>Alert.YES</code>,
+		 *  or <code>Alert.NO</code> to specify the default button.
+		 *
+		 *  @default Alert.OK
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get defaultButtonIndex():int
+		{
+			return _defaultButtonIndex;
+		}
+		public function set defaultButtonIndex( value:int ):void
+		{
+			_defaultButtonIndex = value;
+		}
+
+		//----------------------------------
+		//  iconClass
+		//----------------------------------
+		private var _iconClass:Class;
+		[Inspectable(category="Other")]
+
+		/**
+		 *  The class of the icon to display.
+		 *  You typically embed an asset, such as a JPEG or GIF file,
+		 *  and then use the variable associated with the embedded asset
+		 *  to specify the value of this property.
+		 *
+		 *  @default null
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get iconClass():Class
+		{
+			return _iconClass;
+		}
+		public function set iconClass( value:Class ):void
+		{
+			_iconClass = value;
+		}
+
+		//----------------------------------
+		//  text
+		//----------------------------------
+
+		[Inspectable(category="General")]
+
+		/**
+		 *  The text to display in this alert dialog box.
+		 *
+		 *  @default ""
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function get message():String
+		{
+			return _message;
+		}
+		public function set message( value:String ):void
+		{
+			if( _message == value ) return;
+			_message = value
+			if( messageDisplay ) messageDisplay.text = _message;
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		override public function styleChanged(styleProp:String):void
+		{
+			super.styleChanged(styleProp);
+			var all:Boolean = ( !styleProp || styleProp == "styleName" )
+			if( ( all || styleProp == "buttonStyleName" ) && _buttons )
+			{
+				var buttonStyleName:String = getStyle("buttonStyleName");
+				var n:int = _buttons.length;
+				for (var i:int = 0; i < n; i++)
+				{
+					_buttons[ i ].styleName = buttonStyleName;
+				}
+			}
+			if( ( all || styleProp == "messageStyleName" ) && messageDisplay )
+			{
+				var messageStyleName:String = getStyle("messageStyleName");
+				messageDisplay.styleName = messageStyleName;
+			}
+		}
+
+		override protected function partAdded( partName:String, instance:Object ):void
+		{
+			super.partAdded( partName, instance );
+			if( partName == "buttonGroup" ) createButtons( Group( instance ) );
+			if( partName == "messageDisplay" )
+			{
+				messageDisplay.text = message;
+				messageDisplay.styleName = getStyle("messageStyleName");
+			}
+			if( partName == "iconGroup" ) createIcon( Group( instance ) );
+		}
+
+		override protected function partRemoved( partName:String, instance:Object ):void
+		{
+			super.partAdded( partName, instance );
+			if( partName == "buttonGroup" ) destroyButtons( Group( instance ) );
+		}
+
+		override public function set initialized(value:Boolean):void
+		{
+			super.initialized = value;
+			setButtonFocus();
+		}
+
+		override public function set moduleFactory(factory:IFlexModuleFactory):void
+		{
+			super.moduleFactory = factory;
+			prototype.constructor.setDefaultStyles( factory );
+		}
+		//--------------------------------------------------------------------------
+		//
+		//  private methods
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 *  @private
+		 */
+		private function createIcon( container:Group ):void
+		{
+			if( !container || !_iconClass ) return;
+			var iconHolder : UIComponent = new UIComponent();
+			iconHolder.addChild( new _iconClass() );
+			container.addElement( iconHolder );
+		}
+		/**
+		 *  @private
+		 */
+		private function createButtons( container:Group ):void
+		{
+			if( !container || !buttonsFlag ) return;
+			_buttons = new Vector.<Button>();
+
+			var _buttonLabels : Array = new Array();
+			if (Boolean(_buttonsFlag & YES))
+				_buttonLabels.push(YES_LABEL);
+			if (Boolean(_buttonsFlag & NO))
+				_buttonLabels.push(NO_LABEL);
+			if (Boolean(_buttonsFlag & OK))
+				_buttonLabels.push(OK_LABEL);
+			if (Boolean(_buttonsFlag & CANCEL))
+				_buttonLabels.push(CANCEL_LABEL);
+			if (!_buttonLabels.length)
+				_buttonLabels.push(OK_LABEL);
+
+
+			var buttonStyleName:String = getStyle("buttonStyleName");
+			var button:Button;
+			var numButtons:int = _buttonLabels.length;
+			for( var i:int = 0; i < numButtons; i++ )
+			{
+				button = new Button();
+				if( buttonStyleName ) button.styleName = buttonStyleName;
+				button.label = _buttonLabels[ i ];
+				button.useHandCursor = true;
+				button.mouseChildren = false;
+				button.buttonMode = true;
+				button.width = buttonWidth;
+				button.height = buttonHeight;
+				button.addEventListener( MouseEvent.CLICK, onButtonClick, false, 0, true );
+				container.addElement( button );
+				_buttons.push( button );
+			}
+			addEventListener(KeyboardEvent.KEY_DOWN , onKeyDown);
+			setButtonFocus();
+		}
+		/**
+		 *  @private
+		 */
+		private function destroyButtons( container:Group ):void
+		{
+			removeEventListener(KeyboardEvent.KEY_DOWN , onKeyDown);
+			var button:Button;
+			var numButtons:int = _buttons.length;
+			for( var i:int = 0; i < numButtons; i++ )
+			{
+				button = _buttons[ i ];
+				button.removeEventListener( MouseEvent.CLICK, onButtonClick, false );
+				if( container ) container.removeElement( button );
+			}
+			_buttons = null;
+		}
+		/**
+		 *  @private
+		 */
+		private function identifyButton( target : Button ) : uint
+		{
+			var result : uint;
+			switch (target.label)
+			{
+				case OK_LABEL:
+					result = OK;
+					break;
+				case CANCEL_LABEL:
+					result = CANCEL;
+					break;
+				case YES_LABEL:
+					result = YES;
+					break;
+				case NO_LABEL:
+					result = NO;
+					break;
+				default:
+					result = Number.MAX_VALUE;
+					break;
+			}
+			return result;
+		}
+		/**
+		 *  @private
+		 */
+		private function onButtonClick( event:MouseEvent ):void
+		{
+			removeAlert( identifyButton( Button( event.currentTarget ) ) );
+		}
+		/**
+		 *  @private
+		 */
+		private function removeAlert( index:int ):void
+		{
+			visible = false;
+			dispatchEvent( new CloseEvent( CloseEvent.CLOSE, false, false, index ) );
+			mx.managers.PopUpManager.removePopUp( this );
+			if( _buttons ) destroyButtons( buttonGroup );
+		}
+		/**
+		 *  @private
+		 */
+		private function setButtonFocus():void
+		{
+			if( !initialized ) return;
+			var sm:ISystemManager = systemManager;
+			var awm:IActiveWindowManager = IActiveWindowManager(sm.getImplementation("mx.managers::IActiveWindowManager"));
+			if (awm) awm.activate( this );
+			if( _buttons )
+			{
+				if( _defaultButtonIndex >= 0 && _defaultButtonIndex < _buttons.length - 1 )
+				{
+					_buttons[ _defaultButtonIndex ].setFocus();
+					_buttons[ _defaultButtonIndex ].drawFocus( true );
+				}
+			}
+		}
+		/**
+		 * @private
+		 */
+		private function onKeyDown(e:KeyboardEvent):void
+		{
+			if (e.charCode == Keyboard.ESCAPE)
+			{
+				removeAlert(identifyButton(_buttons[ _defaultButtonIndex ] as Button));
+			}
+		}
+		/**
+		 * Declares the default skinClass, in case it's not mentioned a custom skinning
+		 * Custom skinning example
+		 *
+		 * @namespace alert "org.apache.flex.components.spark.components.alert.*";
+		 * 		alert|Alert
+		 * 						{
+		 * 								buttonStyleName : "aButtonStyleName";//can customize button skins too
+		 * 								skinClass : ClassReference('path.to.your.custom.skin.AlertSkin');
+		 * 						}
+		 *
+		 *  @private
+		 *
+		 */
+		private static function setDefaultStyles( factory:IFlexModuleFactory ):void
+		{
+			if( defaultStylesSet ) return;
+			defaultStylesSet = true;
+			var defaultStyleName:String = getQualifiedClassName( prototype.constructor ).replace( /::/, "." );
+			var styleManager:IStyleManager2 = StyleManager.getStyleManager( factory );
+			var style:CSSStyleDeclaration = styleManager.getStyleDeclaration( defaultStyleName );
+			if( !style )
+			{
+				style = new CSSStyleDeclaration();
+				styleManager.setStyleDeclaration( defaultStyleName, style, true );
+			}
+			if( style.defaultFactory == null )
+			{
+				style.defaultFactory = function():void
+				{
+					this.skinClass = org.apache.flex.components.sparkAlert.skin.AlertSkin;
+				};
+			}
+		}
+	}
+}

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/AlertSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/AlertSkin.mxml?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/AlertSkin.mxml (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkAlert/skin/AlertSkin.mxml Sun Dec 16 04:38:49 2012
@@ -0,0 +1,289 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+			 xmlns:fb="http://ns.adobe.com/flashbuilder/2009" blendMode="normal" mouseEnabled="false" 
+			 minWidth="131" minHeight="30" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+	<!--
+	////////////////////////////////////////////////////////////////////////////////
+	//
+	//  Licensed to the Apache Software Foundation (ASF) under one or more
+	//  contributor license agreements.  See the NOTICE file distributed with
+	//  this work for additional information regarding copyright ownership.
+	//  The ASF licenses this file to You under the Apache License, Version 2.0
+	//  (the "License"); you may not use this file except in compliance with
+	//  the License.  You may obtain a copy of the License at
+	//
+	//      http://www.apache.org/licenses/LICENSE-2.0
+	//
+	//  Unless required by applicable law or agreed to in writing, software
+	//  distributed under the License is distributed on an "AS IS" BASIS,
+	//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	//  See the License for the specific language governing permissions and
+	//  limitations under the License.
+	//
+	////////////////////////////////////////////////////////////////////////////////
+	@author Bogdan Dinu (http://www.badu.ro)
+	-->
+	<fx:Metadata>
+		<![CDATA[ 
+		[HostComponent("org.apache.flex.components.sparkAlert.Alert")]
+		]]>
+	</fx:Metadata> 
+	
+	<fx:Script fb:purpose="styling">
+		/* Define the skin elements that should not be colorized. 
+		For panel, border and title background are skinned, but the content area and title text are not. */
+		static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"];
+		
+		/**
+		 * @private
+		 */  
+		override public function get colorizeExclusions():Array {return exclusions;}
+		
+		/**
+		 * @private
+		 */
+		override protected function initializationComplete():void
+		{
+			useChromeColor = true;
+			super.initializationComplete();
+		}
+		
+		/**
+		 * @private
+		 */
+		override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+		{
+			if (getStyle("borderVisible") == true)
+			{
+				border.visible = true;
+				background.left = background.top = background.right = background.bottom = 1;
+				contents.left = contents.top = contents.right = contents.bottom = 1;
+			}
+			else
+			{
+				border.visible = false;
+				background.left = background.top = background.right = background.bottom = 0;
+				contents.left = contents.top = contents.right = contents.bottom = 0;
+			}
+			
+			dropShadow.visible = getStyle("dropShadowVisible");
+			
+			var cr:Number = getStyle("cornerRadius");
+			var withControls:Boolean = 
+				(currentState == "disabledWithControlBar" || 
+					currentState == "normalWithControlBar");
+			
+			if (cornerRadius != cr)
+			{
+				cornerRadius = cr;
+				
+				dropShadow.tlRadius = cornerRadius;
+				dropShadow.trRadius = cornerRadius;
+				dropShadow.blRadius = withControls ? cornerRadius : 0;
+				dropShadow.brRadius = withControls ? cornerRadius : 0;
+				
+				setPartCornerRadii(topMaskRect, withControls); 
+				setPartCornerRadii(border, withControls); 
+				setPartCornerRadii(background, withControls);                
+			}
+			
+			if (bottomMaskRect) setPartCornerRadii(bottomMaskRect, withControls); 
+			
+			borderStroke.color = getStyle("borderColor");
+			borderStroke.alpha = getStyle("borderAlpha");
+			backgroundFill.color = getStyle("backgroundColor");
+			backgroundFill.alpha = getStyle("backgroundAlpha");
+			
+			super.updateDisplayList(unscaledWidth, unscaledHeight);
+		}
+		
+		/**
+		 * @private
+		 */  
+		private function setPartCornerRadii(target:Rect, includeBottom:Boolean):void
+		{            
+			target.topLeftRadiusX = cornerRadius;
+			target.topRightRadiusX = cornerRadius;
+			target.bottomLeftRadiusX = includeBottom ? cornerRadius : 0;
+			target.bottomRightRadiusX = includeBottom ? cornerRadius : 0;
+		}
+		
+		private var cornerRadius:Number;
+	</fx:Script>
+	
+	<fx:Declarations>
+		<s:Group id="contentGroup" />
+	</fx:Declarations>
+	
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="disabled" />
+		<s:State name="normalWithControlBar" stateGroups="withControls" />
+		<s:State name="disabledWithControlBar" stateGroups="withControls" />
+	</s:states>
+	
+	<!-- drop shadow can't be hittable so it stays sibling of other graphics -->
+	<!--- @private -->
+	<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.32" distance="11" 
+							 angle="90" color="#000000" left="0" top="0" right="0" bottom="0"/>
+	
+	<!-- drop shadow can't be hittable so all other graphics go in this group -->
+	<s:Group left="0" right="0" top="0" bottom="0">
+		
+		<!-- top group mask -->
+		<!--- @private -->
+		<s:Group left="1" top="1" right="1" bottom="1" id="topGroupMask" >
+			<!--- @private -->
+			<s:Rect id="topMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!-- bottom group mask -->
+		<!--- @private -->
+		<s:Group left="1" top="1" right="1" bottom="1" id="bottomGroupMask" 
+				 includeIn="normalWithControlBar, disabledWithControlBar">
+			<!--- @private -->
+			<s:Rect id="bottomMaskRect" left="0" top="0" right="0" bottom="0">
+				<s:fill>
+					<s:SolidColor alpha="0"/>
+				</s:fill>
+			</s:Rect>
+		</s:Group>
+		
+		<!-- layer 1: border -->
+		<!--- @private -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" >
+			<s:stroke>
+				<!--- @private -->
+				<s:SolidColorStroke id="borderStroke" weight="1" />
+			</s:stroke>
+		</s:Rect>
+		
+		<!-- layer 2: background fill -->
+		<!--- Defines the appearance of the PanelSkin class's background. -->
+		<s:Rect id="background" left="1" top="1" right="1" bottom="1">
+			<s:fill>
+				<!--- @private
+				Defines the  PanelSkin class's background fill. The default color is 0xFFFFFF. -->
+				<s:SolidColor id="backgroundFill" color="#FFFFFF"/>
+			</s:fill>
+		</s:Rect>
+		
+		<!-- layer 3: contents -->
+		<!--- Contains the vertical stack of titlebar content and controlbar. -->
+		<s:Group left="1" right="1" top="1" bottom="1" id="contents">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="justify" />
+			</s:layout>
+			
+			<!--- @private -->
+			<s:Group id="topGroup" mask="{topGroupMask}">
+				
+				<!-- layer 0: title bar fill -->
+				<!--- @private -->
+				<s:Rect id="tbFill" left="0" right="0" top="0" bottom="1">
+					<s:fill>
+						<s:LinearGradient rotation="90">
+							<s:GradientEntry color="0xE2E2E2" />
+							<s:GradientEntry color="0xD9D9D9" />
+						</s:LinearGradient>
+					</s:fill>
+				</s:Rect>
+				
+				<!-- layer 1: title bar highlight -->
+				<!--- @private -->
+				<s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+					<s:stroke>
+						<s:LinearGradientStroke rotation="90" weight="1">
+							<s:GradientEntry color="0xEAEAEA" />
+							<s:GradientEntry color="0xD9D9D9" />
+						</s:LinearGradientStroke>
+					</s:stroke>
+				</s:Rect>
+				
+				<!-- layer 2: title bar divider -->
+				<!--- @private -->
+				<s:Rect id="tbDiv" left="0" right="0" height="1" bottom="0">
+					<s:fill>
+						<s:SolidColor color="0xC0C0C0" />
+					</s:fill>
+				</s:Rect>
+				
+				<!-- layer 3: text -->
+				<!--- @copy spark.components.Panel#titleDisplay -->
+				<s:Label id="titleDisplay" maxDisplayedLines="1"
+						 left="9" right="3" top="1" bottom="0" minHeight="30"
+						 verticalAlign="middle" fontWeight="bold">
+				</s:Label>
+			</s:Group>
+			
+			<!--
+			Note: setting the minimum size to 0 here so that changes to the host component's
+			size will not be thwarted by this skin part's minimum size.   This is a compromise,
+			more about it here: http://bugs.adobe.com/jira/browse/SDK-21143
+			-->
+			<!--- @copy spark.components.SkinnableContainer#contentGroup -->
+			<!--<s:Group id="contentGroup" width="100%" height="100%" minWidth="0" minHeight="0">
+			</s:Group>-->
+			<s:HGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center">
+				<s:Group id="iconGroup" height="100%">
+					
+				</s:Group>
+				<s:VGroup width="100%" height="100%" paddingLeft="5" paddingRight="5" paddingBottom="5"
+						  verticalAlign="middle" horizontalAlign="center">
+					<s:RichText id="messageDisplay"
+							 left="9" right="3" top="1" bottom="0" minHeight="30" maxWidth="400"
+							 verticalAlign="middle"/>
+					<s:HGroup id="buttonGroup" width="100%" minWidth="0" minHeight="0"
+							   horizontalAlign="center"/>
+				</s:VGroup>
+			</s:HGroup>
+			
+			
+			<!--- @private -->
+			<s:Group id="bottomGroup" minWidth="0" minHeight="0"
+					 includeIn="normalWithControlBar, disabledWithControlBar" >
+				
+				<s:Group left="0" right="0" top="0" bottom="0" mask="{bottomGroupMask}">
+					
+					<!-- layer 0: control bar divider line -->
+					<s:Rect left="0" right="0" top="0" height="1" alpha="0.22">
+						<s:fill>
+							<s:SolidColor color="0x000000" />
+						</s:fill>
+					</s:Rect>
+					
+					<!-- layer 1: control bar highlight -->
+					<s:Rect left="0" right="0" top="1" bottom="0">
+						<s:stroke>
+							<s:LinearGradientStroke rotation="90" weight="1">
+								<s:GradientEntry color="0xE5E5E5" />
+								<s:GradientEntry color="0xD8D8D8" />
+							</s:LinearGradientStroke>
+						</s:stroke>
+					</s:Rect>
+					
+					<!-- layer 2: control bar fill -->
+					<s:Rect left="1" right="1" top="2" bottom="1">
+						<s:fill>
+							<s:LinearGradient rotation="90">
+								<s:GradientEntry color="0xDADADA" />
+								<s:GradientEntry color="0xC5C5C5" />
+							</s:LinearGradient>
+						</s:fill>
+					</s:Rect>
+				</s:Group>
+				<!-- layer 3: control bar -->
+				<!--- @copy spark.components.Panel#controlBarGroup -->
+				<s:Group id="controlBarGroup" left="0" right="0" top="1" bottom="1" minWidth="0" minHeight="0">
+					<s:layout>
+						<s:HorizontalLayout paddingLeft="10" paddingRight="10" paddingTop="7" paddingBottom="7" gap="10" />
+					</s:layout>
+				</s:Group>
+			</s:Group>
+		</s:Group>
+	</s:Group>
+</s:SparkSkin>
\ No newline at end of file

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/ColorPicker.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/ColorPicker.as?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/ColorPicker.as (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/ColorPicker.as Sun Dec 16 04:38:49 2012
@@ -0,0 +1,280 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.components.sparkColorPicker 
+{	
+	import flash.display.DisplayObject;
+	import flash.events.Event;
+	import flash.utils.getQualifiedClassName;
+	
+	import mx.collections.IList;
+	import mx.core.IFlexModuleFactory;
+	import mx.graphics.SolidColor;
+	import mx.styles.CSSStyleDeclaration;
+	import mx.styles.IStyleManager2;
+	import mx.styles.StyleManager;
+	
+	import spark.components.ComboBox;
+	import spark.events.DropDownEvent;
+	
+	import org.apache.flex.components.sparkColorPicker.skin.ColorPickerSkin;
+	import org.apache.flex.components.sparkColorPicker.util.ColorPickerUtil;
+	import org.apache.flex.components.sparkColorPicker.events.ColorChangeEvent;
+
+	/**
+	 * Dispatched when a color is choosed
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Event(name="choose", type="org.apache.flex.components.spark.events.ColorChangeEvent")]
+	/**
+	 * Dispatched when a color is hovered. Might be usefull in 'preview' situations
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	[Event(name="hover", type="org.apache.flex.components.spark.events.ColorChangeEvent")]
+	/**
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.1
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	/**
+	 *  Subclass DropDownList and make it work like a ColorPicker
+	 *   
+	 */
+	/**
+	 * @author Bogdan Dinu (http://www.badu.ro)
+	 */
+	public class ColorPicker extends ComboBox
+	{		
+		/**
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		[SkinPart(required="true")]
+		public var solidColor:SolidColor;
+		/**
+		 * Instance of utility which provides all colors and transforms uint values to it's hex 
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private static var util:ColorPickerUtil = new ColorPickerUtil();
+		/**
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function ColorPicker()
+		{
+			super();
+		}
+		/**
+		 * Upon children creation, we're setting the dataprovider to the colors list 
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override protected function childrenCreated():void
+		{
+			super.childrenCreated();
+			super.dataProvider = util.getColorsList();
+			labelFunction = blankLabelFunction;
+			labelToItemFunction = colorFunction;
+			openOnInput = false;
+			addEventListener(Event.CHANGE, onColorChange);
+		}		
+		/**
+		 * Converts the value to uint
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private function colorFunction(value:String):*
+		{
+			return uint(value);
+		}
+		/**
+		 * We're dispatching our event, instead of Event.CHANGE
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private function onColorChange(event:Event):void
+		{
+			if (solidColor)
+			{
+				solidColor.color = selectedItem;				
+				dispatchEvent(new ColorChangeEvent(ColorChangeEvent.CHOOSE, selectedItem));
+			}			
+		}
+		/**
+		 * Label function is required to be blank all the time
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		private function blankLabelFunction(item:Object):String
+		{
+			return "";
+		}	
+		/**
+		 * We never allow the dataProvider to be set
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */		
+		override public function set dataProvider(value:IList):void
+		{
+			
+		}
+		/**
+		 * Initialization of the selected color
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override protected function partAdded(partName:String, instance:Object):void
+		{
+			super.partAdded(partName, instance);			
+			if (instance == solidColor)
+			{
+				solidColor.color = selectedItem;
+			}
+		}
+		/**
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override public function setFocus():void
+		{
+			stage.focus = this;
+		}
+		/**
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override protected function isOurFocus(target:DisplayObject):Boolean
+		{
+			return target === this;
+		}
+		/**
+		 * The default behavior is prevented
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override protected function dropDownController_closeHandler(event:DropDownEvent):void
+		{
+			event.preventDefault();
+			super.dropDownController_closeHandler(event);
+		}
+		/**
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		override public function set selectedItem(value:*):void
+		{
+			super.selectedItem = value;
+			if (solidColor) solidColor.color = value;
+		}
+		/**
+		 * Duplicate of selectedItem property, just for naming to be right
+		 * 
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.1
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+		public function set selectedColor(value : uint):void
+		{
+			selectedItem(value);
+		}
+		public function get selectedColor():uint
+		{
+			return selectedItem;
+		}
+		
+		/**
+		 *  Skinning
+		 */		
+		private static var defaultStylesSet                : Boolean;
+		
+		override public function set moduleFactory(factory:IFlexModuleFactory):void
+		{
+			super.moduleFactory = factory;
+			prototype.constructor.setDefaultStyles( factory );
+		}
+		/**
+		 * Declares the default skinClass, in case it's not mentioned a custom skinning
+		 * If you want to customize skin, specify it in style declaration of your app.
+		 */
+		private static function setDefaultStyles( factory:IFlexModuleFactory ):void
+		{
+			if( defaultStylesSet ) return;			
+			defaultStylesSet = true;			
+			var defaultStyleName:String = getQualifiedClassName( prototype.constructor ).replace( /::/, "." );
+			var styleManager:IStyleManager2 = StyleManager.getStyleManager( factory );
+			var style:CSSStyleDeclaration = styleManager.getStyleDeclaration( defaultStyleName );			
+			if( !style )
+			{
+				style = new CSSStyleDeclaration();
+				styleManager.setStyleDeclaration( defaultStyleName, style, true );
+			}			
+			if( style.defaultFactory == null )
+			{
+				style.defaultFactory = function():void
+				{
+					this.skinClass = org.apache.flex.components.sparkColorPicker.skin.ColorPickerSkin;
+				};
+			}
+		}	
+	}	
+}
\ No newline at end of file

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/ColorChangeEvent.as
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/ColorChangeEvent.as?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/ColorChangeEvent.as (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/events/ColorChangeEvent.as Sun Dec 16 04:38:49 2012
@@ -0,0 +1,53 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.components.sparkColorPicker.events
+{
+	import flash.events.Event;
+	/**
+	 * @author Bogdan Dinu (http://www.badu.ro)
+	 */
+	public class ColorChangeEvent extends Event
+	{
+		public static const CHOOSE:String = "choose";
+		
+		public static const HOVER:String = "hover";
+		
+		public var color : uint;
+		
+		public function ColorChangeEvent(type:String, aColor : uint, bubbles:Boolean=false, cancelable:Boolean=false)
+		{
+			super(type, bubbles, cancelable);
+			color = aColor;
+		}
+		
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods: Event
+		//
+		//--------------------------------------------------------------------------
+		
+		/**
+		 *  @private
+		 */
+		override public function clone():Event
+		{
+			return new ColorChangeEvent(type, color, bubbles, cancelable);
+		}
+	}
+}
\ No newline at end of file

Added: incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerButtonSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerButtonSkin.mxml?rev=1422462&view=auto
==============================================================================
--- incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerButtonSkin.mxml (added)
+++ incubator/flex/sdk/branches/develop/frameworks/projects/experimental/src/org/apache/flex/components/sparkColorPicker/skin/ColorPickerButtonSkin.mxml Sun Dec 16 04:38:49 2012
@@ -0,0 +1,187 @@
+<?xml version="1.0" encoding="utf-8"?>
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" 
+    xmlns:fb="http://ns.adobe.com/flashbuilder/2009" minWidth="24" minHeight="24">
+	<!--
+	////////////////////////////////////////////////////////////////////////////////
+	//
+	//  Licensed to the Apache Software Foundation (ASF) under one or more
+	//  contributor license agreements.  See the NOTICE file distributed with
+	//  this work for additional information regarding copyright ownership.
+	//  The ASF licenses this file to You under the Apache License, Version 2.0
+	//  (the "License"); you may not use this file except in compliance with
+	//  the License.  You may obtain a copy of the License at
+	//
+	//      http://www.apache.org/licenses/LICENSE-2.0
+	//
+	//  Unless required by applicable law or agreed to in writing, software
+	//  distributed under the License is distributed on an "AS IS" BASIS,
+	//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	//  See the License for the specific language governing permissions and
+	//  limitations under the License.
+	//
+	////////////////////////////////////////////////////////////////////////////////
+	@author Bogdan Dinu (http://www.badu.ro)
+	-->
+    <fx:Metadata>
+    <![CDATA[ 
+        [HostComponent("spark.components.Button")]
+    ]]>
+    </fx:Metadata> 
+    
+     <fx:Script fb:purpose="styling">
+         /* Define the skin elements that should not be colorized. 
+            For dropDownList buttons, the graphics are colorized but the arrow is not. */
+         static private const exclusions:Array = ["icon"];
+
+         /**
+          * @private
+          */  
+         override public function get colorizeExclusions():Array {return exclusions;}
+                 
+         /**
+          * @private
+          */
+         override protected function initializationComplete():void
+         {
+             useChromeColor = true;
+             super.initializationComplete();
+         }
+         
+         /**
+          *  @private
+          */
+         override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+         {
+             var cr:Number = getStyle("cornerRadius");
+             
+             if (cornerRadius != cr)
+             {
+                 cornerRadius = cr;
+                 shadow.radiusX = cornerRadius;
+                 fill.radiusX = cornerRadius;
+                 lowlight.radiusX = cornerRadius;
+                 highlight.radiusX = cornerRadius;
+                 border.radiusX = cornerRadius;
+             }
+             
+             if (highlightStroke) highlightStroke.radiusX = cornerRadius;
+             if (hldownstroke1) hldownstroke1.radiusX = cornerRadius;
+             if (hldownstroke2) hldownstroke2.radiusX = cornerRadius;
+             
+             super.updateDisplayList(unscaledWidth, unscaledHeight);
+         }
+     
+     private var cornerRadius:Number = 2;
+    </fx:Script>
+      
+    <s:states>
+        <s:State name="up" />
+        <s:State name="over" />
+        <s:State name="down" />
+        <s:State name="disabled" />
+    </s:states>
+    
+    <s:Rect id="shadow" left="-1" right="-1" top="-1" bottom="-1" radiusX="2">
+        <s:fill>
+            <s:LinearGradient rotation="90">
+                <s:GradientEntry color="0x000000" 
+                               color.down="0xFFFFFF"
+                               alpha="0.01"
+                               alpha.down="0" />
+                <s:GradientEntry color="0x000000" 
+                               color.down="0xFFFFFF" 
+                               alpha="0.07"
+                               alpha.down="0.5" />
+            </s:LinearGradient>
+        </s:fill>
+    </s:Rect>
+    
+    <s:Rect id="fill" left="1" right="1" top="1" bottom="1" radiusX="2">
+        <s:fill>
+            <s:LinearGradient rotation="90">
+                <s:GradientEntry color="0xFFFFFF" 
+                               color.over="0xBBBDBD" 
+                               color.down="0xAAAAAA" 
+                               alpha="0.85" />
+                <s:GradientEntry color="0xD8D8D8" 
+                               color.over="0x9FA0A1" 
+                               color.down="0x929496" 
+                               alpha="0.85" />
+            </s:LinearGradient>
+        </s:fill>
+    </s:Rect>
+    
+    <s:Rect id="lowlight" left="1" right="1" top="1" bottom="1" radiusX="2">
+        <s:fill>
+            <s:LinearGradient rotation="270">
+                <s:GradientEntry color="0x000000" ratio="0.0" alpha="0.0627" />
+                <s:GradientEntry color="0x000000" ratio="0.48" alpha="0.0099" />
+                <s:GradientEntry color="0x000000" ratio="0.48001" alpha="0" />
+            </s:LinearGradient>
+        </s:fill>
+    </s:Rect>
+    
+    <s:Rect id="highlight" left="1" right="1" top="1" bottom="1" radiusX="2">
+        <s:fill>
+            <s:LinearGradient rotation="90">
+                <s:GradientEntry color="0xFFFFFF"
+                                 ratio="0.0"
+                                 alpha="0.33" 
+                                 alpha.over="0.22" 
+                                 alpha.down="0.12"/>
+                <s:GradientEntry color="0xFFFFFF"
+                                 ratio="0.48"
+                                 alpha="0.33"
+                                 alpha.over="0.22"
+                                 alpha.down="0.12" />
+                <s:GradientEntry color="0xFFFFFF"
+                                 ratio="0.48001"
+                                 alpha="0" />
+            </s:LinearGradient>
+        </s:fill>
+    </s:Rect>
+    
+    <s:Rect id="highlightStroke" left="1" right="1" top="1" bottom="1" excludeFrom="down" radiusX="2">
+        <s:stroke>
+            <s:LinearGradientStroke rotation="90" weight="1">
+                <s:GradientEntry color="0xFFFFFF" alpha.over="0.22" />
+                <s:GradientEntry color="0xD8D8D8" alpha.over="0.22" />
+            </s:LinearGradientStroke>
+        </s:stroke>
+    </s:Rect>
+    
+    <s:Rect id="hldownstroke1" left="1" right="1" top="1" bottom="1" radiusX="2" includeIn="down">
+        <s:stroke>
+            <s:LinearGradientStroke rotation="90" weight="1">
+                <s:GradientEntry color="0x000000" alpha="0.25" ratio="0.0" />
+                <s:GradientEntry color="0x000000" alpha="0.25" ratio="0.001" />
+                <s:GradientEntry color="0x000000" alpha="0.07" ratio="0.0011" />
+                <s:GradientEntry color="0x000000" alpha="0.07" ratio="0.965" />
+                <s:GradientEntry color="0x000000" alpha="0.00" ratio="0.9651" />
+            </s:LinearGradientStroke>
+        </s:stroke>
+    </s:Rect>
+
+    <s:Rect id="hldownstroke2" left="2" right="2" top="2" bottom="2" radiusX="2" includeIn="down">
+        <s:stroke>
+            <s:LinearGradientStroke rotation="90" weight="1">
+                <s:GradientEntry color="0x000000" alpha="0.09" ratio="0.0" />
+                <s:GradientEntry color="0x000000" alpha="0.00" ratio="0.0001" />
+            </s:LinearGradientStroke>
+        </s:stroke>
+    </s:Rect>
+	
+    <s:Rect id="border" left="0" right="0" top="0" bottom="0" width="20" height="20" radiusX="2">
+        <s:stroke>
+            <s:LinearGradientStroke rotation="90" weight="1">
+                <s:GradientEntry color="0x000000" 
+                               alpha="0.5625"
+                               alpha.down="0.6375" />
+                <s:GradientEntry color="0x000000" 
+                               alpha="0.75" 
+                               alpha.down="0.85" />
+            </s:LinearGradientStroke>
+        </s:stroke>
+    </s:Rect>
+    
+</s:SparkSkin>
\ No newline at end of file