<?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 TextArea component. 
        Skin classes in the wireframe package are useful for using as a simple base for a custom skin.
        
     @see spark.components.TextArea

      @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.TextArea")]
    </fx:Metadata> 
    
    <fx:Script>
        <![CDATA[
            /**
             *  @private
             */
            override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
            {
                if (promptDisplay)
                {
                    promptDisplay.setLayoutBoundsSize(unscaledWidth - 1, unscaledHeight - 1);
                    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>
    
    <!-- border/fill --> 
    <s:Rect left="0" right="0" top="0" bottom="0">
        <s:stroke>
            <s:SolidColorStroke color="#5C5C5C" weight="1"/>            
        </s:stroke>
        <s:fill>
            <s:SolidColor color="#FFFFFF"/>
        </s:fill>
    </s:Rect>

    <!-- shadow -->
    <s:Rect left="1" top="1" right="1" height="1">
        <s:fill>
            <s:SolidColor color="#000000" alpha="0.12" />
        </s:fill>
    </s:Rect>

    <!--- Defines the scroller used to scroll the TextArea. -->
    <s:Scroller id="scroller" left="0" top="0" right="0" bottom="0" minViewportInset="1" measuredSizeIncludesScrollBars="false">
        <!--- @copy spark.components.supportClasses.SkinnableTextBase#textDisplay -->
        <s:RichEditableText id="textDisplay" 
                  heightInLines="10"
                  widthInChars="15"
                  paddingLeft="3" paddingTop="5"
                  paddingRight="3" paddingBottom="3"/>
    </s:Scroller>
    <!--- 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"
             mouseEnabled="false" mouseChildren="false"
             includeIn="normalWithPrompt,disabledWithPrompt" 
             includeInLayout="false"
             paddingLeft="3" paddingTop="5"
             paddingRight="3" paddingBottom="3"
             />                

</s:Skin>
