<?xml version="1.0" encoding="utf-8"?>

<!--

    ADOBE SYSTEMS INCORPORATED
    Copyright 2008 Adobe Systems Incorporated
    All Rights Reserved.

    NOTICE: Adobe permits you to use, modify, and distribute this file
    in accordance with the terms of the license agreement accompanying it.

-->

<!--- The default wireframe skin class for the Spark TextInput component. 
        Skin classes in the wireframe package are useful for using as a simple base for a custom skin.
        
     @see spark.components.TextInput

      @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"
      alpha.disabledStates="0.5">

    <fx:Metadata>
        /** 
         * @copy spark.skins.spark.ApplicationSkin#hostComponent
         */
        [HostComponent("spark.components.TextInput")]
    </fx:Metadata> 

    <fx:Script>
        <![CDATA[
            /**
             *  @private
             */
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
            {
                if (promptDisplay)
                {
                    promptDisplay.setLayoutBoundsSize(unscaledWidth - 2, unscaledHeight - 2);
                    promptDisplay.setLayoutBoundsPosition(1, 1);
                }
                
                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>
        
    <s:Rect left="0" right="0" top="0" bottom="0">
        <s:stroke>            
            <s:SolidColorStroke color="#5C5C5C" />
        </s:stroke>
        <s:fill>
            <s:SolidColor color="#FFFFFF"/>
        </s:fill>
    </s:Rect>
    
    <!-- inner shadow -->
    <s:Group left="1" right="1" top="1">       
        <s:Rect left="0" right="0" top="0" height="1">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.15" />
            </s:fill>
        </s:Rect>
        <s:Rect left="0" right="0" top="1" height="1">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.06" />
            </s:fill>
        </s:Rect>
    </s:Group>
    <s:Group left="1" top="1" bottom="1">
        <s:Rect left="0" top="0" bottom="0" width="1">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.15" />
            </s:fill>
        </s:Rect>
        <s:Rect left="1" top="0" bottom="0" width="1">
            <s:fill>
                <s:SolidColor color="0x000000" alpha="0.06" />
            </s:fill>
        </s:Rect>
    </s:Group>

    <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
    <s:RichEditableText id="textDisplay"
              lineBreak="explicit"
              verticalAlign="middle"
              widthInChars="10"
              left="1" right="1" top="1" bottom="1"
              paddingLeft="3" paddingTop="5"
              paddingRight="3" paddingBottom="3"/>
    <!--- 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"
             paddingLeft="3" paddingTop="5"
             paddingRight="3" paddingBottom="3"
             />

</s:Skin>
