Changeset 2113 for ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
- Timestamp:
- 08/17/12 11:49:20 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/branches/ComponentRegistry-1.12.0/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/ComponentEdit.as
r2112 r2113 29 29 30 30 [Event(name="removeComponent", type="flash.events.Event")] 31 public class ComponentEdit extends Form{31 public class ComponentEdit extends ItemEdit { 32 32 public static const REMOVE_COMPONENT_EVENT:String = "removeComponent"; 33 33 private static const DRAG_ITEMS:String = "items"; … … 38 38 private var addComponentLabel:Label 39 39 private var addElementLabel:Label 40 41 private var showToggleBox:ShowToggleBox;42 private var hideableForm:Form;43 40 44 41 public function ComponentEdit(component:CMDComponent, parent:UIComponent, parentComponent:CMDComponent) { … … 100 97 createComponentEditBar(); 101 98 102 hideableForm = createHidableForm(); 103 showToggleBox.visibleContainer = hideableForm; 104 105 addChild(hideableForm); 99 addChild(getHideableForm()); 106 100 107 101 var summary:ComponentSummary = new ComponentSummary(); 108 102 summary.component = _component; 109 103 summary.visible = false; 110 showToggleBox.invisibleContainer = summary;111 104 105 setSummaryContainer(summary); 112 106 addChild(summary); 113 107 … … 115 109 if (componentLink != null) { 116 110 addCardinalityInput(); 117 hideableForm.addChild(componentLink);111 addToHideableForm(componentLink); 118 112 } else { 119 113 addNameInput(); … … 162 156 163 157 private function addConceptLink():void { 164 hideableForm.addChild(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _component.conceptLink, function(val:String):void {158 addToHideableForm(new ConceptLinkInput(LabelConstants.CONCEPTLINK, _component.conceptLink, function(val:String):void { 165 159 _component.conceptLink = val; 166 160 })); … … 177 171 _component.name = val; 178 172 }, new ChildNameValidator(_parentComponent, component)); 179 hideableForm.addChild(nameInput);173 addToHideableForm(nameInput); 180 174 } 181 175 182 176 private function addCardinalityInput():void { 183 hideableForm.addChild(new CardinalityInput(LabelConstants.CARDINALITY_MIN, _component.cardinalityMin, CardinalityInput.BOUNDED, function(val:String):void {177 addToHideableForm(new CardinalityInput(LabelConstants.CARDINALITY_MIN, _component.cardinalityMin, CardinalityInput.BOUNDED, function(val:String):void { 184 178 _component.cardinalityMin = val; 185 179 })); 186 hideableForm.addChild(new CardinalityInput(LabelConstants.CARDINALITY_MAX, _component.cardinalityMax, CardinalityInput.UNBOUNDED,function(val:String):void {180 addToHideableForm(new CardinalityInput(LabelConstants.CARDINALITY_MAX, _component.cardinalityMax, CardinalityInput.UNBOUNDED,function(val:String):void { 187 181 _component.cardinalityMax = val; 188 182 })); … … 202 196 var editBar:HBox = new HBox(); 203 197 204 showToggleBox = new ShowToggleBox(); 205 showToggleBox.visibleState = true; 206 editBar.addChild(showToggleBox); 198 editBar.addChild(getShowToggleBox()); 207 199 208 200 editBar.addChild(createHeading()); … … 265 257 266 258 private function handleCMDAttributeList():void { 267 hideableForm.addChild(new AttributeListEdit(_component, this));259 addToHideableForm(new AttributeListEdit(_component, this)); 268 260 } 269 261
Note: See TracChangeset
for help on using the changeset viewer.