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

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

initial load of EDIS 1.0

File size: 2.0 KB
Line 
1/* ConfigChangeColumnCommand.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.ConfigChangeColumnEvent;
9 import gov.va.med.edp.control.config.ConfigChangeDisplayBoardPropertiesEvent;
10 import gov.va.med.edp.model.TrackingModelLocator;
11 import gov.va.med.edp.util.BoardTools;
12 import gov.va.med.edp.vo.ColumnSpecVO;
13
14 public class ConfigChangeDisplayBoardPropertiesCommand implements ICommand
15 {
16 private var model:TrackingModelLocator = TrackingModelLocator.getInstance();
17
18 public function execute(event:CairngormEvent):void
19 {
20 var changeEvent: ConfigChangeDisplayBoardPropertiesEvent = ConfigChangeDisplayBoardPropertiesEvent(event);
21 if (changeEvent.type == ConfigChangeDisplayBoardPropertiesEvent.EVENT_CONFIG_CHANGE_DISPLAY_WIDTH) {
22 model.config.displayBoardProperties.displaySize = changeEvent.displaySize;
23 }
24 if (changeEvent.type == ConfigChangeDisplayBoardPropertiesEvent.EVENT_CONFIG_CHANGE_FONT_SIZE) {
25 model.config.displayBoardProperties.fontSize = changeEvent.fontSize;
26 }
27 if (changeEvent.type == ConfigChangeDisplayBoardPropertiesEvent.EVENT_CONFIG_CHANGE_SCROLL_DELAY) {
28 model.config.displayBoardProperties.scrollDelay = changeEvent.scrollDelay;
29 }
30 if (changeEvent.type == ConfigChangeDisplayBoardPropertiesEvent.EVENT_CONFIG_CHANGE_SQUISH) {
31 model.config.displayBoardProperties.squish = changeEvent.squish;
32 }
33 //Make sure this if block is the last in the code for the presence of a return statement
34 // added ChangeFontSizeCommand -- do we still need this section?
35 if (changeEvent.type == ConfigChangeDisplayBoardPropertiesEvent.EVENT_CONFIG_CHANGE_SQUISH_FONT_SIZE) {
36 model.config.displayBoardProperties.squishFontSize = changeEvent.squishFontSize;
37 return;
38 }
39 model.config.boardMods = true;
40 trace("change properties");
41 }
42 }
43}
Note: See TracBrowser for help on using the repository browser.