comparison m-toolbox/classes/@repogui2/buildRetrievePanel.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 % BUILDRETRIEVEPANEL build the retrieve panel
2 %
3 % M Hewitson 22-09-08
4 %
5 % $Id: buildRetrievePanel.m,v 1.4 2011/04/08 08:56:36 hewitson Exp $
6 %
7 function buildRetrievePanel(mainfig)
8
9 import utils.const.*
10 utils.helper.msg(msg.PROC1, 'building Retrieve Panel');
11 htab = mainfig.panels(4);
12
13 Gproperties = mainfig.Gproperties;
14 pmarg = 0.025;
15 CommonHeight = 0.06;
16 fontsize = Gproperties.fontsize;
17
18 % Retrieve list
19 bl = pmarg;
20 bh = CommonHeight;
21 bb = 1 - pmarg - bh;
22 bw = 0.2;
23 Osth = uicontrol(htab,'Style','text',...
24 'String','Retrieve object IDs',...
25 'Units', 'normalized', ...
26 'Fontsize', fontsize,...
27 'BackgroundColor', Gproperties.Gcol{4},...
28 'HorizontalAlignment', 'left',...
29 'Position',[bl bb bw bh]);
30
31 %-- ID entry
32 bh = 0.5;
33 bb = bb - bh - pmarg;
34 sth = uicontrol(htab,'Style','edit',...
35 'String','',...
36 'Units', 'normalized', ...
37 'Fontsize', fontsize,...
38 'BackgroundColor', 'w',...
39 'Max', 100,...
40 'HorizontalAlignment', 'left',...
41 'Position',[bl bb bw bh],...
42 'Tag', 'retrieveIDsTxt');
43
44 %-- Prefix entry
45 bh = CommonHeight;
46 bb = bb - bh - pmarg;
47 bw = 0.1;
48 sth = uicontrol(htab,'Style','text',...
49 'String','Prefix',...
50 'Units', 'normalized', ...
51 'Fontsize', fontsize,...
52 'BackgroundColor', Gproperties.Gcol{4},...
53 'HorizontalAlignment', 'left',...
54 'Position',[bl bb bw bh]);
55
56
57 bl = bl + bw + pmarg;
58 bw = 0.2;
59 sth = uicontrol(htab,'Style','edit',...
60 'String','obj',...
61 'Fontsize', fontsize,...
62 'Units', 'normalized', ...
63 'BackgroundColor', 'w',...
64 'HorizontalAlignment', 'left',...
65 'Position',[bl bb bw bh],...
66 'Tag', 'objPrefixTxt');
67
68 %-- Append obj type
69 bl = pmarg;
70 bb = bb - bh - pmarg;
71 bw = 0.2;
72 cbh = uicontrol(htab,'Style','checkbox',...
73 'String','Append object type',...
74 'Fontsize', fontsize,...
75 'Units', 'normalized', ...
76 'BackgroundColor', Gproperties.Gcol{4},...
77 'Value',1,'Position',[bl bb bw bh],...
78 'Tag', 'appendObjTypeChk');
79 %-- Retrieve binary obj
80 bl = pmarg;
81 bb = bb - bh - pmarg;
82 bw = 0.2;
83 cbh = uicontrol(htab,'Style','checkbox',...
84 'String','Binary retrieval',...
85 'Fontsize', fontsize,...
86 'Units', 'normalized', ...
87 'BackgroundColor', Gproperties.Gcol{4},...
88 'Value',1,'Position',[bl bb bw bh],...
89 'Tag', 'retrieveBinaryChk', 'TooltipString', 'retrieve the binary representation of the object. Typically much faster');
90
91 %-- Import Btn
92
93 bl = pmarg;
94 bh = CommonHeight;
95 bw = 0.2;
96 bb = pmarg;
97 pbh = uicontrol(htab,'Style','pushbutton','String','Import',...
98 'Units', 'normalized', ...
99 'Position',[bl bb bw bh ],...
100 'Fontsize', fontsize,...
101 'Fontweight', 'bold',...
102 'Tag', 'importBtn');
103 set(pbh, 'Callback', {'repogui2.cb_importBtn', pbh, mainfig});
104 set(pbh, 'TooltipString', 'Retrieve objects to MATLAB workspace');
105
106 %-- Save Btn
107
108 bl = bl + pmarg + bw;
109 pbh = uicontrol(htab,'Style','pushbutton','String','Save',...
110 'Units', 'normalized', ...
111 'Position',[bl bb bw bh ],...
112 'Fontsize', fontsize,...
113 'Fontweight', 'bold',...
114 'Tag', 'saveBtn');
115 set(pbh, 'Callback', {'repogui2.cb_saveBtn', pbh, mainfig});
116 set(pbh, 'TooltipString', 'Retrieve objects to disk');
117
118
119 end