Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/Rotator.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/Rotator.as?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/Rotator.as (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/Rotator.as Thu Jul 12 21:33:49 2012
@@ -0,0 +1,206 @@
+/*
+
+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 ws.tink.spark.controls
+{
+ import flash.events.Event;
+ import flash.events.TimerEvent;
+ import flash.geom.Vector3D;
+ import flash.utils.Timer;
+
+ import mx.core.ILayoutElement;
+ import mx.core.IVisualElement;
+ import mx.core.UIComponent;
+ import mx.core.mx_internal;
+ import mx.events.PropertyChangeEvent;
+
+ import spark.components.supportClasses.SkinnableComponent;
+ import spark.layouts.supportClasses.LayoutElementHelper;
+ import spark.primitives.supportClasses.GraphicElement;
+
+
+ /**
+ * The Rotator control is a simple skinnable component that rotates it's skin when playing.
+ *
+ * <p>You can set the amount of rotation on each frame by changing the <code>delta</code> property.</p>
+ *
+ * <p>The List control has the following default characteristics:</p>
+ * <table class="innertable">
+ * <tr><th>Characteristic</th><th>Description</th></tr>
+ * <tr><td>Default skin class</td><td>ws.tink.spark.skins.controls.RotatorSkin</td></tr>
+ * </table>
+ *
+ * @mxml <p>The <code><st:Rotator></code> tag inherits all of the tag
+ * attributes of its superclass and adds the following tag attributes:</p>
+ *
+ * <pre>
+ * <st:Rotator
+ * <strong>Properties</strong>
+ * delta="10"
+ * />
+ * </pre>
+ *
+ * @see ws.tink.spark.skins.controls.RotatorSkin
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public class Rotator extends SkinnableComponent implements IAnimator
+ {
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function Rotator()
+ {
+ super();
+ }
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Variables
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private var _playing:Boolean;
+
+ /**
+ * @private
+ */
+ private var _rotation:Number = 0;
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // delta
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage property for delta.
+ */
+ private var _delta:Number = 10;
+
+ [Inspectable(type="Boolean", defaultValue="10")]
+ /**
+ * The amount to rotate in degrees each frame.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function get delta():Number
+ {
+ return _delta;
+ }
+ /**
+ * @private
+ */
+ public function set delta(value:Number):void
+ {
+ if (_delta == value) return;
+
+ _delta = value;
+ }
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function play():void
+ {
+ _playing = true;
+ addEventListener( Event.ENTER_FRAME, enterFrameHandler, false, 0, true );
+ }
+
+ /**
+ * @inheritDoc
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function stop():void
+ {
+ _playing = false;
+ removeEventListener( Event.ENTER_FRAME, enterFrameHandler, false );
+ }
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Event Handlers
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private function enterFrameHandler( event:Event ):void
+ {
+ if( skin )
+ {
+ _rotation += ( 360 / 10 );
+ skin.transformAround( new Vector3D( unscaledWidth / 2, unscaledHeight / 2, 0 ),
+ new Vector3D( 1, 1, 1 ),
+ new Vector3D( 0, 0, _rotation ) );
+ }
+ }
+ }
+}
\ No newline at end of file
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepItem.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepItem.as?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepItem.as (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepItem.as Thu Jul 12 21:33:49 2012
@@ -0,0 +1,59 @@
+/*
+
+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 ws.tink.spark.controls
+{
+ import flash.events.EventDispatcher;
+
+ [Bindable]
+ public class StepItem extends EventDispatcher
+ {
+
+ public static const NORMAL:String = "normal";
+ public static const ACTIVE:String = "active";
+ public static const COMPLETE:String = "complete";
+ public static const ERROR:String = "error";
+
+ public function StepItem(l:String)
+ {
+ label = l;
+ }
+
+ private var _label:String = "";
+ public function get label():String { return _label; }
+
+ public function set label(value:String):void
+ {
+ if (_label == value)
+ return;
+ _label = value;
+ }
+
+ private var _status:String = NORMAL;
+ public function get status():String { return _status; }
+
+ public function set status(value:String):void
+ {
+ if (_status == value)
+ return;
+ _status = value;
+ }
+
+
+ }
+}
\ No newline at end of file
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRenderer.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRenderer.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRenderer.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRenderer.mxml Thu Jul 12 21:33:49 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.
+
+-->
+<st:StepRendererBase xmlns:fx="http://ns.adobe.com/mxml/2009"
+ xmlns:s="library://ns.adobe.com/flex/spark"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:st="ws.tink.spark.controls.*"
+ width="22" height="22" >
+ <fx:Declarations>
+ <!-- Place non-visual elements (e.g., services, value objects) here -->
+ </fx:Declarations>
+
+ <st:states>
+ <s:State name="normal"/>
+ <s:State name="active"/>
+ <s:State name="complete"/>
+ <s:State name="error"/>
+ </st:states>
+
+ <!-- layer 1: border -->
+ <!--- @private -->
+ <s:Rect width="100%" height="100%"
+ radiusX="2" radiusY="2">
+ <s:fill>
+ <s:SolidColor color="{getStyle('borderColor')}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 2: border gradient -->
+ <!--- @private -->
+ <s:Rect width="100%" height="100%"
+ radiusX="2" radiusY="2">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xffffff" alpha="0"/>
+ <s:GradientEntry color="0xffffff" alpha="1"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: fill -->
+ <!--- @private -->
+ <s:Rect left="1" right="1" top="1" bottom="1"
+ radiusX="1" radiusY="1">
+ <s:fill>
+ <s:SolidColor color="{stateColor}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 3: fill gradient -->
+ <!--- @private -->
+ <s:Rect left="1" right="1" top="1" bottom="1"
+ radiusX="1" radiusY="1">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xffffff" alpha="0.4" ratio="0.2"/>
+ <s:GradientEntry color="0xffffff" alpha="0"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <st:ActivityIndicator width="12" height="12" horizontalCenter="0" verticalCenter="0"
+ autoAnimate="true" includeIn="active"/>
+
+</st:StepRendererBase>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRendererBase.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRendererBase.as?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRendererBase.as (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/controls/StepRendererBase.as Thu Jul 12 21:33:49 2012
@@ -0,0 +1,120 @@
+/*
+
+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 ws.tink.spark.controls
+{
+ import flash.events.Event;
+
+ import mx.events.PropertyChangeEvent;
+
+ import spark.components.DataRenderer;
+ import spark.components.IItemRenderer;
+
+ public class StepRendererBase extends DataRenderer implements IItemRenderer
+ {
+ public function StepRendererBase()
+ {
+ super();
+ }
+
+ private var _itemIndex:int;
+ [Bindable("itemIndexChanged")]
+ public function get itemIndex():int
+ {
+ return _itemIndex;
+ }
+
+ public function set itemIndex(value:int):void
+ {
+ if( _itemIndex == value ) return;
+ _itemIndex = value;
+ dispatchEvent(new Event("itemIndexChanged"));
+ }
+
+ private var _stateColor:Number;
+ [Bindable(type="currentStateChange")]
+ public function get stateColor():Number { return _stateColor; }
+
+
+
+ override public function set data(value:Object):void
+ {
+ super.data = value;
+
+ invalidateProperties();
+ }
+
+ override public function setCurrentState(stateName:String, playTransition:Boolean=true):void
+ {
+ _stateColor = stateName == "normal" ? getStyle( "color" ) : getStyle( stateName + "Color" );
+ super.setCurrentState(stateName, playTransition);
+ }
+
+ override protected function commitProperties():void
+ {
+ if (data && data is StepItem && hasState( StepItem( data ).status ))
+ {
+ setCurrentState( StepItem( data ).status );
+ }
+ else
+ {
+ setCurrentState( "normal" );
+ }
+
+ toolTip = (data && data is StepItem )? StepItem( data ).label : "";
+
+ super.commitProperties();
+ }
+
+ public function get label():String
+ {
+ return "";
+ }
+
+ public function set label(value:String):void
+ {
+ }
+ public function get selected():Boolean
+ {
+ return false;
+ }
+
+ public function set selected(value:Boolean):void
+ {
+ }
+
+ public function get showsCaret():Boolean
+ {
+ return false;
+ }
+
+ public function set showsCaret(value:Boolean):void
+ {
+ }
+
+ public function get dragging():Boolean
+ {
+ return false;
+ }
+
+ public function set dragging(value:Boolean):void
+ {
+ }
+
+ }
+}
\ No newline at end of file
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/layouts/EllipseLayout.as
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/layouts/EllipseLayout.as?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/layouts/EllipseLayout.as (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/layouts/EllipseLayout.as Thu Jul 12 21:33:49 2012
@@ -0,0 +1,275 @@
+/*
+
+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 ws.tink.spark.layouts
+{
+ import flash.geom.Matrix;
+ import flash.geom.Point;
+ import flash.geom.Vector3D;
+
+ import mx.core.ILayoutElement;
+
+ import spark.layouts.supportClasses.LayoutBase;
+
+ public class EllipseLayout extends LayoutBase
+ {
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Constructor
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * Constructor.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function EllipseLayout()
+ {
+ super();
+ }
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Properties
+ //
+ //--------------------------------------------------------------------------
+
+ //----------------------------------
+ // startAngle
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage property for startAngle.
+ */
+ private var _startAngle:Number = 0;
+
+ [Inspectable(category="General")]
+ /**
+ * startAngle
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function get startAngle():Number
+ {
+ return _startAngle;
+ }
+ /**
+ * @private
+ */
+ public function set startAngle( value:Number ):void
+ {
+ if( _startAngle == value ) return;
+
+ _startAngle = value;
+ invalidateDisplayList();
+ }
+
+
+ //----------------------------------
+ // endAngle
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage property for endAngle.
+ */
+ private var _endAngle:Number = 0;
+
+ [Inspectable(category="General")]
+ /**
+ * endAngle
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ public function get endAngle():Number
+ {
+ return _endAngle;
+ }
+ /**
+ * @private
+ */
+ public function set endAngle( value:Number ):void
+ {
+ if( _endAngle == value ) return;
+
+ _endAngle = value;
+ invalidateDisplayList();
+ }
+
+
+ //----------------------------------
+ // position
+ //----------------------------------
+
+ /**
+ * @private
+ * Storage property for position.
+ */
+ private var _position:String = "inset";
+
+ [Inspectable(category="General")]
+ /**
+ * @private
+ * Storage property for position.
+ */
+ public function get position():String
+ {
+ return _position;
+ }
+ /**
+ * @private
+ */
+ public function set position( value:String ):void
+ {
+ if( _position == value ) return;
+
+ _position = value;
+ invalidateDisplayList();
+ }
+
+ public var rotate:Boolean = false;
+
+
+
+ //--------------------------------------------------------------------------
+ //
+ // Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ private function updateDisplayListVirtual( width:Number, height:Number ):void
+ {
+
+
+
+
+ }
+
+ /**
+ * @private
+ */
+ private function distance( x1:Number, y1:Number, x2:Number, y2:Number ):Number
+ {
+ const dx:Number = x2 - x1;
+ const dy:Number = y2 - y1;
+ return Math.sqrt( dx * dx + dy * dy );
+ }
+
+ /**
+ * @private
+ */
+ private function invalidateDisplayList():void
+ {
+ if( !target ) return;
+
+ target.invalidateDisplayList();
+ }
+
+ //--------------------------------------------------------------------------
+ //
+ // Overridden Methods
+ //
+ //--------------------------------------------------------------------------
+
+ /**
+ * @private
+ */
+ override public function updateDisplayList(width:Number, height:Number):void
+ {
+ super.updateDisplayList(width,height);
+
+ if( !target ) return;
+
+ var element:ILayoutElement;
+ const numElements:int = target.numElements;
+ const angle:Number = 360 / numElements;
+ const radiusX:Number = width / 2;
+ const radiusY:Number = height / 2;
+ var a:Number = startAngle;
+ for (var i:int = 0; i < numElements; i++)
+ {
+ a = startAngle + ( angle * i );
+ element = target.getElementAt( i );
+ element.setLayoutBoundsSize( element.getPreferredBoundsWidth(), element.getPreferredBoundsHeight() );
+ if( rotate )
+ {
+ element.transformAround( new Vector3D( element.getPreferredBoundsWidth() / 2, radiusY, 0 ),
+ null,
+ new Vector3D( 0, 0, a ),
+ new Vector3D( radiusX, radiusY, 0 ) );
+ }
+ else
+ {
+ element.setLayoutBoundsPosition( radiusX + ( radiusX * Math.cos(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsWidth() / 2 ),
+ radiusY + ( radiusY * Math.sin(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsHeight() / 2 ) );
+ }
+ // switch( position )
+ // {
+ // case "inset" :
+ // {
+ //
+ // break;
+ // }
+ // default :
+ // {
+ //
+ //
+ // }
+ // }
+
+ // var m:Matrix = new Matrix();
+ // m.tx = radiusX + ( radiusX * Math.cos(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsWidth() / 2 );
+ // m.ty = radiusY + ( radiusY * Math.sin(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsHeight() / 2 );
+ // m.rotate( a * ( Math.PI / 180 ) );
+ // m.tx = m.ty = 200;
+ // m.tx = radiusX + ( radiusX * Math.cos(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsWidth() / 2 );
+ // m.ty = radiusY + ( radiusY * Math.sin(a * ( Math.PI / 180 ) ) ) - ( element.getPreferredBoundsHeight() / 2 );
+ // element.setLayoutMatrix( m, false );
+
+ // var x:Number = radiusX + ( radiusX * Math.cos(a * ( Math.PI / 180 ) ) );
+ // var y:Number = radiusY + ( radiusY * Math.cos(a * ( Math.PI / 180 ) ) );
+ //
+ //
+ // trace( i, distance( radiusX, radiusY, x, y ), x, y, radiusX, radiusY );
+
+
+ }
+ }
+
+
+ }
+}
\ No newline at end of file
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ActivityIndicatorSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ActivityIndicatorSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ActivityIndicatorSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ActivityIndicatorSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,38 @@
+<?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"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:st="library://ns.tink.ws/flex/spark">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("ws.tink.spark.controls.ActivityIndicator")]
+ ]]>
+ </fx:Metadata>
+
+ <!--- @copy ws.tink.spark.controls.ActivityIndicator#indicator -->
+ <st:Rotator id="indicator" height="100" width="100"/>
+
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ButtonSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ButtonSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ButtonSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ButtonSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,141 @@
+<?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"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+ minWidth="21" minHeight="21"
+ alpha.disabled="0.5">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.Button")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number) : void
+ {
+ fillColor.color = getStyle( "chromeColor");
+
+ var cr:Number = getStyle("cornerRadius");
+
+ if (cornerRadius != cr)
+ {
+ cornerRadius = cr;
+ border.radiusX = border.radiusY = cornerRadius;
+ fill.radiusX = fill.radiusY = cornerRadius - 1;
+//
+// lowlight.radiusX = cornerRadius;
+// highlight.radiusX = cornerRadius;
+// border.radiusX = cornerRadius;
+ }
+ if( highlight ) highlight.radiusX = highlight.radiusY = cornerRadius - 1;
+ if( downHighlight ) downHighlight.radiusX = downHighlight.radiusY = cornerRadius - 1;
+// if( downHighlight ) downHighlight.radiusX = downHighlight.radiusY = cornerRadius - 1;
+
+// if (highlightStroke) highlightStroke.radiusX = cornerRadius;
+// if (hldownstroke1) hldownstroke1.radiusX = cornerRadius;
+// if (hldownstroke2) hldownstroke2.radiusX = cornerRadius;
+
+ super.updateDisplayList(unscaledWidth, unscaledHeight);
+ }
+
+ private var cornerRadius:Number = 2;
+
+ ]]>
+ </fx:Script>
+
+ <!-- states -->
+ <s:states>
+ <s:State name="up" />
+ <s:State name="over" />
+ <s:State name="down" />
+ <s:State name="disabled" />
+ </s:states>
+
+ <s:filters>
+ <s:DropShadowFilter blurX="3" blurY="3" strength="1" angle="90" distance="1"
+ color="0x000000" alpha="0.34"/>
+ <s:DropShadowFilter blurX="0" blurY="0" strength="0.5" angle="137" distance="1"
+ color="0x000000" alpha="0.14" inner="true"/>
+ </s:filters>
+
+
+ <!-- border -->
+ <!--- @private -->
+ <s:Rect id="border" left="0" right="0" top="0" bottom="0"
+ radiusX="3" radiusY="3">
+ <s:fill>
+ <s:SolidColor color.over="0xFFFFFF" color.down="0xFFFFFF"
+ color="{getStyle( 'borderColor' )}"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="1" right="1" top="1" bottom="1"
+ radiusX="2" radiusY="2">
+ <s:fill>
+ <s:SolidColor id="fillColor"/>
+ </s:fill>
+ </s:Rect>
+
+ <!-- highlight -->
+ <!--- @private -->
+ <s:Rect id="highlight" left="1" right="1" top="1" bottom="1"
+ radiusX="2" radiusY="2" excludeFrom="down">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xFFFFFF" alpha="0.4" />
+ <s:GradientEntry color="0xFFFFFF" alpha="0" />
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- downs highlight -->
+ <!--- @private -->
+ <s:Rect id="downHighlight" left="1" right="1" top="1" bottom="1"
+ radiusX="2" radiusY="2" includeIn="down">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xFFFFFF" alpha="0" ratio="0.15" />
+ <s:GradientEntry color="0xFFFFFF" alpha="0.4" />
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 8: text -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="center"
+ maxDisplayedLines="1"
+ horizontalCenter="0" verticalCenter="1" verticalAlign="middle"
+ left="10" right="10" top="2" bottom="2">
+ </s:Label>
+
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ColorCheckBoxSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ColorCheckBoxSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ColorCheckBoxSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ColorCheckBoxSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,171 @@
+<?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">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.CheckBox")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+ /**
+ * @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="13" height="13" layoutDirection="ltr">
+ <!-- drop shadow -->
+ <s:Rect left="-1" top="-1" right="-1" bottom="-1">
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0x000000"
+ color.downStates="0xFFFFFF"
+ alpha="0.011"
+ alpha.downStates="0" />
+ <s:GradientEntry color="0x000000"
+ color.downStates="0xFFFFFF"
+ alpha="0.121"
+ alpha.downStates="0.57" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- fill -->
+ <s:Rect left="1" top="1" right="1" bottom="1">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xFFFFFF"
+ color.overStates="0xBBBDBD"
+ color.downStates="0xAAAAAA"
+ alpha="0.85" />
+ <s:GradientEntry color="0xD8D8D8"
+ color.overStates="0x9FA0A1"
+ color.downStates="0x929496"
+ alpha="0.85" />
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- fill highlight -->
+ <s:Rect left="1" right="1" top="1" height="5">
+ <s:fill>
+ <s:SolidColor color="0xFFFFFF" alpha="0.33" alpha.downStates="0" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- layer 6: highlight stroke (all states except down) -->
+ <s:Rect left="1" right="1" top="1" bottom="1" excludeFrom="downStates">
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0xFFFFFF" alpha.overStates="0.33" />
+ <s:GradientEntry color="0xFFFFFF" alpha="0.12" alpha.overStates="0.0396" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- layer 6: highlight stroke (down state only) -->
+ <s:Rect left="1" top="1" bottom="1" width="1" includeIn="downStates">
+ <s:fill>
+ <s:SolidColor color="0x000000" alpha="0.07" />
+ </s:fill>
+ </s:Rect>
+ <s:Rect right="1" top="1" bottom="1" width="1" includeIn="downStates">
+ <s:fill>
+ <s:SolidColor color="0x000000" alpha="0.07" />
+ </s:fill>
+ </s:Rect>
+ <s:Rect left="1" top="1" right="1" height="1" includeIn="downStates">
+ <s:fill>
+ <s:SolidColor color="0x000000" alpha="0.25" />
+ </s:fill>
+ </s:Rect>
+ <s:Rect left="1" top="2" right="1" height="1" includeIn="downStates">
+ <s:fill>
+ <s:SolidColor color="0x000000" alpha="0.09" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- border - put on top of the fill so it doesn't disappear when scale is less than 1 -->
+ <s:Rect left="0" top="0" right="0" bottom="0">
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0x000000"
+ alpha="0.5625"
+ alpha.downStates="0.6375" />
+ <s:GradientEntry color="0x000000"
+ alpha="0.75"
+ alpha.downStates="0.85" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- checkmark -->
+ <!--- Shows green color when selected, red when unselected -->
+ <s:Rect left="2" top="0" id="check"
+ width="100%" height="100%">
+ <s:fill>
+ <s:SolidColor id="checkMarkFill" color="{hostComponent.selected?0x00FF00:0xFF0000}" alpha="0.5" />
+ </s:fill>
+ </s:Rect>
+ </s:Group>
+
+ <!-- Label -->
+ <!--- @copy spark.components.supportClasses.ButtonBase#labelDisplay -->
+ <s:Label id="labelDisplay"
+ textAlign="start"
+ verticalAlign="middle"
+ maxDisplayedLines="1"
+ left="18" right="0" top="3" bottom="3" verticalCenter="2" />
+
+</s:SparkSkin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/InstallApacheFlexSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,130 @@
+<!--
+
+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.
+
+-->
+<!--- A skin class for the Spark WindowedApplication and Window containers.
+ This class defines just a border and status bar, but no gripper button,
+ title bar, or title bar buttons.
+
+ <p>You can either use system chrome, the FlexChromSkin class, or
+ the WindowedApplicationSkin class to define the appearance of
+ the WindowedApplication and Window containers.
+ To use the WindowedApplicationSkin class with the WindowedApplication container,
+ set <code>systemChrome</code> to "none"
+ in the application's .xml file, and set the <code>skinClass</code> style to
+ spark.skins.spark.WindowedApplicationSkin.
+ To use the WindowedApplicationSkin class with the Window container,
+ set the <code>Window.systemChrome</code> property to "none",
+ and set the <code>skinClass</code> style to
+ spark.skins.spark.WindowedApplicationSkin.</p>
+
+ @see spark.components.WindowedApplication
+
+ @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.disabledGroup="0.5" >
+ <fx:Metadata>[HostComponent("spark.components.WindowedApplication")]</fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ /* Define the skin elements that should not be colorized.
+ * For WindowedApplication, border and status bar background are colorized,
+ * but the content area and status text are not.
+ * Exclude the titleBar and scroller because they are SparkSkins and we
+ * don't want to colorize them twice.
+ *
+ * @langversion 3.0
+ * @playerversion Flash 10
+ * @playerversion AIR 1.5
+ * @productversion Flex 4
+ */
+ static private const exclusions:Array = ["backgroundRect", "contentGroup", "statusText"];
+
+ /**
+ * @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" stateGroups="disabledGroup" />
+ <s:State name="normalAndInactive" stateGroups="inactiveGroup" />
+ <s:State name="disabledAndInactive" stateGroups="disabledGroup, inactiveGroup" />
+ </s:states>
+
+ <!-- layer 1: background fill -->
+ <s:BitmapImage source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" scaleMode="stretch" />
+ <!--<s:Image source="@Embed('/assets/icons/bg_logo.png')" width="100%" height="100%" useHandCursor="true" buttonMode="true" sca />-->
+
+ <!-- layer 2: content + status bar -->
+ <s:Group left="0" right="0" top="0" bottom="0" minHeight="24" minWidth="0" >
+ <s:layout>
+ <s:VerticalLayout gap="0"/>
+ </s:layout>
+
+ <!-- content -->
+ <!--- @copy spark.components.SkinnableContainer#contentGroup -->
+ <s:Group id="contentGroup" width="100%" height="100%" minHeight="0" minWidth="0"/>
+
+ <!-- status bar -->
+ <!--- @copy spark.components.WindowedApplication#statusBar -->
+ <s:Group id="statusBar" width="100%" minHeight="24" >
+
+ <!-- status bar fill -->
+ <s:Rect left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xE2E2E2" />
+ <s:GradientEntry color="0xD9D9D9" />
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- status bar highlight -->
+ <s:Rect left="1" right="1" top="1" bottom="0" >
+ <s:stroke>
+ <s:LinearGradientStroke rotation="90" weight="1">
+ <s:GradientEntry color="0xEAEAEA" />
+ <s:GradientEntry color="0xBEBEBE" />
+ </s:LinearGradientStroke>
+ </s:stroke>
+ </s:Rect>
+
+ <!-- status text -->
+ <!--- @copy spark.components.WindowedApplication#statusText -->
+ <s:Label id="statusText" top="2" bottom="2" left="10" right="10" verticalAlign="middle"
+ fontSize="10" color="0x585858" width="100%" maxDisplayedLines="1" />
+
+ </s:Group>
+ </s:Group>
+
+</s:SparkSkin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ProgressBarSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ProgressBarSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ProgressBarSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/ProgressBarSkin.mxml Thu Jul 12 21:33:49 2012
@@ -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.
+
+-->
+<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" xmlns:local="*" xmlns:controls="ws.tink.spark.controls.*">
+ <!-- host component -->
+ <fx:Metadata>
+ [HostComponent("ws.tink.spark.controls.ProgressBar")]
+ </fx:Metadata>
+
+ <fx:Script>
+ <![CDATA[
+
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ barColor.color = getStyle( "chromeColor" );
+
+ border.radiusX = border.radiusY = unscaledHeight / 2;
+ fill.radiusX = fill.radiusY = ( unscaledHeight - 2 ) / 2;
+ barFill.radiusX = barFill.radiusY = ( unscaledHeight - 4 ) / 2;
+ barHighlight.radiusX = barHighlight.radiusY = ( unscaledHeight - 4 ) / 2;
+
+ bar.minWidth = unscaledHeight-4;
+
+ super.updateDisplayList( unscaledWidth, unscaledHeight );
+ }
+ ]]>
+ </fx:Script>
+
+ <!-- SkinParts
+ name=percentLayout, type=PercentLayout, required=true
+ -->
+
+ <s:layout>
+ <controls:PercentLayout id="percentLayout" resizeItems="{[bar]}"/>
+ </s:layout>
+
+
+
+ <s:Group width="100%" height="100%">
+
+ <s:filters>
+ <s:DropShadowFilter blurX="4" blurY="4" inner="true" distance="1" angle="124" color="0x7b7b7b" alpha="0.4"/>
+ </s:filters>
+
+ <!-- border -->
+ <!--- @private -->
+ <s:Rect id="border" left="0" right="0" top="0" bottom="0">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xBFBFBF"/>
+ <s:GradientEntry color="0xFFFFFF"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- @private -->
+ <s:Rect id="fill" left="1" right="1" top="1" bottom="1">
+ <s:fill>
+ <s:SolidColor color="0xFFFFFF"/>
+ </s:fill>
+ </s:Rect>
+
+ </s:Group>
+
+ <s:Group id="bar" left="2" right="2" top="2" bottom="2">
+
+ <s:filters>
+ <s:DropShadowFilter blurX="0" blurY="0" inner="true" distance="1" angle="90" color="0xffffff" alpha="0.2"/>
+ </s:filters>
+
+ <s:Rect id="barFill" width="100%" height="100%">
+ <s:fill>
+ <s:SolidColor id="barColor"/>
+ </s:fill>
+ </s:Rect>
+
+ <s:Rect id="barHighlight" width="100%" height="100%">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry alpha="0.5" color="0xFFFFFF"/>
+ <s:GradientEntry alpha="0" color="0xFFFFFF"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ </s:Group>
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/RotatorSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/RotatorSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/RotatorSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/RotatorSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,46 @@
+<?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"
+ xmlns:mx="library://ns.adobe.com/flex/mx">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("ws.tink.spark.controls.Rotator")]
+ ]]>
+ </fx:Metadata>
+
+ <s:Ellipse width="100%" height="100%">
+ <s:fill>
+ <s:SolidColor color="0xff0000"/>
+ </s:fill>
+ </s:Ellipse>
+
+ <s:Line horizontalCenter="0" height="100%">
+ <s:stroke>
+ <s:SolidColorStroke caps="none" color="0x000000" weight="3"/>
+ </s:stroke>
+ </s:Line>
+
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepActivityIndicatorSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepActivityIndicatorSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepActivityIndicatorSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepActivityIndicatorSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,38 @@
+<?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"
+ xmlns:mx="library://ns.adobe.com/flex/mx"
+ xmlns:controls="ws.tink.spark.controls.*">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("ws.tink.spark.controls.ActivityIndicator")]
+ ]]>
+ </fx:Metadata>
+
+ <!--- @copy ws.tink.spark.controls.ActivityIndicator#indicator -->
+ <controls:Rotator id="indicator" height="100%" width="100%" delta="35"/>
+
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepRotatorSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepRotatorSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepRotatorSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/StepRotatorSkin.mxml Thu Jul 12 21:33:49 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.
+
+-->
+<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"
+ xmlns:layouts="ws.tink.spark.layouts.*">
+
+ <!-- host component -->
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("ws.tink.spark.controls.Rotator")]
+ ]]>
+ </fx:Metadata>
+
+ <s:DataGroup width="100%" height="100%">
+ <s:layout>
+ <layouts:EllipseLayout />
+ </s:layout>
+ <s:dataProvider>
+ <s:ArrayList>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ <fx:Object/>
+ </s:ArrayList>
+ </s:dataProvider>
+ <s:itemRenderer>
+ <fx:Component>
+ <s:ItemRenderer width="3" height="3">
+ <s:Ellipse width="100%" height="100%">
+ <s:fill>
+ <s:SolidColor alpha="{((1/7)*itemIndex)}"/>
+ </s:fill>
+ </s:Ellipse>
+ </s:ItemRenderer>
+ </fx:Component>
+ </s:itemRenderer>
+ </s:DataGroup>
+
+</s:Skin>
Added: incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/TextInputSkin.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/TextInputSkin.mxml?rev=1360962&view=auto
==============================================================================
--- incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/TextInputSkin.mxml (added)
+++ incubator/flex/utilities/InstallApacheFlex/src/ws/tink/spark/skins/controls/TextInputSkin.mxml Thu Jul 12 21:33:49 2012
@@ -0,0 +1,224 @@
+<?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"
+ xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
+ alpha.disabledStates="0.5" blendMode="normal">
+
+ <fx:Metadata>
+ <![CDATA[
+ /**
+ * @copy spark.skins.spark.ApplicationSkin#hostComponent
+ */
+ [HostComponent("spark.components.TextInput")]
+ ]]>
+ </fx:Metadata>
+
+ <fx:Script fb:purpose="styling">
+ <![CDATA[
+ import mx.core.FlexVersion;
+
+ private var paddingChanged:Boolean;
+
+
+ /**
+ * @private
+ */
+ override protected function commitProperties():void
+ {
+ super.commitProperties();
+
+ if (paddingChanged)
+ {
+ updatePadding();
+ paddingChanged = false;
+ }
+ }
+
+
+ /**
+ * @private
+ */
+ override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+ {
+ if (getStyle("borderVisible") == true)
+ {
+ border.visible = true;
+ borderGradient.visible = true;
+ background.left = background.top = background.right = background.bottom = 1;
+ textDisplay.left = textDisplay.top = textDisplay.right = textDisplay.bottom = 1;
+ if (promptDisplay)
+ {
+ promptDisplay.setLayoutBoundsSize(unscaledWidth - 2, unscaledHeight - 2);
+ promptDisplay.setLayoutBoundsPosition(1, 1);
+ }
+ }
+ else
+ {
+ border.visible = false;
+ borderGradient.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();
+ }
+ }
+ ]]>
+ </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="2" radiusY="2">
+ <s:stroke>
+ <!--- @private -->
+ <s:SolidColorStroke id="borderStroke" weight="1" />
+ </s:stroke>
+ </s:Rect>
+
+ <!-- border gradient -->
+ <!--- @private -->
+ <s:Rect left="0" right="0" top="0" bottom="0" id="borderGradient"
+ radiusX="2" radiusY="2">
+ <s:fill>
+ <s:LinearGradient rotation="90">
+ <s:GradientEntry color="0xffffff" alpha="0"/>
+ <s:GradientEntry color="0xffffff" alpha="1"/>
+ </s:LinearGradient>
+ </s:fill>
+ </s:Rect>
+
+ <!-- fill -->
+ <!--- Defines the appearance of the TextInput component's background. -->
+ <s:Rect id="background" left="1" right="1" top="1" bottom="1"
+ radiusX="1" radiusY="1">
+ <s:fill>
+ <!--- @private Defines the background fill color. -->
+ <s:SolidColor id="bgFill" color="0xFFFFFF" />
+ </s:fill>
+ </s:Rect>
+
+ <!-- text -->
+ <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
+ <s:RichEditableText id="textDisplay"
+ verticalAlign="middle"
+ widthInChars="10"
+ left="1" right="1" top="1" bottom="1" />
+ <!--- 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"
+ fontFamily="openSansSemibold"
+ />
+
+</s:Skin>
|