Changeset 1899
- Timestamp:
- 04/20/12 14:25:37 (12 years ago)
- Location:
- ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/AttributeListEdit.as
r1774 r1899 4 4 import clarin.cmdi.componentregistry.common.components.AddAttributeLabelButton; 5 5 import clarin.cmdi.componentregistry.common.components.RemoveLabelButton; 6 import clarin.cmdi.componentregistry.editor.model.AttributeContainer; 6 7 import clarin.cmdi.componentregistry.editor.model.CMDAttribute; 7 8 import clarin.cmdi.componentregistry.editor.model.ValueSchemeInterface; … … 26 27 private var _attributes:ArrayCollection; 27 28 private var _parent:UIComponent; 29 private var _parentContainer:AttributeContainer; 28 30 private var noAttributesLabel:Label = new Label(); 29 31 [Bindable] … … 31 33 private var addAttributeLabelButton:AddAttributeLabelButton; 32 34 33 public function AttributeListEdit( attributes:ArrayCollection, parent:UIComponent) {35 public function AttributeListEdit(parentContainer:AttributeContainer, parent:UIComponent) { 34 36 super(); 35 _attributes = attributes; 37 _parentContainer = parentContainer; 38 _attributes = parentContainer.getAttributeList(); 39 _parent = parent; 36 40 hasNoAttributes = _attributes.length == 0; 37 _parent = parent;38 41 styleName = StyleConstants.XMLBROWSER; 39 42 noAttributesLabel.text = "No Attributes"; … … 128 131 var name:NameInputLine = new NameInputLine(attribute.name, function(val:String):void { 129 132 attribute.name = val; 130 }, InputValidators.getNameValidator());133 }, new AttributeNameValidator(_parentContainer, attribute)); 131 134 name.direction = FormItemDirection.HORIZONTAL 132 135 var removeButton:Label = new RemoveLabelButton(); -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/CMDComponentXMLEditor.as
r1839 r1899 243 243 addChild(link); 244 244 245 addChild(new AttributeListEdit(_firstComponent .attributeList, this))245 addChild(new AttributeListEdit(_firstComponent, this)) 246 246 } 247 247 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
r1773 r1899 236 236 237 237 private function handleCMDAttributeList():void { 238 addChild(new AttributeListEdit(_component .attributeList, this));238 addChild(new AttributeListEdit(_component, this)); 239 239 } 240 240 -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ElementEdit.as
r1773 r1899 136 136 137 137 private function handleCMDAttributeList():void { 138 var attributeEdit:Container = new AttributeListEdit(_element .attributeList, this);138 var attributeEdit:Container = new AttributeListEdit(_element, this); 139 139 addChild(attributeEdit); 140 140 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponent.as
r873 r1899 1 1 package clarin.cmdi.componentregistry.editor.model { 2 2 import clarin.cmdi.componentregistry.common.XmlAble; 3 3 4 4 import mx.collections.ArrayCollection; 5 5 6 public class CMDComponent implements XmlAble {6 public class CMDComponent implements XmlAble, AttributeContainer { 7 7 8 8 //Attributes … … 111 111 return result; 112 112 } 113 113 114 public function getAttributeList():ArrayCollection { 115 return attributeList; 116 } 114 117 } 115 118 } -
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponentElement.as
r873 r1899 8 8 9 9 [Bindable] 10 public class CMDComponentElement implements XmlAble, ValueSchemeInterface {10 public class CMDComponentElement implements XmlAble, ValueSchemeInterface, AttributeContainer { 11 11 12 12 //Attributes … … 97 97 } 98 98 99 public function getAttributeList():ArrayCollection { 100 return attributeList; 101 } 99 102 100 103 }
Note: See TracChangeset
for help on using the changeset viewer.