0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % LTPDV_OBJECTLIST_SELECT activates when the user selects cells in the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 % workspace object list on the import panel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % M Hewitson 22-04-08
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 % $Id: ltpdv_objectList_select.m,v 1.3 2008/09/02 07:51:47 hewitson Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 function ltpdv_objectList_select(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % Handles
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 myh = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 mainfig = varargin{end};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 % Structure of selection details
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 sel = varargin{2};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % Get selected rows
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 rows = unique(sel.Indices(:,1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 setappdata(mainfig, 'ObjectListSelectedRows', rows);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 % Set tooltip
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 objs = getappdata(mainfig, 'LTPDAobjects');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 if numel(rows) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 w = display(objs{rows});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 str = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 for j=1:numel(w)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 str = [str sprintf('\n%s', w{j})];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 set(myh, 'TooltipString', sprintf('%s', str));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 % get object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 obj = objs{rows};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 ltpdv_properties_build_props(obj, mainfig)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 % END |