comparison m-toolbox/m/gui/gltpda/g_KeepResultCallback.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 function g_KeepResultCallback(hObject,varargin)
2 % Whenever the user clicks on the checkbox to maintain local results.
3
4 global selBlocks
5
6 switch get(hObject,'Value')
7 case 0
8 % Cycle to restore proper color
9 [meth,clas] = strtok(get_param(gcbh,'Tag'),' ');
10 infoObj = eval([clas,'.getInfo(''',getappdata(0,'ltpda_currFunctionName'),''')']);
11 switch infoObj.mcategory
12 case 'Constructor'
13 for kk=1:length(selBlocks)
14 try %#ok<ALIGN>
15 set_param(selBlocks(kk),'Backgroundcolor','green')
16 set_param(selBlocks(kk),'MaskHelp','')
17 catch, end
18 end
19 case 'Output'
20 for kk=1:length(selBlocks)
21 try %#ok<ALIGN>
22 set_param(selBlocks(kk),'Backgroundcolor','lightBlue')
23 set_param(selBlocks(kk),'MaskHelp','')
24 catch, end
25 end
26 otherwise
27 for kk=1:length(selBlocks)
28 try %#ok<ALIGN>
29 set_param(selBlocks(kk),'Backgroundcolor','red')
30 set_param(selBlocks(kk),'MaskHelp','')
31 catch, end
32 end
33 end
34 case 1
35 for kk=1:length(selBlocks)
36 try %#ok<ALIGN>
37 set_param(selBlocks(kk),'Backgroundcolor','magenta');
38 set_param(selBlocks(kk),'MaskHelp','probe');
39 catch, end
40 end
41 end
42 end