comparison m-toolbox/m/gui/@jcontrol/setappdata.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 setappdata(obj, name, data)
2 % SETAPPDATA function overloaded for JCONTROL class
3 %
4 % SETAPPDATA places data in the application data area of the hgcontrol
5 % component of a JCONTROL
6 %
7 % Example:
8 % setappdata(obj, fieldname, data)
9 %
10 % See also: JCONTROL, JCONTROL/GETAPPDATA, JCONTROL/ISAPPDATA
11 % JCONTROL/RMAPPDATA SETAPPDATA
12 %
13 % -------------------------------------------------------------------------
14 % Author: Malcolm Lidierth 07/07
15 % Copyright © The Author & King's College London 2007
16 % -------------------------------------------------------------------------
17
18 % Revisions:
19 % 17.08.07 Check class of obj. This method gets called when data is a
20 % jcontrol objectrather than obj
21
22 if strcmpi(class(obj),'jcontrol')
23 setappdata(obj.hgcontrol, name, data);
24 else
25 % Get here because data is a jcontrol object
26 builtin('setappdata', obj, name, data)
27 end
28 return
29 end