Line | |
---|
1 | package clarin.cmdi.componentregistry.editor { |
---|
2 | import clarin.cmdi.componentregistry.common.StyleConstants; |
---|
3 | |
---|
4 | import mx.binding.utils.BindingUtils; |
---|
5 | import mx.containers.FormItem; |
---|
6 | import mx.controls.TextInput; |
---|
7 | |
---|
8 | public class FormItemInputLine extends FormItem { |
---|
9 | private var editField:TextInput = new TextInput(); |
---|
10 | |
---|
11 | public function FormItemInputLine(name:String, value:String, bindingFunction:Function, editable:Boolean=true) { |
---|
12 | super(); |
---|
13 | label = name; |
---|
14 | styleName = StyleConstants.XMLBROWSER_FIELD; |
---|
15 | editField.styleName = StyleConstants.XMLEDITOR_EDIT_FIELD; |
---|
16 | editField.width = 300; |
---|
17 | editField.text = value; |
---|
18 | editField.editable=editable; |
---|
19 | BindingUtils.bindSetter(bindingFunction, editField, "text"); |
---|
20 | } |
---|
21 | |
---|
22 | protected override function createChildren():void { |
---|
23 | super.createChildren(); |
---|
24 | addChild(editField); |
---|
25 | } |
---|
26 | |
---|
27 | } |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.