You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by cf...@apache.org on 2012/06/14 20:53:56 UTC

svn commit: r1350373 [9/23] - in /incubator/flex/trunk/samples/themes: ./ arcade/ arcade/src/ arcade/src/arcade/ arcade/src/arcade/skins/ arcade/src/arcade/skins/mediaClasses/ arcade/src/arcade/skins/mediaClasses/fullScreen/ arcade/src/arcade/skins/med...

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,156 @@
+<?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.  
+
+@see spark.components.DropDownList        
+@see spark.skins.spark.DropDownListButtonSkin
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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.disabled=".5"> 
+	
+	<!-- host component -->
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.DropDownList")]
+		]]>
+	</fx:Metadata> 
+	
+	<fx:Script fb:purpose="styling">
+		<![CDATA[            
+			/**
+			 * @private
+			 */
+			override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+			{
+				if (getStyle("borderVisible") == false)
+				{
+					if (border)
+						border.visible = false;
+					if (background)
+					{
+						background.left = background.top = background.right = background.bottom = 0;
+					}
+					if (scroller)
+						scroller.minViewportInset = 0;
+				}
+				else
+				{
+					if (border)
+						border.visible = true;
+					if (background)
+					{
+						background.left = background.top = background.right = background.bottom = 1;
+					}
+					if (scroller)
+						scroller.minViewportInset = 1;
+				}
+				
+				if (dropShadow)
+					dropShadow.visible = getStyle("dropShadowVisible");
+				
+				openButton.setStyle("cornerRadius", getStyle("cornerRadius"));
+				
+				if (borderStroke)
+				{
+					borderStroke.color = getStyle("borderColor");
+					borderStroke.alpha = getStyle("borderAlpha");
+				}
+				super.updateDisplayList(unscaledWidth, unscaledHeight);
+			}
+		]]>
+	</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. 
+	-->
+	<s:PopUpAnchor id="popUp"  displayPopUp.normal="false" displayPopUp.open="true" includeIn="open"
+				   left="0" right="0" top="0" bottom="0" itemDestructionPolicy="auto"
+				   popUpPosition="below" popUpWidthMatchesAnchorWidth="true">
+		
+		<!--- 
+		The drop down area of the skin. 
+		This includes borders, background colors, scrollers, and filters. 
+		-->
+		<s:Group id="dropDown" maxHeight="134" minHeight="22" >
+			
+			<!-- drop shadow -->
+			<s:RectangularDropShadow id="dropShadow" blurX="20" blurY="20" alpha="0.6" distance="5" 
+									 angle="90" color="#000000" left="0" top="0" right="0" bottom="0"/>
+			
+			<!-- border -->
+			<s:Rect id="border" left="0" right="0" top="0" bottom="0">
+				<s:stroke>
+					<s:SolidColorStroke id="borderStroke" weight="1"/>
+				</s:stroke>
+			</s:Rect>
+			
+			<!-- fill -->
+			<!---  
+			Defines the appearance of drop-down list's background fill.
+			-->
+			<s:Rect id="background" left="1" right="1" top="1" bottom="1" >
+				<s:fill>
+					<!---  
+					The color of the drop down's background fill.
+					The default color is 0xFFFFFF.
+					-->
+					<s:SolidColor id="bgFill" color="0xFFFFFF" />
+				</s:fill>
+			</s:Rect>
+			
+			<s:Scroller id="scroller" left="0" top="0" right="0" bottom="0" hasFocusableChildren="false" minViewportInset="1">
+				<!---  
+				The container for the data items in the drop-down list.
+				-->
+				<s:DataGroup id="dataGroup" itemRenderer="cobalt.skins.DefaultItemRenderer">
+					<s:layout>
+						<s:VerticalLayout gap="0" horizontalAlign="contentJustify"/>
+					</s:layout>
+				</s:DataGroup> 
+			</s:Scroller>
+		</s:Group>
+	</s:PopUpAnchor>
+	
+	<!--- The anchor button used by the DropDownList. The default skin is DropDownListButtonSkin. -->
+	<s:Button id="openButton" left="0" right="0" top="0" bottom="0" focusEnabled="false"
+			  skinClass="cobalt.skins.DropDownListButtonSkin" />  
+	<!--- The prompt area of the DropDownList. -->
+	<s:Label id="labelDisplay" verticalAlign="middle" maxDisplayedLines="1" 
+			 mouseEnabled="false" mouseChildren="false"
+			 left="7" right="30" top="2" bottom="2" width="75" verticalCenter="1"
+			 color="#FFFFFF"/> 
+	
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/DropDownListSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as Thu Jun 14 18:53:27 2012
@@ -0,0 +1,243 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 cobalt.skins
+{
+
+import flash.display.Bitmap;
+import flash.display.BitmapData;
+import flash.display.IBitmapDrawable;
+import flash.events.Event;
+import flash.filters.GlowFilter;
+import flash.geom.ColorTransform;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import spark.components.supportClasses.SkinnableComponent;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+import flash.utils.Dictionary;
+
+/**
+ *  Error skins for Spark components.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class ErrorSkin extends UIComponent
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+    
+    // TODO: Make this a style property?
+    private const ERROR_THICKNESS:int = 1;    
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+    
+    private static var colorTransform:ColorTransform = new ColorTransform(
+                1.01, 1.01, 1.01, 2);
+    private static var glowFilter:GlowFilter = new GlowFilter(
+                0xFF0000, 0.85, 2, 2, 3, 1, false, true);
+    private static var rect:Rectangle = new Rectangle();;
+    private static var filterPt:Point = new Point();
+                 
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    public function ErrorSkin()
+    {
+        super();
+        
+        mouseEnabled = false;
+        mouseChildren = false;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Bitmap capture of the focused component. This bitmap includes a glow
+     *  filter that shows the focus glow.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    private var bitmap:Bitmap;
+
+    /**
+     * @private
+     */
+    private var _errorObject:SkinnableComponent;
+    
+    /**
+     *  Object to draw error around.  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get errorObject():SkinnableComponent
+    {
+        return _errorObject;
+    }
+    
+    public function set errorObject(value:SkinnableComponent):void
+    {
+        _errorObject = value;
+        
+        // Add an "updateComplete" listener to the skin so we can redraw
+        // whenever the skin is drawn.
+        if (_errorObject.skin)
+            _errorObject.skin.addEventListener("updateComplete", 
+                    skin_updateCompleteHandler, false, 0, true);
+    }
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+    
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        // Early exit if we don't have an error object
+        if (!errorObject)
+            return;
+            
+        // Grab a bitmap of the error object
+        var bitmapData:BitmapData = new BitmapData(
+                    errorObject.width + (ERROR_THICKNESS * 2), 
+                    errorObject.height + (ERROR_THICKNESS * 2), true, 0);
+        var m:Matrix = new Matrix();
+        
+        // If the error object has a focus skin, make sure it is hidden.
+        if (errorObject.mx_internal::focusObj)
+            errorObject.mx_internal::focusObj.visible = false;
+       
+        // Temporary solution for error drawing on CheckBox and RadioButton components.
+        // Hide the label before drawing the focus. 
+        // TODO: Figure out a better solution.
+        var hidLabelElement:Boolean = false;
+        if ((weakIsCheck(errorObject, "spark.components::CheckBox") ||
+             weakIsCheck(errorObject, "spark.components::RadioButton"))
+             && Object(errorObject).labelDisplay)
+        {
+            Object(errorObject).labelDisplay.displayObject.visible = false;
+            hidLabelElement = true;
+        }
+            
+        m.tx = ERROR_THICKNESS;
+        m.ty = ERROR_THICKNESS;
+        bitmapData.draw(errorObject as IBitmapDrawable, m);
+       
+        // Show the focus skin, if needed.
+        if (errorObject.mx_internal::focusObj)
+            errorObject.mx_internal::focusObj.visible = true;
+        
+        // Show the label, if needed.
+        if (hidLabelElement)
+            Object(errorObject).labelDisplay.displayObject.visible = true;
+        
+        // Special case for Scroller - fill the entire rect.
+        // TODO: Figure out a better solution.
+        if (weakIsCheck(errorObject, "spark.components::Scroller"))
+        {
+            rect.x = rect.y = ERROR_THICKNESS;
+            rect.width = errorObject.width;
+            rect.height = errorObject.height;
+            bitmapData.fillRect(rect, 0xFFFFFFFF);
+        }
+        
+        // Transform the color to remove the transparency. The GlowFilter has the "knockout" property
+        // set to true, which removes this image from the final display, leaving only the outer glow.
+        rect.x = rect.y = ERROR_THICKNESS;
+        rect.width = errorObject.width;
+        rect.height = errorObject.height;
+        bitmapData.colorTransform(rect, colorTransform);
+        
+        // Apply the glow filter
+        rect.x = rect.y = 0;
+        rect.width = bitmapData.width;
+        rect.height = bitmapData.height;
+        glowFilter.color = errorObject.getStyle("errorColor");
+        bitmapData.applyFilter(bitmapData, rect, filterPt, glowFilter); 
+               
+        if (!bitmap)
+        {
+            bitmap = new Bitmap();
+            addChild(bitmap);
+        }
+        
+        bitmap.bitmapData = bitmapData;
+        
+        // Set the size of the bitmap to be the size of the component. This has the effect
+        // of overlaying the error skin on the border of the component.
+        bitmap.width = errorObject.width;
+        bitmap.height = errorObject.height;
+    }
+    
+    private static var classDefCache:Object = {};
+    
+    /**
+     *  @private
+     */
+    private function weakIsCheck(obj:Object, className:String):Boolean
+    {
+        if (!(className in classDefCache))
+        {            
+            var classObj:Class = Class(systemManager.getDefinitionByName(className));
+            
+            classDefCache[className] = classObj;
+        }
+        
+        if (!classDefCache[className])
+            return false;
+            
+        return obj is classDefCache[className];
+    }
+    
+    /**
+     *  @private
+     */
+    private function skin_updateCompleteHandler(event:Event):void
+    {
+        // Whenever the skin is updated, we need to redraw
+        invalidateDisplayList();
+    }
+}
+}        

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ErrorSkin.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as Thu Jun 14 18:53:27 2012
@@ -0,0 +1,247 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 cobalt.skins
+{
+
+import flash.display.Bitmap;
+import flash.display.BitmapData;
+import flash.display.IBitmapDrawable;
+import flash.events.Event;
+import flash.filters.GlowFilter;
+import flash.geom.ColorTransform;
+import flash.geom.Matrix;
+import flash.geom.Point;
+import flash.geom.Rectangle;
+
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+import spark.components.supportClasses.SkinnableComponent;
+
+/**
+ *  Focus skins for Spark components.
+ *  
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class FocusSkin extends UIComponent
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+    
+    // TODO: Make this a style property?
+    private const FOCUS_THICKNESS:int = 2;    
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+    
+    private static var colorTransform:ColorTransform = new ColorTransform(
+                1.01, 1.01, 1.01, 2);
+    private static var glowFilter:GlowFilter = new GlowFilter(
+                0x70B2EE, 0.85, 5, 5, 3, 1, false, true);
+    private static var rect:Rectangle = new Rectangle();;
+    private static var filterPt:Point = new Point();
+                 
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     * Constructor.
+     */
+    public function FocusSkin()
+    {
+        super();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+    
+    /**
+     *  Bitmap capture of the focused component. This bitmap includes a glow
+     *  filter that shows the focus glow.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    private var bitmap:Bitmap;
+
+    /**
+     *  @private
+     */
+    private var _focusObject:SkinnableComponent;
+    
+    /**
+     *  Object to draw focus around.  If null, uses focusManager.getFocus();
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+	public function get focusObject():SkinnableComponent
+	{
+	    return _focusObject;
+	}
+	
+	public function set focusObject(value:SkinnableComponent):void
+	{
+	    _focusObject = value;
+        
+        // Add an "updateComplete" listener to the skin so we can redraw
+        // whenever the skin is drawn.
+        if (_focusObject.skin)
+            _focusObject.skin.addEventListener("updateComplete", 
+                    skin_updateCompleteHandler, false, 0, true);
+	}
+    
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+    
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        // Early exit if we don't have a focus manager
+        if (!focusManager)
+            return;
+            
+        // Grab a bitmap of the focused object
+        if (!focusObject)
+			focusObject = focusManager.getFocus() as SkinnableComponent;
+			
+        var bitmapData:BitmapData = new BitmapData(
+                    focusObject.width + (FOCUS_THICKNESS * 2), 
+                    focusObject.height + (FOCUS_THICKNESS * 2), true, 0);
+        var m:Matrix = new Matrix();
+        
+        // If the focus object already has a focus skin, make sure it is hidden.
+        if (focusObject.mx_internal::focusObj)
+            focusObject.mx_internal::focusObj.visible = false;
+       
+        // Temporary solution for focus drawing on CheckBox and RadioButton components.
+        // Hide the label before drawing the focus. 
+        // TODO: Figure out a better solution.
+        var hidLabelElement:Boolean = false;
+        if ((weakIsCheck(focusObject, "spark.components::CheckBox") ||
+             weakIsCheck(focusObject, "spark.components::RadioButton"))
+             && Object(focusObject).labelDisplay)
+        {
+            Object(focusObject).labelDisplay.displayObject.visible = false;
+            hidLabelElement = true;
+        }
+            
+        m.tx = FOCUS_THICKNESS;
+        m.ty = FOCUS_THICKNESS;
+        bitmapData.draw(focusObject as IBitmapDrawable, m);
+        
+        // Show the focus skin, if needed.
+        if (focusObject.mx_internal::focusObj)
+            focusObject.mx_internal::focusObj.visible = true;
+        
+        // Show the label, if needed.
+        if (hidLabelElement)
+            Object(focusObject).labelDisplay.displayObject.visible = true;
+        
+        // Special case for Scroller - fill the entire rect.
+        // TODO: Figure out a better solution.
+        if (weakIsCheck(focusObject, "spark.components::Scroller"))
+        {
+            rect.x = rect.y = FOCUS_THICKNESS;
+            rect.width = focusObject.width;
+            rect.height = focusObject.height;
+            bitmapData.fillRect(rect, 0xFFFFFFFF);
+        }
+        
+        // Transform the color to remove the transparency. The GlowFilter has the "knockout" property
+        // set to true, which removes this image from the final display, leaving only the outer glow.
+        rect.x = rect.y = FOCUS_THICKNESS;
+        rect.width = focusObject.width;
+        rect.height = focusObject.height;
+        bitmapData.colorTransform(rect, colorTransform);
+        
+        // Apply the glow filter
+        rect.x = rect.y = 0;
+        rect.width = bitmapData.width;
+        rect.height = bitmapData.height;
+        // If the focusObject has an errorString, use "errorColor" instead of "focusColor" 
+        if (focusObject.errorString != null && focusObject.errorString != "") 
+        {
+            glowFilter.color = focusObject.getStyle("errorColor");
+        }
+        else
+        {
+            glowFilter.color = focusObject.getStyle("focusColor");
+        }
+        bitmapData.applyFilter(bitmapData, rect, filterPt, glowFilter); 
+               
+        if (!bitmap)
+        {
+            bitmap = new Bitmap();
+            addChild(bitmap);
+            bitmap.x = bitmap.y = -FOCUS_THICKNESS;
+        }
+        
+        bitmap.bitmapData = bitmapData;
+    }
+    
+    private static var classDefCache:Object = {};
+    
+    /**
+     *  @private
+     */
+    private function weakIsCheck(obj:Object, className:String):Boolean
+    {
+        if (!(className in classDefCache))
+        {            
+            var classObj:Class = Class(systemManager.getDefinitionByName(className));
+            
+            classDefCache[className] = classObj;
+        }
+        
+        if (!classDefCache[className])
+            return false;
+            
+        return obj is classDefCache[className];
+    }
+    
+    private function skin_updateCompleteHandler(event:Event):void
+    {
+        // We need to redraw whenever the focus object skin redraws.
+        invalidateDisplayList();
+    }
+}
+}        

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/FocusSkin.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,64 @@
+<?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 thumb and track skins are defined by the
+HScrollBarThumbSkin and HScrollBarTrackSkin classes, respectively. -->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"
+	  minWidth="35" minHeight="15"
+	  alpha.disabled="0.5">
+
+    <fx:Metadata>
+    <![CDATA[ 
+	/** 
+	 * @copy spark.skins.default.ApplicationSkin#hostComponent
+	 */
+    	[HostComponent("spark.components.HScrollBar")]
+    ]]>
+    </fx:Metadata> 
+        
+    <s:states>
+    	<s:State name="normal" />
+    	<s:State name="disabled" />
+		<s:State name="inactive" />
+    </s:states>
+    
+    <!--- Defines the skin class for the HScrollBarSkin's track. The default skin class is HScrollBarTrackSkin. -->
+    <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="track" left="16" right="15" width="54"
+              focusEnabled="false"
+              skinClass="cobalt.skins.HScrollBarTrackSkin" />
+    <!--- Defines the skin class for the HScrollBarSkin's thumb. The default skin class is HScrollBarThumbSkin. -->
+   	<!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="thumb" 
+              focusEnabled="false"
+              skinClass="cobalt.skins.HScrollBarThumbSkin"  />
+
+    <!--- Defines the skin class for the left button of the HScrollBarSkin. The default skin class is ScrollBarLeftButtonSkin. -->
+    <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="decrementButton" left="0"
+              focusEnabled="false"
+              skinClass="cobalt.skins.ScrollBarLeftButtonSkin"  />
+              
+    <!--- Defines the skin class for the right button of the HScrollBarSkin. The default skin class is ScrollBarRightButtonSkin. -->
+    <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="incrementButton" right="0"
+              focusEnabled="false"
+              skinClass="cobalt.skins.ScrollBarRightButtonSkin" />
+
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,180 @@
+<?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.  
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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> 
+    
+    <s:states>
+        <s:State name="up" />
+        <s:State name="over" />
+        <s:State name="down" />
+        <s:State name="disabled" />
+    </s:states>
+
+		
+	<s:Group top="2" bottom="2">
+		<!-- Layer 1: border -->
+		<s:Rect id="border" left="-1" right="0" top="0" radiusX="4" minWidth="24" minHeight="11">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x426089" 
+									 color.over="0x5C85B8" 
+									 color.down="0x263852" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x304663" 
+									 color.over="0x43658F" 
+									 color.down="0x2E4260" 
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 2: innerBorder -->
+		<s:Rect id="innerBorder" left="0" right="1" top="1" bottom="1" radiusX="3">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x557FB5" 
+									 color.over="0x77B1D2" 
+									 color.down="0x344E6D" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x42628A" 
+									 color.over="0x5C89B9" 
+									 color.down="0x3E5A80"
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 3: insetBorder -->
+		<s:Rect id="insetBorder" left="1" right="2" top="2" bottom="2" radiusX="2">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x426089" 
+									 color.over="0x426089" 
+									 color.down="0x263852" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x304663" 
+									 color.over="0x304663" 
+									 color.down="0x2E4260" 
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 4: fill -->
+		<s:Rect id="fill" left="2" right="3" top="3" bottom="3" radiusX="1">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x446690" 
+									 color.over="0x446690" 
+									 color.down="0x2B405C"
+									 alpha="1.0"/>
+					<s:GradientEntry color="0x496C9A" 
+									 color.over="0x496C9A" 
+									 color.down="0x2F4563" 
+									 alpha="1.0" 
+									 ratio=".1"/>
+					<s:GradientEntry color="0x3D5A80" 
+									 color.over="0x3D5A80" 
+									 color.down="0x354D6F" 
+									 alpha="1.0" 
+									 ratio=".9"/>
+					<s:GradientEntry color="0x385275" 
+									 color.over="0x385275" 
+									 color.down="0x314867" 
+									 alpha="1.0" 
+									 ratio=".1"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	<!-- Thumb Icon DropShadow -->
+	<s:Group verticalCenter="1" horizontalCenter="0">
+		<s:Rect width="2" height="3" left="0">
+			<s:fill>
+				<s:SolidColor
+					color="0x000000"
+					alpha=".3"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="3">
+			<s:fill>
+				<s:SolidColor
+					color="0x000000"
+					alpha=".3"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="6">
+			<s:fill>
+				<s:SolidColor
+					color="0x000000"
+					alpha=".3"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="9">
+			<s:fill>
+				<s:SolidColor
+					color="0x000000"
+					alpha=".3"/>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+    <!-- Thumb Icon -->
+	<s:Group verticalCenter="0" horizontalCenter="0">
+		 <s:Rect width="2" height="3" left="0">
+			<s:fill>
+				<s:SolidColor
+					color="0xAFAFAF"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="3">
+			<s:fill>
+				<s:SolidColor
+					color="0xAFAFAF"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="6">
+			<s:fill>
+				<s:SolidColor
+					color="0xAFAFAF"/>
+			</s:fill>
+		</s:Rect>
+		<s:Rect width="2" height="3" left="9">
+			<s:fill>
+				<s:SolidColor
+					color="0xAFAFAF"/>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+	</s:Group>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarThumbSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,85 @@
+<?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.  
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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> 
+    
+    <s:states>
+        <s:State name="up" />
+        <s:State name="down" />
+        <s:State name="over" />
+        <s:State name="disabled" />
+    </s:states>
+
+	<!-- Layer 1: border -->
+	<s:Rect id="border" left="-1" right="0" top="0" bottom="0" height="15">
+		<s:fill>
+			<s:SolidColor 	color="0x496C9A" 
+							color.over="0x496C9A" 
+							color.down="0x496C9A"/>
+		</s:fill>
+			
+	</s:Rect>
+	<!-- Layer 2: Track Fill -->
+	<s:Rect id="trackFill" left="-1" right="0" top="1" bottom="1" height="13">
+		<s:fill>
+			<s:LinearGradient rotation="90">
+				<s:GradientEntry color="0xBABABA" 
+								 color.over="0xBABABA" 
+								 color.down="0xBABABA" 
+								 ratio="0"
+								 />
+				<s:GradientEntry color="0xE4E4E4" 
+								 color.over="0xE4E4E4" 
+								 color.down="0xE4E4E4" 
+								 ratio=".2"
+								 />
+				<s:GradientEntry color="0xE4E4E4" 
+								 color.over="0xE4E4E4" 
+								 color.down="0xE4E4E4" 
+								 ratio=".8"
+								 />
+				<s:GradientEntry color="0xBABABA" 
+								 color.over="0xBABABA" 
+								 color.down="0xBABABA" 
+								 ratio="1.0"
+								 />
+			</s:LinearGradient>
+		</s:fill>
+	</s:Rect>
+	
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HScrollBarTrackSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,70 @@
+<?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 thumb and track skins are defined by the HSliderThumbSkin and HSliderTrackSkin classes, respectively. -->
+<s:Skin 
+	xmlns:fx="http://ns.adobe.com/mxml/2009" 
+	xmlns:s="library://ns.adobe.com/flex/spark"
+	  minHeight="11" minWidth="100"
+	  alpha.disabled="0.5">
+
+    <fx:Metadata>
+    <![CDATA[ 
+	/** 
+	 * @copy spark.skins.default.ApplicationSkin#hostComponent
+	 */
+    	[HostComponent("spark.components.HSlider")]
+    ]]>
+    </fx:Metadata> 
+    
+    <s:states>
+    	<s:State name="normal" />
+    	<s:State name="disabled" />
+    </s:states>
+    
+    <fx:Declarations>
+	<!--- Defines the appearance of the the Slider's DataTip. To customize the DataTip's appearance, create a custom HSliderSkin class. -->
+        <fx:Component id="dataTip">    	
+    	   <s:DataRenderer minHeight="18" minWidth="40" y="-34">  
+			   <s:Rect top="0" left="0" right="0" bottom="0" radiusX="2">
+				   <s:fill>
+					   <s:SolidColor color="0x333333" alpha=".9"/>
+				   </s:fill>
+				   <s:filters>
+					   <s:DropShadowFilter angle="90" color="0x000000" distance="3"/>
+				   </s:filters>
+			   </s:Rect>
+			   <s:Label id="labelDisplay" text="{data}"
+						horizontalCenter="0" verticalCenter="1"
+						left="3" right="3" top="3" bottom="3"
+						textAlign="center" verticalAlign="middle"
+						fontWeight="normal" color="white" fontSize="11">
+			   </s:Label>
+            </s:DataRenderer>
+	   </fx:Component>
+	</fx:Declarations>
+    
+    <!--- Defines the skin class for the HSliderSkin's track. The default skin class is HSliderTrackSkin. -->
+    <!-- using a graphical skin, need to increase constraints top and bottom so track does not scale to the bounding height of the thumb -->
+    <s:Button id="track" left="0" right="0" top="4" bottom="4"
+    		skinClass="cobalt.skins.HSliderTrackSkin"/>
+    <!--- Defines the skin class for the HSliderSkin's thumb. The default skin class is HSliderThumbSkin. -->
+    <s:Button id="thumb" top="0" bottom="0" width="11" height="11" 
+             skinClass="cobalt.skins.HSliderThumbSkin"/>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,121 @@
+<?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 HSlider component.  
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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> 
+	
+    <s:states>
+        <s:State name="up" />
+        <s:State name="over" />
+        <s:State name="down" />
+        <s:State name="disabled" />
+    </s:states>
+
+	<s:Group verticalCenter="0" minHeight="11" minWidth="11">
+		<!-- Layer 1: border -->
+		<s:Rect id="border" left="0" right="0" top="0" bottom="0" radiusX="2">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x426089" 
+									 color.over="0x5C85B8" 
+									 color.down="0x263852" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x304663" 
+									 color.over="0x43658F" 
+									 color.down="0x2E4260" 
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 2: innerBorder -->
+		<s:Rect id="innerBorder" left="1" right="1" top="1" bottom="1" radiusX="1">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x557FB5" 
+									 color.over="0x77B1D2" 
+									 color.down="0x344E6D" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x42628A" 
+									 color.over="0x5C89B9" 
+									 color.down="0x3E5A80"
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 3: insetBorder -->
+		<s:Rect id="insetBorder" left="2" right="2" top="2" bottom="2" radiusX="1">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x426089" 
+									 color.over="0x426089" 
+									 color.down="0x263852" 
+									 alpha="1.0" />
+					<s:GradientEntry color="0x304663" 
+									 color.over="0x304663" 
+									 color.down="0x2E4260" 
+									 alpha="1.0" />
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+		<!-- Layer 4: fill -->
+		<s:Rect id="fill" left="3" right="3" top="3" bottom="3" radiusX="1">
+			<s:fill>
+				<s:LinearGradient rotation="90">
+					<s:GradientEntry color="0x446690" 
+									 color.over="0x446690" 
+									 color.down="0x2B405C"
+									 alpha="1.0"/>
+					<s:GradientEntry color="0x496C9A" 
+									 color.over="0x496C9A" 
+									 color.down="0x2F4563" 
+									 alpha="1.0" 
+									 ratio=".1"/>
+					<s:GradientEntry color="0x3D5A80" 
+									 color.over="0x3D5A80" 
+									 color.down="0x354D6F" 
+									 alpha="1.0" 
+									 ratio=".9"/>
+					<s:GradientEntry color="0x385275" 
+									 color.over="0x385275" 
+									 color.down="0x314867" 
+									 alpha="1.0" 
+									 ratio=".1"/>
+				</s:LinearGradient>
+			</s:fill>
+		</s:Rect>
+	</s:Group>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderThumbSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,81 @@
+<?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 of a Spark HSlider component.  
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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> 
+	
+	
+	<s:states>
+		<s:State name="up" />
+		<s:State name="down" />
+		<s:State name="over" />
+		<s:State name="disabled" />
+	</s:states>
+	
+	<!-- Top Track -->
+	<s:Rect left="1" right="1" top="0" height="1">
+		<s:fill>
+			<s:SolidColor color="0x585F63"/>
+		</s:fill>
+	</s:Rect>
+	<!-- Inner Track edges-->
+	<s:Rect left="0" right="0" top="1" height="1">
+		<s:fill>
+			<s:SolidColor color="0x999999"/>
+		</s:fill>
+	</s:Rect>
+	<!-- Inner Track-->
+	<s:Rect left="1" right="1" top="1" height="1">
+		<s:fill>
+			<s:SolidColor color="0xFFFFFF"/>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- Bottom Track -->
+	<s:Rect left="1" right="1" bottom="0" height="1">
+		<s:fill>
+			<s:SolidColor color="0x999999"/>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- hit area -->
+	<s:Rect left="0" right="0" top="0" bottom="0">
+		<s:fill>
+			<s:SolidColor alpha="0"/>
+		</s:fill>
+	</s:Rect>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HSliderTrackSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as Thu Jun 14 18:53:27 2012
@@ -0,0 +1,232 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 cobalt.skins
+{
+    
+    import flash.display.Bitmap;
+    import flash.display.BitmapData;
+    import flash.display.IBitmapDrawable;
+    import flash.events.Event;
+    import flash.geom.ColorTransform;
+    import flash.geom.Matrix;
+    import flash.geom.Matrix3D;
+    import flash.geom.Rectangle;
+    
+    import mx.core.UIComponent;
+    import mx.core.mx_internal;
+    import mx.events.FlexEvent;
+    
+    import spark.components.supportClasses.Skin;
+    import spark.components.supportClasses.SkinnableComponent;
+    
+    use namespace mx_internal;
+    
+    /**
+     *  Base class for skins that do a bitmap capture of a target components
+     *  and apply a filter to the bitmap.
+     *  This is the base class for FocusSkin and ErrorSkin.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class HighlightBitmapCaptureSkin extends UIComponent
+    {
+        //--------------------------------------------------------------------------
+        //
+        //  Class constants
+        //
+        //--------------------------------------------------------------------------
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Class variables
+        //
+        //--------------------------------------------------------------------------
+        
+        private static var capturingBitmap:Boolean = false;
+        private static var colorTransform:ColorTransform = new ColorTransform(
+            1.01, 1.01, 1.01, 2);
+        private static var rect:Rectangle = new Rectangle();
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+        
+        /**
+         * Constructor.
+         */
+        public function HighlightBitmapCaptureSkin()
+        {
+            super();
+        }
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Variables
+        //
+        //--------------------------------------------------------------------------
+         
+        /**
+         *  Bitmap capture of the target component. 
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        protected var bitmap:Bitmap;
+        
+        /**
+         *  @private
+         */
+        private var _target:SkinnableComponent;
+        
+        /**
+         *  Object to target.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function get target():SkinnableComponent
+        {
+            return _target;
+        }
+        
+        public function set target(value:SkinnableComponent):void
+        {
+            _target = value;
+            
+            // Add an "updateComplete" listener to the skin so we can redraw
+            // whenever the skin is drawn.
+            if (_target.skin)
+                _target.skin.addEventListener(FlexEvent.UPDATE_COMPLETE, 
+                    skin_updateCompleteHandler, false, 0, true);
+        }
+        
+        /**
+         *  Number of padding pixels to put around the bitmap.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        protected function get borderWeight():Number
+        {
+            return 1;
+        }
+        
+        //--------------------------------------------------------------------------
+        //
+        //  Overridden methods
+        //
+        //--------------------------------------------------------------------------
+        
+        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+        {   
+            // if we weren't handed a targetObject then exit early
+            if (!target)
+                return;
+            
+            var bitmapData:BitmapData = new BitmapData(
+                target.width + (borderWeight * 2), 
+                target.height + (borderWeight * 2), true, 0);
+            var m:Matrix = new Matrix();
+            
+            capturingBitmap = true;
+            
+            // Ensure no 3D transforms apply, as this skews our snapshot bitmap.
+            var transform3D:Matrix3D = null;
+            if (target.$transform.matrix3D)
+            {
+                transform3D = target.$transform.matrix3D;  
+                target.$transform.matrix3D = null;
+            }
+            
+            // If the target object already has a focus skin, make sure it is hidden.
+            if (target.focusObj)
+                target.focusObj.visible = false;
+            
+            
+            var skin:Skin = target.skin as Skin;
+            if (skin)
+                skin.beginHighlightBitmapCapture();
+            
+            m.tx = borderWeight;
+            m.ty = borderWeight;
+            bitmapData.draw(target as IBitmapDrawable, m);
+            
+            if (skin)
+                skin.endHighlightBitmapCapture();
+            
+            
+            // Show the focus skin, if needed.
+            if (target.focusObj)
+                target.focusObj.visible = true;
+            
+            // Transform the color to remove the transparency. The GlowFilter has the "knockout" property
+            // set to true, which removes this image from the final display, leaving only the outer glow.
+            rect.x = rect.y = borderWeight;
+            rect.width = target.width;
+            rect.height = target.height;
+            bitmapData.colorTransform(rect, colorTransform);
+            
+            if (!bitmap)
+            {
+                bitmap = new Bitmap();
+                addChild(bitmap);
+            }
+            
+            bitmap.x = bitmap.y = -borderWeight;
+            bitmap.bitmapData = bitmapData;
+            
+            processBitmap();
+            
+            // Restore original 3D matrix if applicable.
+            if (transform3D)
+                target.$transform.matrix3D = transform3D;
+            
+            capturingBitmap = false;
+        }
+        
+        /**
+         *  Apply any post-processing to the captured bitmap.
+         */
+        protected function processBitmap():void
+        {          
+        }
+        
+        /**
+         *  @private
+         */
+        private function skin_updateCompleteHandler(event:Event):void
+        {
+            // We need to redraw whenever the target object skin redraws.
+            if (!capturingBitmap)
+                invalidateDisplayList();
+        }
+    }
+}        

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/HighlightBitmapCaptureSkin.as
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,92 @@
+<?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 List component.  
+
+@see spark.components.List
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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="112" minHeight="112"
+			 alpha.disabled="0.5" blendMode="normal"> 
+	
+	<fx:Metadata>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.List")]
+		]]>
+	</fx:Metadata> 
+		
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="disabled" />
+	</s:states>
+	
+	<fx:Declarations>
+		<!-- Defines the appearance of the the List's drop indicator.
+		To customize the drop indicator appearance, create a custom ListSkin class. -->
+		<fx:Component id="dropIndicator">
+			<s:Group includeInLayout="false" minWidth="2" minHeight="2" maxWidth="4" maxHeight="4">
+				<s:Rect left="2" right="2" top="0" bottom="0" radiusX="1" radiusY="1">
+					<s:fill>
+						<!--- Defines the color of the background. The default color is 0x888888. -->
+						<s:SolidColor color="0x888888" />
+					</s:fill>
+					<s:stroke>
+						<s:SolidColorStroke color="0x686868" weight="1"/>
+					</s:stroke>
+				</s:Rect>
+			</s:Group>
+		</fx:Component>
+	</fx:Declarations>
+	
+	<!-- border -->
+	<s:Rect left="0" right="0" top="0" bottom="0" id="border">
+		<s:stroke>
+			<s:SolidColorStroke id="borderStroke" weight="1" color="0xCCCCCC"/>
+		</s:stroke>
+	</s:Rect>
+	
+	<!-- fill -->
+	<!--- Defines the background appearance of the list-based component. -->
+	<s:Rect id="background" left="1" right="1" top="1" bottom="1" >
+		<s:fill>
+			<!--- Defines the color of the background. The default color is 0xFFFFFF. -->
+			<s:SolidColor id="bgFill" color="0xFFFFFF" />
+		</s:fill>
+	</s:Rect>
+	
+	<!--- The Scroller component to add scroll bars to the list. -->
+	<s:Scroller left="0" top="0" right="0" bottom="0" id="scroller" minViewportInset="1" hasFocusableChildren="false">
+		<!--- The container for the data items. -->
+		<s:DataGroup id="dataGroup" itemRenderer="spark.skins.spark.DefaultItemRenderer">
+			<s:layout>
+				<s:VerticalLayout gap="0" horizontalAlign="contentJustify" />
+			</s:layout>
+		</s:DataGroup>
+	</s:Scroller>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/ListSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,59 @@
+<?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 NumericStepper component. The skin for the text input field on a NumericStepper
+component is defined by the NumericStepperTextInputSkin class. -->
+<s:Skin 
+	xmlns:fx="http://ns.adobe.com/mxml/2009" 
+	xmlns:s="library://ns.adobe.com/flex/spark"
+	xmlns:mx="library://ns.adobe.com/flex/mx"
+	  minHeight="24" 
+	  alpha.disabled="0.5">
+
+    <fx:Metadata>
+    <![CDATA[ 
+	/** 
+	 * @copy spark.skins.default.ApplicationSkin#hostComponent
+	 */
+        [HostComponent("spark.components.NumericStepper")]
+    ]]>
+    </fx:Metadata> 
+    
+    
+    <s:states>
+    	<s:State name="normal" />
+    	<s:State name="disabled" />
+    </s:states>
+
+    <!--- Defines the appearance of the NumericStepper component's up button. The default class is SpinnerIncrButtonSkin. -->
+     <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="incrementButton" right="0" top="0" height="50%" 
+             skinClass="cobalt.skins.SpinnerIncrementButtonSkin" />
+             
+    <!--- Defines the appearance of the NumericStepper component's down button. The default class is SpinnerDecrButtonSkin. -->
+     <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:Button id="decrementButton" right="0" bottom="0" height="50%" 
+              skinClass="cobalt.skins.SpinnerDecrementButtonSkin" />
+                   
+    <!--- Defines the appearance of the NumericStepper component's TextInput subcomponent. The default class is NumericStepperTextInputSkin. -->
+     <!-- when using custom theme set path to theme's skin MXML files: cobalt.skins.xxxSkin -->
+    <s:TextInput id="textDisplay" left="0" top="0" right="18" bottom="0"
+    	skinClass="cobalt.skins.NumericStepperTextInputSkin" />
+    	
+</s:Skin>
\ No newline at end of file

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,79 @@
+<?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 text input field of a Spark NumericStepper component.  
+
+@langversion 3.0
+@playerversion Flash 10
+@playerversion AIR 1.5
+@productversion Flex 4
+-->
+<s:Skin 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>
+		<![CDATA[ 
+		/** 
+		* @copy spark.skins.spark.ApplicationSkin#hostComponent
+		*/
+		[HostComponent("spark.components.TextInput")]
+		]]>
+	</fx:Metadata> 
+	<fx:Script fb:purpose="styling">
+ 		static private const exclusions:Array = ["background", "textDisplay"];
+		 override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+        {	
+			super.updateDisplayList(unscaledWidth, unscaledHeight);
+		}
+	</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>
+    
+	<!-- Text Fill & Border --> 
+	<s:Rect left="0" right="0" top="0" bottom="0" id="border">
+		<s:stroke>     
+			<s:SolidColorStroke color="0xC9CBCC"
+								weight="1" />
+		</s:stroke>
+		<s:fill>
+			<s:SolidColor color="0xFFFFFF"/>
+		</s:fill>
+	</s:Rect>
+	<!-- Top edge shadow -->
+	<s:Rect left="1" right="1" top="0" height="1">
+		<s:fill>
+			<s:SolidColor color="#6D6F70"/>
+		</s:fill>
+	</s:Rect>
+	
+	<!-- text -->
+	<!-- text -->
+	<s:RichEditableText id="textDisplay"
+						lineBreak="explicit"
+						verticalAlign="middle"
+						multiline="false"
+						left="1" right="1" top="1" bottom="1" 
+						paddingLeft="3" paddingTop="6"
+						paddingRight="6" paddingBottom="3"/>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/NumericStepperTextInputSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml?rev=1350373&view=auto
==============================================================================
--- incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml (added)
+++ incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml Thu Jun 14 18:53:27 2012
@@ -0,0 +1,293 @@
+<?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 Spark skin class for the Halo Panel component's border. 
+        
+      @langversion 3.0
+      @playerversion Flash 10
+      @playerversion AIR 1.5
+      @productversion Flex 4
+-->
+<s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009" 
+                        xmlns:s="library://ns.adobe.com/flex/spark" 
+                        implements="mx.core.IRectangularBorder">
+    
+    <fx:Script>
+        <![CDATA[
+        import mx.core.EdgeMetrics;
+        import mx.core.IUIComponent;
+        
+        private var _metrics:EdgeMetrics = new EdgeMetrics(1, 32, 1, 1);
+        public function get borderMetrics():EdgeMetrics
+        {
+            var hasPanelParent:Boolean = isPanel(parent);
+            var controlBar:IUIComponent = hasPanelParent ? Object(parent).mx_internal::_controlBar : null;        
+            var titleBarHeight:Number;
+            // if headerHeight is specified, use it, plus 1 for the border, plus 1 more for the divider
+            if (hasPanelParent)
+                titleBarHeight = Object(parent).getStyle("headerHeight") + 2;
+            // if headerHeight is not specified, measure the text.  It comes out 1 higher than we'd like
+            // so we only add 1 more here
+            if (isNaN(titleBarHeight))
+                titleBarHeight = hasPanelParent ? Object(parent).mx_internal::getHeaderHeightProxy(true) + 1: 32;
+            _metrics.top = titleBarHeight;
+            
+            if (controlBar && controlBar.includeInLayout)
+                _metrics.bottom = controlBar.getExplicitOrMeasuredHeight() + 1;
+            else
+                _metrics.bottom = 1;
+            
+            return _metrics;
+        }
+        
+        //----------------------------------
+        //  backgroundImageBounds
+        //----------------------------------
+        
+        /**
+         *  @private
+         *  Storage for backgroundImageBounds property.
+         */
+        private var _backgroundImageBounds:Rectangle;
+        
+        /**
+         *  Rectangular area within which to draw the background image.
+         *
+         *  This can be larger than the dimensions of the border
+         *  if the parent container has scrollable content.
+         *  If this property is null, the border can use
+         *  the parent's size and <code>viewMetrics</code> property to determine its value.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public function get backgroundImageBounds():Rectangle
+        {
+            return _backgroundImageBounds;
+        }
+        
+        /**
+         *  @private
+         */
+        public function set backgroundImageBounds(value:Rectangle):void
+        {
+            if (_backgroundImageBounds && value && _backgroundImageBounds.equals(value))
+                return;
+            
+            _backgroundImageBounds = value;
+            
+            invalidateDisplayList();
+        }
+        
+        public function get hasBackgroundImage():Boolean
+        {
+            return false;
+        }
+        
+        public function layoutBackgroundImage():void
+        {
+        
+        }
+
+        override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+        {
+            var hasPanelParent:Boolean = isPanel(parent);
+            var titleBarHeight:Number;
+            if (hasPanelParent)
+                titleBarHeight = Object(parent).getStyle("headerHeight");
+            if (isNaN(titleBarHeight))
+                titleBarHeight = hasPanelParent ? Object(parent).mx_internal::getHeaderHeightProxy(true) - 1 : 30;
+            tbbg.height = titleBarHeight;
+            tbhi.height = titleBarHeight;
+            tbdiv.top = titleBarHeight;
+
+            var em:EdgeMetrics = borderMetrics;
+            
+            // Control bar visibility is determined by a borderMetric.bottom greater than 1
+            if (em.bottom > 1)
+            {
+                cbbg.height = em.bottom - 1;
+                cbdiv.bottom = cbbg.height;
+                cbbg.visible = cbdiv.visible = true;
+            }
+            else
+            {
+                cbbg.visible = cbdiv.visible = false;
+            }
+            
+            if (getStyle("borderVisible") == false)
+            {
+                border.visible = false;
+                contents.left = contents.top = contents.right = contents.bottom = 0;
+            }
+            else
+            {
+                border.visible = true;
+                contents.left = contents.top = contents.right = contents.bottom = 1;
+            }
+            
+            dropShadow.visible = getStyle("dropShadowVisible") && width > 0 && height > 0;
+            
+            var cr:Number = getStyle("cornerRadius");
+            
+            if (cornerRadius != cr)
+            {
+                cornerRadius = cr;
+                contentMaskRect.topLeftRadiusX = cornerRadius;
+                contentMaskRect.topRightRadiusX = cornerRadius;
+                border.topLeftRadiusX = cornerRadius;
+                border.topRightRadiusX = cornerRadius;
+                dropShadow.trRadius = cornerRadius;
+                dropShadow.tlRadius = cornerRadius;
+                
+                if (cbbg.visible)
+                {
+                    contentMaskRect.bottomLeftRadiusX = cornerRadius;
+                    contentMaskRect.bottomRightRadiusX = cornerRadius;
+                    border.bottomLeftRadiusX = cornerRadius;
+                    border.bottomRightRadiusX = cornerRadius;
+                    dropShadow.blRadius = cornerRadius;
+                    dropShadow.brRadius = cornerRadius;
+                }
+            }
+            
+            backgroundFill.color = getStyle("backgroundColor");
+            backgroundFill.alpha = getStyle("backgroundAlpha");
+            
+            super.updateDisplayList(unscaledWidth, unscaledHeight);
+        }
+        
+        /**
+         *  We don't use 'is' to prevent dependency issues
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        private static var panels:Object = {};
+    
+        private static function isPanel(parent:Object):Boolean
+        {
+            var s:String = getQualifiedClassName(parent);
+            if (panels[s] == 1)
+                return true;
+    
+            if (panels[s] == 0)
+                return false;
+    
+            if (s == "mx.containers::Panel")
+            {
+                panels[s] == 1;
+                return true;
+            }
+    
+            var x:XML = describeType(parent);
+            var xmllist:XMLList = x.extendsClass.(@type == "mx.containers::Panel");
+            if (xmllist.length() == 0)
+            {
+                panels[s] = 0;
+                return false;
+            }
+            
+            panels[s] = 1;
+            return true;
+        }
+            
+        private var cornerRadius:Number;
+        ]]>
+    </fx:Script>
+     
+    <!-- drop shadow -->
+    <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" 
+                             tlRadius="0" trRadius="0"
+                             blRadius="0" 
+                             brRadius="0"  />
+    
+    <!-- content mask -->
+    <s:Group left="1" top="1" right="1" bottom="1" id="contentMask" >
+        <s:Rect left="0" top="0" right="0" bottom="0" id="contentMaskRect"
+                topLeftRadiusX="0" topRightRadiusX="0">
+            <s:fill>
+                <s:SolidColor alpha="0"/>
+            </s:fill>
+        </s:Rect>
+    </s:Group>
+    
+    <!-- layer 1: border -->
+    <s:Rect id="border" left="0" right="0" top="0" bottom="0" 
+            topLeftRadiusX="0" topRightRadiusX="0">
+        <s:stroke>
+            <s:SolidColorStroke id="borderStroke" weight="1" />
+        </s:stroke>
+    </s:Rect>
+
+    <s:Group left="1" right="1" top="1" bottom="1" id="contents" mask="{contentMask}">
+        <!-- layer 2: background fill -->
+        <s:Rect id="background" left="0" top="0" right="0" bottom="0">
+            <s:fill>
+                <s:SolidColor id="backgroundFill" />
+            </s:fill>
+        </s:Rect>
+        
+        <!-- layer 3: title bar fill -->
+        <s:Rect id="tbbg" left="0" right="0" top="0" minHeight="30">
+           <s:fill>
+                <s:LinearGradient rotation="90">
+                    <s:GradientEntry color="0xE2E2E2" />
+                    <s:GradientEntry color="0xD9D9D9" />
+                </s:LinearGradient>
+           </s:fill>
+        </s:Rect>
+        
+        <!-- layer 4: title bar highlight -->
+        <s:Rect id="tbhi" left="0" right="0" top="0" minHeight="30">
+           <s:stroke>
+                <s:LinearGradientStroke rotation="90" weight="1">
+                    <s:GradientEntry color="0xEAEAEA" />
+                    <s:GradientEntry color="0xD9D9D9" />
+                </s:LinearGradientStroke>
+           </s:stroke>
+        </s:Rect>
+        <s:Rect id="tbdiv" left="0" right="0" top="30" height="1">
+            <s:fill>
+                <s:SolidColor color="0xC0C0C0" />
+            </s:fill>
+        </s:Rect>
+        
+        <!-- layer 5: control bar background -->
+        <s:Rect id="cbbg" left="0" right="0" bottom="0" height="20">
+            <s:fill>
+                <s:SolidColor color="0xE8E8E8" />
+            </s:fill>
+        </s:Rect>
+        
+        <!-- layer 6: control bar divider line -->
+        <s:Rect id="cbdiv" left="0" right="0" bottom="20" height="1">
+            <s:fill>
+                <s:SolidColor color="0xCDCDCD" />
+            </s:fill>
+        </s:Rect>
+    </s:Group>
+</s:Skin>

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/flex/trunk/samples/themes/cobalt/src/cobalt/skins/PanelBorderSkin.mxml
------------------------------------------------------------------------------
    svn:mime-type = text/plain