Start moving editors over to use a spark Form and FormLayout
[potlatch2.git] / net / systemeD / potlatch2 / mapfeatures / editors / FreeTextEditor.mxml
1 <?xml version="1.0" encoding="utf-8"?>
2 <edit:SingleTagEditor
3         xmlns:fx="http://ns.adobe.com/mxml/2009"
4         xmlns:mx="library://ns.adobe.com/flex/mx"
5     xmlns:s="library://ns.adobe.com/flex/spark"
6         xmlns:edit="net.systemeD.potlatch2.mapfeatures.editors.*"
7         xmlns:flexlib="flexlib.controls.*"
8         xmlns:controls="net.systemeD.controls.*"
9         width="100%"
10         toolTip="{fieldDescription}"
11     direction="{fieldDirection}" styleName="titledEditor">
12
13     <s:FormItem label="{fieldName}">
14       <controls:PromptingTextInputWarning id="inputBox" prompt="{prompt}" text="{value}" width="100%"
15         focusOut="value = inputBox.text" enter="value = inputBox.text"
16         restrict="&#x0020;-&#x10FFFF;" />
17     </s:FormItem>
18   <fx:Script><![CDATA[
19   
20       [Bindable(event="factory_set")]
21       protected function get prompt():String {
22           return _factory == null ? null : FreeTextEditorFactory(_factory).notPresentText;
23       }
24       
25   ]]></fx:Script>
26 </edit:SingleTagEditor>
27