Line | |
---|
1 | /* ChangeBedSequenceCommand.as */
|
---|
2 |
|
---|
3 | package 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.