<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2010 Chet Haase
    
    Licensed 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:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    width="200" height="250" viewSourceURL="srcview/index.html">
    
    <s:VGroup x="10">
        <s:Group>
            <s:Label text="Weight:" baseline="15"/>
            <s:TextInput x="80" width="30" id="weightInput" text="0" baseline="15"/>
        </s:Group>
        <s:Group>
            <s:Label text="Miter Limit:" baseline="15"/>
            <s:TextInput id="miterLimitInput" text="3" 
                         x="80" width="30" baseline="15"/>
        </s:Group>
        <s:Group>
            <s:Label text="Joints:" baseline="15"/>
            <s:DropDownList id="jointsInput" selectedItem="miter"
                            x="80" baseline="15" width="100">
                <s:dataProvider>
                    <s:ArrayCollection>
                        <fx:String>miter</fx:String>
                        <fx:String>round</fx:String>
                        <fx:String>bevel</fx:String>
                    </s:ArrayCollection>
                </s:dataProvider>
            </s:DropDownList>
        </s:Group>
        <s:Group>
            <s:Label text="Scale Mode:" baseline="15"/>
            <s:DropDownList id="scaleModeInput" selectedItem="normal"
                            x="80" baseline="15" width="100">
                <s:dataProvider>
                    <s:ArrayCollection>
                        <fx:String>normal</fx:String>
                        <fx:String>none</fx:String>
                        <fx:String>vertical</fx:String>
                        <fx:String>horizontal</fx:String>
                    </s:ArrayCollection>
                </s:dataProvider>
            </s:DropDownList>
        </s:Group>
        <s:Group>
            <s:Label text="ScaleX:" baseline="15"/>
            <s:TextInput id="scaleXInput" text="1" width="30" 
                         x="80" baseline="15"/>
        </s:Group>
        <s:Group>
            <s:Label text="ScaleY:" baseline="15"/>
            <s:TextInput id="scaleYInput" text="1" width="30"
                         x="80" baseline="15"/>
        </s:Group>
    </s:VGroup>
    <s:Rect x="20" y="170" width="30" height="30"
            scaleX="{Number(scaleXInput.text)}" 
            scaleY="{Number(scaleYInput.text)}">
        <s:stroke>
            <s:SolidColorStroke color="black"
                    weight="{Number(weightInput.text)}"
                    miterLimit="{Number(miterLimitInput.text)}"
                    joints="{jointsInput.selectedItem}"
                    scaleMode="{scaleModeInput.selectedItem}"/>
        </s:stroke>
    </s:Rect>
</s:Application>