You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by bi...@apache.org on 2014/11/22 02:00:59 UTC
[16/48] git commit: [flex-sdk] [refs/heads/iso7skins] - Added build
scripts and font licenses for FlatSpark
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
new file mode 100644
index 0000000..cb8ab83
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ButtonIconSkin.mxml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark Button component.
+
+@see spark.components.Button
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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="21" minHeight="21" height="{ButtonSizeEnum.Normal}"
+ alpha.disabled="0.5">
+ <fx:Metadata>[HostComponent("flatspark.components.ButtonIcon")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.enums.ButtonColorEnum;
+ import flatspark.enums.ButtonSizeEnum;
+ import flatspark.enums.TextInputSizeEnum;
+ import flatspark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["iconDisplay", "labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ var cr:Number = getStyle("cornerRadius");
+
+ if (cornerRadius != cr)
+ {
+ cornerRadius = cr;
+ fill_up.radiusX = cornerRadius;
+ fill_over.radiusX = cornerRadius;
+ fill_down.radiusX = cornerRadius;
+ fill_disabled.radiusX = cornerRadius;
+ }
+
+ /*var larguraIcone:int = 0;
+ if (iconFont.text != null && iconFont.text != "")
+ {
+ larguraIcone = 60;
+ }*/
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 2;
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 14;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 13;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 19;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 15;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" id="stateUp"/>
+ <s:State name="over" id="stateOver"/>
+ <s:State name="down" id="stateDown"/>
+ <s:State name="disabled" id="stateDisabled"/>
+ </s:states>
+
+
+ <!-- layer 2: fill -->
+ <!--- @private -->
+ <s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateUp)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateOver)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDown)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(hostComponent.brand,stateDisabled)}"/>
+ </s:fill>
+ </s:Rect>
+
+
+ <!-- layer 8: text -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:HGroup verticalAlign="middle" verticalCenter="0" horizontalAlign="center" horizontalCenter="0" left="10" right="10" top="2" bottom="2">
+ <s:Label id="iconFont" color="0xFFFFFF" color.disabled="0xE3E3E3" text="{hostComponent.iconFont}"
+ textAlign="left" fontSize="{getIconSize(hostComponent.height)}" fontFamily="FontAwesome"
+ maxDisplayedLines="1" includeInLayout="{hostComponent.iconFont != null}"
+ horizontalCenter="0" verticalCenter="0" verticalAlign="middle">
+ </s:Label>
+
+ <s:Label id="labelDisplay" color="0xFFFFFF" color.disabled="0xE3E3E3"
+ textAlign="center" fontSize="{getFontSize(hostComponent.height)}" fontFamily="Lato"
+ maxDisplayedLines="1"
+ horizontalCenter="0" verticalCenter="1" verticalAlign="middle">
+ </s:Label>
+ </s:HGroup>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
new file mode 100644
index 0000000..ce56543
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ButtonSkin.mxml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark Button component.
+
+@see spark.components.Button
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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="21" minHeight="21" height="{ButtonSizeEnum.Normal}"
+ alpha.disabled="0.5">
+ <fx:Metadata>[HostComponent("spark.components.Button")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.enums.BrandColorEnum;
+ import flatspark.enums.ButtonColorEnum;
+ import flatspark.enums.ButtonSizeEnum;
+ import flatspark.enums.TextInputSizeEnum;
+ import flatspark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["iconDisplay", "labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ var cr:Number = getStyle("cornerRadius");
+
+ if (cornerRadius != cr)
+ {
+ cornerRadius = cr;
+ fill_up.radiusX = cornerRadius;
+ fill_over.radiusX = cornerRadius;
+ fill_down.radiusX = cornerRadius;
+ fill_disabled.radiusX = cornerRadius;
+ }
+
+ /*var larguraIcone:int = 0;
+ if (iconFont.text != null && iconFont.text != "")
+ {
+ larguraIcone = 60;
+ }*/
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 2;
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 14;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 13;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case ButtonSizeEnum.Large:
+ altura = 19;
+ break;
+ case ButtonSizeEnum.Normal:
+ altura = 17;
+ break;
+ case ButtonSizeEnum.Small:
+ altura = 15;
+ break;
+ case ButtonSizeEnum.ExtraSmall:
+ altura = 12;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" id="stateUp"/>
+ <s:State name="over" id="stateOver"/>
+ <s:State name="down" id="stateDown"/>
+ <s:State name="disabled" id="stateDisabled"/>
+ </s:states>
+
+
+ <!-- layer 2: fill -->
+ <!--- @private -->
+ <s:Rect id="fill_up" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="up">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateUp)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_over" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="over">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateOver)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_down" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="down">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDown)}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="fill_disabled" left="1" right="1" top="1" bottom="1" radiusX="6" includeIn="disabled">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.ButtonColor(BrandColorEnum.Default,stateDisabled)}"/>
+ </s:fill>
+ </s:Rect>
+
+
+ <!-- layer 8: text -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay" color="0xFFFFFF" color.disabled="0xE3E3E3" right="10" left="10"
+ textAlign="center" fontSize="{getFontSize(hostComponent.height)}" fontFamily="Lato"
+ maxDisplayedLines="1"
+ horizontalCenter="0" verticalCenter="1" verticalAlign="middle">
+ </s:Label>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/CheckBoxSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/CheckBoxSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/CheckBoxSkin.mxml
new file mode 100644
index 0000000..504bf2d
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/CheckBoxSkin.mxml
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+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.
+
+-->
+
+<!--- The default skin class for the Spark CheckBox component.
+
+ @see spark.components.CheckBox
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<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" alpha.disabledStates="0.5" useHandCursor="true">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.CheckBox")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["labelDisplay", "check"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ import flatspark.utils.AwesomeUtils;
+ import flatspark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" stateGroups="overStates" />
+ <s:State name="down" stateGroups="downStates" />
+ <s:State name="disabled" stateGroups="disabledStates" />
+ <s:State name="upAndSelected" stateGroups="selectedStates" />
+ <s:State name="overAndSelected" stateGroups="overStates, selectedStates" />
+ <s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
+ <s:State name="disabledAndSelected" stateGroups="disabledStates, selectedStates" />
+ </s:states>
+
+ <s:Group verticalCenter="0" width="22" height="22" layoutDirection="ltr">
+ <!-- fill -->
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6" includeIn="overStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Asbestos}"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect left="1" top="1" right="1" bottom="1" radiusX="6" includeIn="selectedStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!--<s:Label fontFamily="FontAwesome" fontSize="12" color="#FFFFFF" text="{AwesomeUtils.fa_check}" includeIn="overStates"
+ itemCreationPolicy="immediate" verticalAlign="middle" horizontalCenter="0" verticalCenter="0" alpha="0.75"
+ />-->
+
+ <s:Label fontFamily="FontAwesome" fontSize="12" color="#FFFFFF" text="{AwesomeUtils.fa_check}" includeIn="selectedStates"
+ itemCreationPolicy="immediate" verticalAlign="middle" horizontalCenter="0" verticalCenter="0"
+ />
+ </s:Group>
+
+ <!-- Label -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="start" color="{ColorUtils.WetAsphalt}"
+ verticalAlign="middle" fontSize="14"
+ maxDisplayedLines="1" fontFamily="Lato" paddingLeft="30"
+ left="0" right="0" top="3" bottom="3" verticalCenter="2" />
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxButtonSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxButtonSkin.mxml
new file mode 100644
index 0000000..5ca63a7
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxButtonSkin.mxml
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the anchor button on a Spark ComboBox component.
+
+@see spark.components.ComboBox
+@see spark.skins.spark.ComboBoxSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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="19" minHeight="23">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.utils.AwesomeUtils;
+ import flatspark.utils.ColorUtils;
+
+ /* 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 = [];
+
+ private var cornerRadius:Number = 4;
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ fill.bottomRightRadiusX = fill.topRightRadiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- layer 1: fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- The arrow graphic displayed in the anchor button. -->
+ <s:Label right="17" top="6" fontFamily="FontAwesome" fontSize="19" color="#FFFFFF" text="{AwesomeUtils.fa_caret_down}" includeIn="up, down, over, disabled"
+ itemCreationPolicy="immediate" verticalAlign="middle" verticalCenter="0" />
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxSkin.mxml
new file mode 100644
index 0000000..c412365
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxSkin.mxml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the Spark ComboBox component.
+The skin for the anchor button for a ComboBox component
+is defined by the ComboBoxButtonSkin class. The skin for the text input
+is defined by the ComboBoxTextInputSkin class.
+
+@see spark.components.ComboBox
+@see spark.skins.spark.ComboBoxButtonSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" height="41"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5" initialize="initializeHandler(event)">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.ComboBox")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.events.FlexEvent;
+
+ import flatspark.utils.ColorUtils;
+ private var paddingChanged:Boolean;
+ private var cornerRadiusChanged:Boolean;
+ private var cornerRadius:Number = 4;
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ override public function get contentItems():Array {return contentFill; }
+
+ protected function initializeHandler(event:FlexEvent):void
+ {
+ // TODO Auto-generated method stub
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="open" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!---
+ The PopUpAnchor control that opens the drop-down list.
+
+ <p>In a custom skin class that uses transitions, set the
+ <code>itemDestructionPolicy</code> property to <code>never</code>.</p>
+ -->
+ <s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
+ left="0" right="0" top="{hostComponent.height+4}" bottom="0" itemDestructionPolicy="auto"
+ popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
+
+ <!---
+ This includes borders, background colors, scrollers, and filters.
+ @copy spark.components.supportClasses.DropDownListBase#dropDown
+ -->
+ <s:Group id="dropDown">
+
+ <s:Path top="2" right="20" data="M 0 10 L 10 0 L 20 10 Z">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.WetAsphalt}" alpha="1"/>
+ </s:fill>
+ </s:Path>
+
+ <!-- fill -->
+ <!--- Defines the appearance of drop-down list's background fill. -->
+ <s:Rect id="background" left="0" right="0" top="10" bottom="0" radiusX="4" >
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.WetAsphalt}" />
+ </s:fill>
+ </s:Rect>
+ <!--- @private -->
+ <s:Scroller id="scroller" left="4" top="14" right="4" bottom="4" hasFocusableChildren="false" minViewportInset="1" skinClass="flatspark.skins.ScrollerSkin">
+ <!--- @copy spark.components.SkinnableDataContainer#dataGroup-->
+ <s:DataGroup id="dataGroup" itemRenderer="flatspark.itemRenderers.DefaultItemRenderer">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="contentJustify" requestedMinRowCount="1" requestedMaxRowCount="6"/>
+ </s:layout>
+ </s:DataGroup>
+ </s:Scroller>
+ </s:Group>
+ </s:PopUpAnchor>
+
+ <!--- The default skin is ComboBoxButtonSkin.
+ @copy spark.components.supportClasses.DropDownListBase#openButton
+ @see spark.skins.spark.ComboBoxButtonSkin -->
+ <s:Button id="openButton" width="29" right="0" top="0" bottom="0" focusEnabled="false"
+ skinClass="flatspark.skins.ComboBoxButtonSkin" tabEnabled="false" />
+ <!--- @copy spark.components.ComboBox#textInput -->
+ <s:TextInput id="textInput" enabled.disabled="false"
+ left="0" right="29" top="0" bottom="0"
+ skinClass="flatspark.skins.ComboBoxTextInputSkin"/>
+
+</s:SparkSkin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxTextInputSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxTextInputSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxTextInputSkin.mxml
new file mode 100644
index 0000000..92acf4f
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ComboBoxTextInputSkin.mxml
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the textInput of a Spark ComboBox component.
+
+@see spark.components.ComboBox
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TextInput")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.utils.ColorUtils;
+
+ private var paddingChanged:Boolean;
+ private var cornerRadius:Number = 4;
+
+ /* Define the skin elements that should not be colorized. */
+ static private const exclusions:Array = ["background", "textDisplay", "promptDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array {return contentFill; }
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+ promptDisplay.setLayoutBoundsPosition(8, 0);
+ }
+
+ background.bottomLeftRadiusX = background.topLeftRadiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function updatePadding():void
+ {
+ if (!textDisplay)
+ return;
+
+ // Push padding styles into the textDisplay
+ var padding:Number;
+
+ padding = getStyle("paddingLeft");
+ if (textDisplay.getStyle("paddingLeft") != padding)
+ textDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (textDisplay.getStyle("paddingTop") != padding)
+ textDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (textDisplay.getStyle("paddingRight") != padding)
+ textDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (textDisplay.getStyle("paddingBottom") != padding)
+ textDisplay.setStyle("paddingBottom", padding);
+
+ if (!promptDisplay)
+ return;
+
+ padding = getStyle("paddingLeft");
+ if (promptDisplay.getStyle("paddingLeft") != padding)
+ promptDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (promptDisplay.getStyle("paddingTop") != padding)
+ promptDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (promptDisplay.getStyle("paddingRight") != padding)
+ promptDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (promptDisplay.getStyle("paddingBottom") != padding)
+ promptDisplay.setStyle("paddingBottom", padding);
+ }
+
+ /**
+ * @private
+ */
+ override public function styleChanged(styleProp:String):void
+ {
+ var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+ super.styleChanged(styleProp);
+
+ if (allStyles || styleProp.indexOf("padding") == 0)
+ {
+ paddingChanged = true;
+ invalidateProperties();
+ }
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["textDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal"/>
+ <s:State name="disabled" stateGroups="disabledStates"/>
+ <s:State name="normalWithPrompt"/>
+ <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+ </s:states>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <!-- <s:RichEditableText id="textDisplay"
+ lineBreak="explicit"
+ widthInChars="10" verticalCenter="0"/>-->
+ <s:RichEditableText id="textDisplay" verticalAlign="middle" lineBreak="explicit" backgroundColor="{ColorUtils.Turquoise}"
+ widthInChars="10" fontFamily="Lato" fontWeight="normal" color="0xFFFFFF"
+ left="8" right="8" top="8" bottom="8" fontSize="15" verticalCenter="0"/>
+ <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+ <!-- <s:Label id="promptDisplay" maxDisplayedLines="1"
+ verticalAlign="middle"
+ mouseEnabled="false" mouseChildren="false"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"/>-->
+ <s:Label id="promptDisplay" maxDisplayedLines="1"
+ verticalAlign="middle" fontFamily="Lato" fontSize="15" fontWeight="normal" fontStyle="italic" color="{ColorUtils.Clouds}"
+ mouseEnabled="false" mouseChildren="false" left="8" right="8" top="8" bottom="8" verticalCenter="0"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"/>
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/DropDownListButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/DropDownListButtonSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/DropDownListButtonSkin.mxml
new file mode 100644
index 0000000..2d284a4
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/DropDownListButtonSkin.mxml
@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the anchor button on a Spark DropDownList component.
+
+@see spark.components.DropDownList
+@see spark.skins.spark.DropDownListSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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="19" minHeight="23">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.utils.AwesomeUtils;
+ import flatspark.utils.ColorUtils;
+
+ /* 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 = [];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ fill.radiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 4;
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- layer 1: fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- The arrow graphic displayed in the anchor button. -->
+ <s:Label right="17" top="6" fontFamily="FontAwesome" fontSize="19" color="#FFFFFF" text="{AwesomeUtils.fa_caret_down}" includeIn="up, down, over, disabled"
+ itemCreationPolicy="immediate" verticalAlign="middle" verticalCenter="0" />
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/DropDownListSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/DropDownListSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/DropDownListSkin.mxml
new file mode 100644
index 0000000..d0a0a5f
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/DropDownListSkin.mxml
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for the Spark DropDownList component.
+The skin for the anchor button for a DropDownList component
+is defined by the DropDownListButtonSkin class.
+
+<p>In a custom skin class that uses transitions, set the
+<code>itemDestructionPolicy</code> property to <code>never</code>
+for the PopUpAnchor defined by the popUp property.</p>
+
+@see spark.components.DropDownList
+@see spark.skins.spark.DropDownListButtonSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" height="41"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009" alpha.disabled=".5" initialize="initializeHandler(event)">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.DropDownList")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.events.FlexEvent;
+
+ import flatspark.itemRenderers.DefaultItemRenderer;
+ import flatspark.utils.ColorUtils;
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array { return contentFill; }
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ //background.bottomRightRadiusX = background.topRightRadiusX = cornerRadius;
+
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 4;
+
+ protected function initializeHandler(event:FlexEvent):void
+ {
+ // TODO Auto-generated method stub
+ hostComponent.useHandCursor=true;
+ hostComponent.buttonMode=true;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="open" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!---
+ The PopUpAnchor control that opens the drop-down list.
+
+ <p>In a custom skin class that uses transitions, set the
+ <code>itemDestructionPolicy</code> property to <code>never</code>.</p>
+ -->
+ <s:PopUpAnchor id="popUp" displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
+ left="0" right="0" top="{hostComponent.height+4}" bottom="0" itemDestructionPolicy="auto"
+ popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
+
+ <!---
+ This includes borders, background colors, scrollers, and filters.
+ @copy spark.components.supportClasses.DropDownListBase#dropDown
+ -->
+ <s:Group id="dropDown">
+
+ <s:Path top="2" right="20" data="M 0 10 L 10 0 L 20 10 Z">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.WetAsphalt}" alpha="1"/>
+ </s:fill>
+ </s:Path>
+
+ <!-- fill -->
+ <!--- Defines the appearance of drop-down list's background fill. -->
+ <s:Rect id="background" left="0" right="0" top="10" bottom="0" radiusX="4" >
+ <s:fill>
+ <s:SolidColor id="bgFill" color="{ColorUtils.WetAsphalt}" />
+ </s:fill>
+ </s:Rect>
+
+ <!--- @private -->
+ <s:Scroller id="scroller" left="4" top="14" right="4" bottom="4" hasFocusableChildren="false" minViewportInset="1" skinClass="flatspark.skins.ScrollerSkin">
+ <!--- @copy spark.components.SkinnableDataContainer#dataGroup-->
+ <s:DataGroup id="dataGroup" itemRenderer="flatspark.itemRenderers.DefaultItemRenderer">
+ <s:layout>
+ <s:VerticalLayout gap="0" horizontalAlign="contentJustify" requestedMinRowCount="1" requestedMaxRowCount="6"/>
+ </s:layout>
+ </s:DataGroup>
+ </s:Scroller>
+ </s:Group>
+ </s:PopUpAnchor>
+
+ <!--- The default skin is DropDownListButtonSkin.
+ @copy spark.components.supportClasses.DropDownListBase#openButton
+ @see spark.skins.spark.DropDownListButtonSkin -->
+ <s:Button id="openButton" width="29" left="0" right="0" top="0" bottom="0" focusEnabled="false" tabEnabled="false"
+ skinClass="flatspark.skins.DropDownListButtonSkin" />
+
+ <!--- @copy spark.components.DropDownList#labelDisplay -->
+
+ <s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1" backgroundColor="{ColorUtils.Turquoise}"
+ mouseEnabled="false" mouseChildren="false" fontFamily="Lato" fontWeight="normal" color="0xFFFFFF"
+ left="10" right="37" top="8" bottom="8" fontSize="15" verticalCenter="0"></s:Label>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarSkin.mxml
new file mode 100644
index 0000000..9280a7d
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarSkin.mxml
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the Spark HScrollBar component. The thumb and track skins are defined by the
+HScrollBarThumbSkin and HScrollBarTrackSkin classes, respectively.
+
+ @see spark.components.HScrollBar
+ @see spark.skins.spark.HScrollBarThumbSkin
+ @see spark.skins.spark.HScrollBarTrackSkin
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<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="35" minHeight="15"
+ alpha.disabled="0.5" alpha.inactive="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.HScrollBar")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For scroll bar, the skin itself is colorized but the individual parts are not. */
+ static private const exclusions:Array = ["track", "thumb"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal" />
+ <s:State name="disabled" />
+ <s:State name="inactive" />
+ </s:states>
+
+ <!--- The default skin class is HScrollBarTrackSkin.
+ @copy spark.components.supportClasses.TrackBase#track
+ @see spark.skins.spark.HScrollBarTrackSkin -->
+ <s:Button id="track" left="0" right="0" width="54"
+ focusEnabled="false" tabEnabled="false"
+ skinClass="flatspark.skins.HScrollBarTrackSkin" />
+
+ <!--- The default skin class is HScrollBarThumbSkin.
+ @copy spark.components.supportClasses.TrackBase#thumb
+ @see spark.skins.spark.HScrollBarThumbSkin -->
+ <s:Button id="thumb"
+ focusEnabled="false" visible.inactive="false" tabEnabled="false"
+ skinClass="flatspark.skins.HScrollBarThumbSkin" />
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarThumbSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarThumbSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarThumbSkin.mxml
new file mode 100644
index 0000000..6c510d7
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarThumbSkin.mxml
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the thumb of a Spark HScrollBar component.
+
+@see spark.components.HScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- background -->
+ <s:Rect left="0" top="0" right="0" bottom="0" minWidth="8" minHeight="8" radiusX="2" alpha="0.5">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.MidnightBlue}" weight="1"/>
+ </s:stroke>
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarTrackSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarTrackSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarTrackSkin.mxml
new file mode 100644
index 0000000..ef2c551
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/HScrollBarTrackSkin.mxml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for the track on a Spark HScrollBar component.
+
+@see spark.components.HScrollBar
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<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">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import flatspark.utils.ColorUtils;
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="down" />
+ <s:State name="over" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <!-- border/fill -->
+ <s:Rect top="0" bottom="0" left="0" right="0" minWidth="8" minHeight="8" radiusX="2">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.MidnightBlue}" />
+ </s:fill>
+ </s:Rect>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/PanelSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/PanelSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/PanelSkin.mxml
new file mode 100644
index 0000000..9df0ea7
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/PanelSkin.mxml
@@ -0,0 +1,253 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--- The default skin class for a Spark Panel container.
+
+ @see spark.components.Panel
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<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="127" alpha.disabled="0.5" alpha.disabledWithControlBar="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Panel")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatspark.utils.ColorUtils;
+
+ /* Define the skin elements that should not be colorized.
+ For panel, border and title background are skinned, but the content area, background, border, and title text are not. */
+ static private const exclusions:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup", "border"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "titleDisplay", "contentGroup", "controlBarGroup"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ dropShadow.tlRadius = cornerRadius;
+ dropShadow.trRadius = cornerRadius;
+ dropShadow.blRadius = cornerRadius;
+ dropShadow.brRadius = cornerRadius;
+
+ setPartCornerRadii(topMaskRect);
+ setPartCornerRadii(background);
+
+ if (bottomMaskRect != null)
+ {
+ setPartCornerRadii(bottomMaskRect);
+ }
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function setPartCornerRadii(target:Rect):void
+ {
+ target.topLeftRadiusX = cornerRadius;
+ target.topRightRadiusX = cornerRadius;
+ target.bottomLeftRadiusX = cornerRadius;
+ target.bottomRightRadiusX = cornerRadius;
+ }
+
+ private var cornerRadius:Number=4;
+ ]]>
+ </fx:Script>
+
+ <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="4" distance="0" angle="90" alpha="1"
+ color="{ColorUtils.Silver}" 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="0" top="0" right="0" bottom="0" 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="0" top="0" right="0" bottom="0" 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 2: background fill -->
+ <!--- Defines the appearance of the PanelSkin class's background. -->
+ <s:Rect id="background" left="0" top="0" right="0" bottom="0">
+ <s:fill>
+ <!--- @private
+ Defines the PanelSkin class's background fill. The default color is 0xFFFFFF. -->
+ <s:SolidColor id="backgroundFill" color="0xFFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: contents -->
+ <!--- Contains the vertical stack of titlebar content and controlbar. -->
+ <s:Group left="0" top="0" right="0" bottom="0" 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="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: title bar highlight -->
+ <!--- @private -->
+ <s:Rect id="tbHilite" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.PeterRiver}"/>
+ </s:fill>
+ </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="{ColorUtils.BelizeHole}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: text -->
+ <!--- @copy spark.components.Panel#titleDisplay -->
+ <s:Label id="titleDisplay" maxDisplayedLines="1" fontFamily="Lato" fontSize="15" fontStyle="normal" color="#FFFFFF"
+ left="15" right="5" top="2" bottom="0" minHeight="36" height="36"
+ verticalAlign="middle" fontWeight="bold" />
+ </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>
+
+ <!--- @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.5">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Silver}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 1: control bar highlight -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: control bar fill -->
+ <s:Rect left="0" right="0" top="1" bottom="0">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+ <!-- layer 3: control bar -->
+ <!--- @copy spark.components.Panel#controlBarGroup -->
+ <s:Group id="controlBarGroup" left="0" right="0" top="0" bottom="0" 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>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ProgressBarSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ProgressBarSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ProgressBarSkin.mxml
new file mode 100644
index 0000000..e9bcb45
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ProgressBarSkin.mxml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark">
+ <fx:Metadata>
+ [HostComponent("spark.components.ProgressBar")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ import flatspark.utils.ColorUtils;
+ ]]>
+ </fx:Script>
+ <s:Rect left="0" minHeight="14" top="0" bottom="0" right="0" radiusX="4">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Clouds}" />
+ </s:fill>
+ </s:Rect>
+ <s:Group id="progressGroup" top="0" bottom="0"
+ left="{hostComponent.direction=='left' ? 0 : NaN}"
+ right="{hostComponent.direction=='right' ? 0 : NaN}">
+ <s:Rect left="0" top="0" bottom="0" right="0" radiusX="4">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Rect>
+ <!--
+ Variant #2 (looks nicer) - uncomment this and remove last Label declaration
+ <s:Label id="percentDisplay"
+ right="2" verticalCenter="0" verticalAlign="middle"
+ visible="{progressBox.width > percentDisplay.width + 4}"
+ includeInLayout="{progressBox.width > percentDisplay.width + 4}"/>
+ -->
+ </s:Group>
+ <s:Label id="percentDisplay" left="2" right="2" verticalCenter="0" verticalAlign="middle" color="{ColorUtils.WetAsphalt}" fontFamily="Lato" fontWeight="bold" fontSize="13" textAlign="center" />
+
+</s:Skin>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/RadioButtonSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/RadioButtonSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/RadioButtonSkin.mxml
new file mode 100644
index 0000000..97e2bb1
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/RadioButtonSkin.mxml
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+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.
+
+-->
+
+<!--- The default skin class for a Spark RadioButton component.
+
+ @see spark.components.RadioButton
+ @see spark.components.RadioButtonGroup
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<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" alpha.disabledStates="0.5">
+ <fx:Metadata>[HostComponent("spark.components.RadioButton")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ For button, the graphics are colorized but the label is not. */
+ static private const exclusions:Array = ["labelDisplay", "dot"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array {return exclusions;}
+
+ /* Define the symbol fill items that should be colored by the "symbolColor" style. */
+ static private const symbols:Array = [];
+
+ /**
+ * @private
+ */
+ override public function get symbolItems():Array {return symbols};
+
+ /**
+ * @private
+ */
+ override protected function initializationComplete():void
+ {
+ useChromeColor = true;
+ super.initializationComplete();
+ }
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ import flatspark.utils.ColorUtils;
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["labelDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" stateGroups="overStates" />
+ <s:State name="down" stateGroups="downStates" />
+ <s:State name="disabled" stateGroups="disabledStates" />
+ <s:State name="upAndSelected" stateGroups="selectedStates" />
+ <s:State name="overAndSelected" stateGroups="overStates, selectedStates" />
+ <s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
+ <s:State name="disabledAndSelected" stateGroups="disabledStates, selectedStates" />
+ </s:states>
+
+ <s:Group verticalCenter="0" width="22" height="22">
+ <!-- fill -->
+ <s:Ellipse left="1" top="1" right="1" bottom="1">
+ <s:fill>
+ <s:SolidColor color="#FFFFFF" />
+ </s:fill>
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Silver}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="1" top="1" right="1" bottom="1" includeIn="overStates">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Asbestos}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="1" top="1" right="1" bottom="1" includeIn="selectedStates">
+ <s:stroke>
+ <s:SolidColorStroke color="{ColorUtils.Turquoise}" weight="4"/>
+ </s:stroke>
+ </s:Ellipse>
+
+ <s:Ellipse left="8" top="8" right="8" bottom="8" includeIn="selectedStates">
+ <s:fill>
+ <s:SolidColor color="{ColorUtils.Turquoise}" />
+ </s:fill>
+ </s:Ellipse>
+
+
+ </s:Group>
+
+ <!-- Label -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="start" color="{ColorUtils.WetAsphalt}"
+ verticalAlign="middle" fontSize="14"
+ maxDisplayedLines="1" fontFamily="Lato" paddingLeft="30"
+ left="0" right="0" top="3" bottom="3"/>
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/ScrollerSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/ScrollerSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/ScrollerSkin.mxml
new file mode 100644
index 0000000..8852778
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/ScrollerSkin.mxml
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+
+
+<!--
+
+Scroller unconditionally sets its skin's layout to private layout
+implementation that handles the scroll policies. Scroller skins can
+only provide replacement scrollbars. The skin's layout and
+constraints or dimensions set on skin parts will not be honored. To
+gain more control over the layout of a viewport and its scrollbars,
+instead of using Scroller, add them to a Group and use the ScrollBar component's
+viewport property to link them together.
+
+-->
+
+<!--- The default skin class for the Spark Scroller component.
+
+ @see spark.components.Scroller
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Scroller")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ override public function beginHighlightBitmapCapture() : Boolean
+ {
+ var needUpdate:Boolean = super.beginHighlightBitmapCapture();
+
+ // Draw an opaque rect that fill our entire skin. Our background
+ // is transparent, but we don't want focus/error skins to
+ // poke through. This is safe to do since we don't have any
+ // graphic elements as direct children.
+ graphics.beginFill(0);
+ graphics.drawRect(0, 0, width, height);
+ graphics.endFill();
+
+ return needUpdate;
+ }
+
+ /**
+ * @private
+ */
+ override public function endHighlightBitmapCapture() : Boolean
+ {
+ var needUpdate:Boolean = super.endHighlightBitmapCapture();
+
+ // Clear the rect we drew in beginBitmapCapture();
+ graphics.clear();
+
+ return needUpdate;
+ }
+ ]]>
+ </fx:Script>
+
+ <fx:Declarations>
+ <!--- A vertical scrollbar that lets you control the portion of data that is displayed
+ when there is too much data to fit vertically in a display area.
+ The Scroller determines whether the vertical ScrollBar is visible. -->
+ <fx:Component id="verticalScrollBarFactory">
+ <s:VScrollBar visible="false" skinClass="flatspark.skins.VScrollBarSkin" />
+ </fx:Component>
+
+ <!--- A horizontal scrollbar that lets you control the portion of data that is displayed
+ when there is too much data to fit horizontally in a display area.
+ The Scroller determines whether the horizontal ScrollBar is visible. -->
+ <fx:Component id="horizontalScrollBarFactory">
+ <s:HScrollBar visible="false" skinClass="flatspark.skins.HScrollBarSkin" />
+ </fx:Component>
+
+ </fx:Declarations>
+
+</s:SparkSkin>
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/2fc9a8d5/frameworks/projects/flatspark/src/flatspark/skins/TextInputIconSkin.mxml
----------------------------------------------------------------------
diff --git a/frameworks/projects/flatspark/src/flatspark/skins/TextInputIconSkin.mxml b/frameworks/projects/flatspark/src/flatspark/skins/TextInputIconSkin.mxml
new file mode 100644
index 0000000..a4b167a
--- /dev/null
+++ b/frameworks/projects/flatspark/src/flatspark/skins/TextInputIconSkin.mxml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+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.
+
+-->
+<!--- The default skin class for Spark TextInput component.
+
+ @see spark.components.TextInput
+
+ @langversion 3.0
+ @playerversion Flash 10
+ @playerversion AIR 1.5
+ @productversion Flex 4
+-->
+<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" height="{TextInputSizeEnum.Normal}"
+ alpha.disabledStates="0.5" blendMode="normal">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("flatspark.components.TextInputIcon")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Style>
+ @namespace s "library://ns.adobe.com/flex/spark";
+ @namespace fb "http://ns.adobe.com/flashbuilder/2009";
+ @namespace spark "spark.skins.spark.*";
+
+ *
+ {
+ /*focusColor: #FFFFFF;
+ focusThickness: 1px;
+ focusAlpha: 1;*/
+ /*focusAlpha: 0;*/
+ errorColor: #E74C3C;
+ }
+ </fx:Style>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ import flatspark.enums.ButtonSizeEnum;
+ import flatspark.enums.TextInputSizeEnum;
+ import flatspark.utils.AwesomeUtils;
+ import flatspark.utils.ColorUtils;
+
+ private var paddingChanged:Boolean;
+
+ /* Define the skin elements that should not be colorized. */
+ static private const exclusions:Array = ["background", "background_disabled", "textDisplay", "promptDisplay", "border", "border_disabled"];
+
+ /* exclusions before Flex 4.5 for backwards-compatibility purposes */
+ static private const exclusions_4_0:Array = ["background", "background_disabled", "textDisplay", "promptDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get colorizeExclusions():Array
+ {
+ // Since border is styleable via borderColor, no need to allow chromeColor to affect
+ // the border. This is wrapped in a compatibility flag since this change was added
+ // in Flex 4.5
+ if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+ {
+ return exclusions_4_0;
+ }
+
+ return exclusions;
+ }
+
+ /* Define the content fill items that should be colored by the "contentBackgroundColor" style. */
+ static private const contentFill:Array = ["bgFill"];
+
+ /**
+ * @private
+ */
+ override public function get contentItems():Array {return contentFill};
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+ /**
+ * @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 = 2;
+ textDisplay.left = textDisplay.top = textDisplay.bottom = 8;
+ textDisplay.right = 30;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth - 8, unscaledHeight - 8);
+ promptDisplay.setLayoutBoundsPosition(5, 5);
+ }
+ }
+ else
+ {
+ border.visible = false;
+ background.left = background.top = background.right = background.bottom = 0;
+ textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 0;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth, unscaledHeight);
+ promptDisplay.setLayoutBoundsPosition(0, 0);
+ }
+ }
+
+ /*borderStroke.color = getStyle("borderColor");
+ borderStroke.alpha = getStyle("borderAlpha");*/
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ /**
+ * @private
+ */
+ private function updatePadding():void
+ {
+ if (!textDisplay)
+ return;
+
+ // Push padding styles into the textDisplay
+ var padding:Number;
+
+ padding = getStyle("paddingLeft");
+ if (textDisplay.getStyle("paddingLeft") != padding)
+ textDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (textDisplay.getStyle("paddingTop") != padding)
+ textDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (textDisplay.getStyle("paddingRight") != padding)
+ textDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (textDisplay.getStyle("paddingBottom") != padding)
+ textDisplay.setStyle("paddingBottom", padding);
+
+ if (!promptDisplay)
+ return;
+
+ padding = getStyle("paddingLeft");
+ if (promptDisplay.getStyle("paddingLeft") != padding)
+ promptDisplay.setStyle("paddingLeft", padding);
+
+ padding = getStyle("paddingTop");
+ if (promptDisplay.getStyle("paddingTop") != padding)
+ promptDisplay.setStyle("paddingTop", padding);
+
+ padding = getStyle("paddingRight");
+ if (promptDisplay.getStyle("paddingRight") != padding)
+ promptDisplay.setStyle("paddingRight", padding);
+
+ padding = getStyle("paddingBottom");
+ if (promptDisplay.getStyle("paddingBottom") != padding)
+ promptDisplay.setStyle("paddingBottom", padding);
+ }
+
+ /**
+ * @private
+ */
+ override public function styleChanged(styleProp:String):void
+ {
+ var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+ super.styleChanged(styleProp);
+
+ if (allStyles || styleProp.indexOf("padding") == 0)
+ {
+ paddingChanged = true;
+ invalidateProperties();
+ }
+ }
+
+ protected function textDisplay_focusInHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Asbestos;
+ iconFont.setStyle("color", ColorUtils.Asbestos);
+ }
+
+ protected function textDisplay_focusOutHandler(event:FocusEvent):void
+ {
+ borderStroke.color = ColorUtils.Silver;
+ iconFont.setStyle("color", ColorUtils.Silver);
+ }
+
+ private static function getFontSize(height:int):int
+ {
+ var altura:int = 15;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 15;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 13;
+ break;
+ }
+
+ return altura;
+ }
+
+ private static function getIconSize(height:int):int
+ {
+ var altura:int = 17;
+
+ switch (height)
+ {
+ case TextInputSizeEnum.Large:
+ altura = 19;
+ break;
+ case TextInputSizeEnum.Normal:
+ altura = 17;
+ break;
+ case TextInputSizeEnum.Small:
+ altura = 15;
+ break;
+ }
+
+ return altura;
+ }
+
+ ]]>
+ </fx:Script>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @private
+ */
+ private static const focusExclusions:Array = ["textDisplay"];
+
+ /**
+ * @private
+ */
+ override public function get focusSkinExclusions():Array { return focusExclusions;};
+ ]]>
+ </fx:Script>
+
+ <s:states>
+ <s:State name="normal"/>
+ <s:State name="disabled" stateGroups="disabledStates"/>
+ <s:State name="normalWithPrompt"/>
+ <s:State name="disabledWithPrompt" stateGroups="disabledStates"/>
+ </s:states>
+
+ <!-- border -->
+ <!--- @private -->
+ <s:Rect left="0" right="0" top="0" bottom="0" id="border" radiusX="6">
+ <s:stroke>
+ <!--- @private -->
+ <s:SolidColorStroke id="borderStroke" weight="2" color="{ColorUtils.Silver}"/>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="2" right="2" top="2" bottom="2" radiusX="6">
+ <s:fill>
+ <!--- @private Defines the background fill color. -->
+ <s:SolidColor id="bgFill" color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="background_disabled" left="2" right="2" top="2" bottom="2" radiusX="6" includeIn="disabledStates">
+ <s:fill>
+ <s:SolidColor color="0xf4f6f6"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <s:RichEditableText id="textDisplay"
+ verticalAlign="middle" focusIn="textDisplay_focusInHandler(event)" focusOut="textDisplay_focusOutHandler(event)"
+ widthInChars="10" fontFamily="Lato" fontWeight="normal" color="{ColorUtils.WetAsphalt}"
+ left="8" right="30" top="8" bottom="8" fontSize="{getFontSize(hostComponent.height)}"/>
+ <!--- Defines the Label that is used for prompt text. The includeInLayout property is false so the prompt text does not affect measurement. -->
+ <s:Label id="promptDisplay" maxDisplayedLines="1" fontSize="{getFontSize(hostComponent.height)}"
+ verticalAlign="middle" fontFamily="Lato" fontWeight="normal" fontStyle="normal" color="{ColorUtils.Silver}"
+ mouseEnabled="false" mouseChildren="false"
+ includeIn="normalWithPrompt,disabledWithPrompt"
+ includeInLayout="false"
+ />
+ <s:Label id="iconFont" color="{ColorUtils.Silver}" color.disabledStates="{ColorUtils.Silver}" text="{hostComponent.iconFont}"
+ textAlign="right" fontSize="{getIconSize(hostComponent.height)}" fontFamily="FontAwesome" fontStyle="normal"
+ maxDisplayedLines="1" mouseChildren="false" mouseEnabled="false"
+ horizontalCenter="0" verticalCenter="0" verticalAlign="middle"
+ left="8" right="8" top="2" bottom="2" includeInLayout="{iconFont != null}">
+ </s:Label>
+</s:SparkSkin>