source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/command/config/ChangeBedSequenceCommand.as

Last change on this file was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 766 bytes
Line 
1/* ChangeBedSequenceCommand.as */
2
3package gov.va.med.edp.command.config
4{
5 import com.adobe.cairngorm.commands.ICommand;
6 import com.adobe.cairngorm.control.CairngormEvent;
7
8 import gov.va.med.edp.control.config.ChangeBedSequenceEvent;
9 import gov.va.med.edp.model.TrackingModelLocator;
10
11 public class ChangeBedSequenceCommand implements ICommand
12 {
13 private var model:TrackingModelLocator = TrackingModelLocator.getInstance();
14
15 public function execute(event:CairngormEvent):void
16 {
17 var changeEvent: ChangeBedSequenceEvent = ChangeBedSequenceEvent(event);
18 var bed: Object = model.config.beds.removeItemAt(changeEvent.oldIndex);
19 model.config.beds.addItemAt(bed, changeEvent.newIndex);
20 model.config.bedMods = true;
21 }
22 }
23}
Note: See TracBrowser for help on using the repository browser.