incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1228973 - /incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml
Date Sun, 08 Jan 2012 22:11:16 GMT
Author: tink
Date: Sun Jan  8 22:11:16 2012
New Revision: 1228973

URL: http://svn.apache.org/viewvc?rev=1228973&view=rev
Log:
Initial import of skin for Navigator that includes a TabBar

Added:
    incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml

Added: incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml?rev=1228973&view=auto
==============================================================================
--- incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml
(added)
+++ incubator/flex/whiteboard/navigators/src/ws/tink/spark/skins/containers/TabNavigatorSkin.mxml
Sun Jan  8 22:11:16 2012
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+
+Copyright (c) 2010 Tink Ltd - http://www.tink.ws
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated
+documentation files (the "Software"), to deal in the Software without restriction, including
without limitation 
+the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and
+to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or
substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO 
+THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, 
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE
+SOFTWARE.
+
+-->
+
+<!--- The default skin class for a Spark Navigator container.  
+
+@see ws.tink.spark.containers.Navigator
+
+@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"
+			 xmlns:st="library://ns.tink.ws/flex/spark"
+			 alpha.disabled="0.5">
+	
+	<fx:Script fb:purpose="styling">
+		
+		/* Define the skin elements that should not be colorized. 
+		For list, the skin itself is colorized but the individual parts are not. */
+		static private const exclusions:Array = [ "contentGroup", "background" ];
+		
+		/**
+		 * @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 = [ "bgFill" ];
+		
+		/**
+		 * @private
+		 */
+		override public function get contentItems():Array { return contentFill };
+		
+		/**
+		 * @private
+		 */
+		override protected function initializationComplete():void
+		{
+			useChromeColor = true;
+			super.initializationComplete();
+		}
+		
+		/**
+		 * @private
+		 */
+		override protected function updateDisplayList( unscaledWidth:Number, unscaledHeight:Number
):void
+		{
+			if( getStyle( "borderVisible" ) == true )
+			{
+				border.visible = true;
+				background.left = background.top = background.right = background.bottom = 1;
+				contentGroup.left = contentGroup.top = contentGroup.right = contentGroup.bottom = 1;
+			}
+			else
+			{
+				border.visible = false;
+				background.left = background.top = background.right = background.bottom = 0;
+				contentGroup.left = contentGroup.top = contentGroup.right = contentGroup.bottom = 0;
+			}
+			
+			borderStroke.color = getStyle( "borderColor" );
+			borderStroke.alpha = getStyle( "borderAlpha" );
+			
+			super.updateDisplayList( unscaledWidth, unscaledHeight );
+		}
+		
+	</fx:Script>
+	
+	<s:states>
+		<s:State name="normal" />
+		<s:State name="disabled" />
+	</s:states>
+	
+
+	<s:layout>
+		<s:VerticalLayout gap="0"/>
+	</s:layout>
+	
+	<s:TabBar dataProvider="{contentGroup}"/>
+	
+	
+	<!--- @private -->
+	<s:Group width="100%" height="100%">
+		
+		<!-- border -->
+		<!--- @private -->
+		<s:Rect left="0" right="0" top="0" bottom="0" id="border">
+			<s:stroke>
+				<!--- @private -->
+				<s:SolidColorStroke id="borderStroke" weight="1"/>
+			</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>
+		
+		<!--
+		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 ws.tink.spark.containers.Navigator#contentGroup -->
+		<st:NavigatorGroup id="contentGroup" left="0" right="0" top="0" bottom="0" minWidth="0"
minHeight="0"/>
+		
+	</s:Group>
+	
+
+</s:SparkSkin>



Mime
View raw message