Mercurial > hg > ltpda
comparison m-toolbox/classes/@repogui2/buildSubmitPanel.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 % BUILDSUBMITPANEL build the submit panel. | |
2 % | |
3 % M Hewitson 22-09-08 | |
4 % | |
5 % $Id: buildSubmitPanel.m,v 1.3 2011/04/08 08:56:36 hewitson Exp $ | |
6 % | |
7 function buildSubmitPanel(mainfig) | |
8 | |
9 import utils.const.* | |
10 utils.helper.msg(msg.PROC1, 'building Submit Panel'); | |
11 | |
12 htab = mainfig.panels(2); | |
13 | |
14 Gproperties = mainfig.Gproperties; | |
15 pmarg = 0.025; | |
16 | |
17 CommonHeight = 0.06; | |
18 | |
19 % Workspace object list | |
20 | |
21 % header | |
22 bw = 0.17; | |
23 bl = pmarg; | |
24 bh = CommonHeight; | |
25 bb = 1-2*pmarg-bh; | |
26 sth = uicontrol(htab, 'Style','text',... | |
27 'String', 'LTPDA Objects in Workspace',... | |
28 'Units', 'normalized', ... | |
29 'BackgroundColor', 'w', ... | |
30 'Fontsize', Gproperties.fontsize+2, ... | |
31 'Position',[bl bb bw bh]); | |
32 | |
33 % list box | |
34 bh = 0.7; | |
35 bb = bb - pmarg - bh; | |
36 lbh = uicontrol(htab,'Style','listbox',... | |
37 'String',{' '},... | |
38 'Value',1,... | |
39 'BackgroundColor', 'w',... | |
40 'Fontsize', Gproperties.fontsize,... | |
41 'Units', 'normalized', ... | |
42 'Max', 1000,... | |
43 'Position',[bl bb bw bh],... | |
44 'Tag', 'RepoguiWorkspaceObjsList', ... | |
45 'Callback', {'repogui2.cb_workspaceObjsList', mainfig}); | |
46 | |
47 | |
48 % fill list | |
49 objs = repogui2.getWorkspaceObjs(); | |
50 setWorkspaceObjsList(mainfig, objs); | |
51 | |
52 % refresh button | |
53 bh = CommonHeight; | |
54 bb = bb - pmarg - bh; | |
55 pbh = uicontrol(htab,'Style','pushbutton',... | |
56 'String','Refresh',... | |
57 'Callback', {'repogui2.cb_refreshObjsList', mainfig}, ... | |
58 'Units', 'normalized', ... | |
59 'Fontsize', Gproperties.fontsize, ... | |
60 'Position',[bl bb bw bh]); | |
61 | |
62 | |
63 | |
64 % Submission details | |
65 | |
66 EditWidth = 0.54; | |
67 | |
68 % Experiment title | |
69 bl = bl + pmarg + bw; | |
70 BL = bl; | |
71 bw = 0.2; | |
72 bh = CommonHeight; | |
73 bb = 1-2*pmarg-bh; | |
74 sth = uicontrol(htab, 'Style','text',... | |
75 'String', 'Experiment Title',... | |
76 'Units', 'normalized', ... | |
77 'BackgroundColor', 'w', ... | |
78 'ForegroundColor', 'r', ... | |
79 'Fontsize', Gproperties.fontsize, ... | |
80 'Position',[bl bb bw bh]); | |
81 | |
82 bl = bl + pmarg + bw; | |
83 bw = EditWidth; | |
84 th = uicontrol(htab, ... | |
85 'Style', 'edit', ... | |
86 'Units', 'normalized',... | |
87 'BackgroundColor', 'w', ... | |
88 'Fontsize', Gproperties.fontsize, ... | |
89 'String', '', ... | |
90 'Position', [bl bb bw bh],... | |
91 'HorizontalAlignment', 'left', ... | |
92 'Tag', 'RepoguiExperimentTitleEdit'); | |
93 | |
94 % Experiment description | |
95 bl = BL; | |
96 bw = 0.2; | |
97 bh = 3*CommonHeight; | |
98 bb = bb - pmarg - bh; | |
99 sth = uicontrol(htab, 'Style','text',... | |
100 'String', 'Experiment Description',... | |
101 'Units', 'normalized', ... | |
102 'BackgroundColor', 'w', ... | |
103 'ForegroundColor', 'r', ... | |
104 'Fontsize', Gproperties.fontsize, ... | |
105 'Position',[bl bb bw bh]); | |
106 | |
107 bl = bl + pmarg + bw; | |
108 bw = EditWidth; | |
109 th = uicontrol(htab, ... | |
110 'Style', 'edit', ... | |
111 'Units', 'normalized',... | |
112 'BackgroundColor', 'w', ... | |
113 'Fontsize', Gproperties.fontsize, ... | |
114 'HorizontalAlignment', 'left', ... | |
115 'String', '', ... | |
116 'Max', 1000, ... | |
117 'Position', [bl bb bw bh],... | |
118 'Tag', 'RepoguiExperimentDescriptionEdit'); | |
119 | |
120 % Analysis description | |
121 bl = BL; | |
122 bw = 0.2; | |
123 bh = 2*CommonHeight; | |
124 bb = bb - pmarg - bh; | |
125 sth = uicontrol(htab, 'Style','text',... | |
126 'String', 'Analysis Description',... | |
127 'Units', 'normalized', ... | |
128 'BackgroundColor', 'w', ... | |
129 'ForegroundColor', 'r', ... | |
130 'Fontsize', Gproperties.fontsize, ... | |
131 'Position',[bl bb bw bh]); | |
132 | |
133 bl = bl + pmarg + bw; | |
134 bw = EditWidth; | |
135 th = uicontrol(htab, ... | |
136 'Style', 'edit', ... | |
137 'Units', 'normalized',... | |
138 'BackgroundColor', 'w', ... | |
139 'HorizontalAlignment', 'left', ... | |
140 'Fontsize', Gproperties.fontsize, ... | |
141 'String', '', ... | |
142 'Max', 1000, ... | |
143 'Position', [bl bb bw bh],... | |
144 'Tag', 'RepoguiAnalysisDescriptionEdit'); | |
145 | |
146 % Quantity | |
147 bl = BL; | |
148 bw = 0.2; | |
149 bh = CommonHeight; | |
150 bb = bb - pmarg - bh; | |
151 sth = uicontrol(htab, 'Style','text',... | |
152 'String', 'Quantity',... | |
153 'Units', 'normalized', ... | |
154 'BackgroundColor', 'w', ... | |
155 'ForegroundColor', 'k', ... | |
156 'Fontsize', Gproperties.fontsize, ... | |
157 'Position',[bl bb bw bh]); | |
158 | |
159 bl = bl + pmarg + bw; | |
160 bw = EditWidth; | |
161 th = uicontrol(htab, ... | |
162 'Style', 'edit', ... | |
163 'Units', 'normalized',... | |
164 'BackgroundColor', 'w', ... | |
165 'HorizontalAlignment', 'left', ... | |
166 'Fontsize', Gproperties.fontsize, ... | |
167 'String', '', ... | |
168 'Max', 1000, ... | |
169 'Position', [bl bb bw bh],... | |
170 'Tag', 'RepoguiQuantityEdit'); | |
171 | |
172 % Keywords | |
173 bl = BL; | |
174 bw = 0.2; | |
175 bh = CommonHeight; | |
176 bb = bb - pmarg - bh; | |
177 sth = uicontrol(htab, 'Style','text',... | |
178 'String', 'Keywords',... | |
179 'Units', 'normalized', ... | |
180 'BackgroundColor', 'w', ... | |
181 'ForegroundColor', 'k', ... | |
182 'Fontsize', Gproperties.fontsize, ... | |
183 'Position',[bl bb bw bh]); | |
184 | |
185 bl = bl + pmarg + bw; | |
186 bw = EditWidth; | |
187 th = uicontrol(htab, ... | |
188 'Style', 'edit', ... | |
189 'Units', 'normalized',... | |
190 'BackgroundColor', 'w', ... | |
191 'HorizontalAlignment', 'left', ... | |
192 'Fontsize', Gproperties.fontsize, ... | |
193 'String', '', ... | |
194 'Max', 1000, ... | |
195 'Position', [bl bb bw bh],... | |
196 'Tag', 'RepoguiKeywordsEdit'); | |
197 | |
198 % Reference IDs | |
199 bl = BL; | |
200 bw = 0.2; | |
201 bh = CommonHeight; | |
202 bb = bb - pmarg - bh; | |
203 sth = uicontrol(htab, 'Style','text',... | |
204 'String', 'Reference IDs',... | |
205 'Units', 'normalized', ... | |
206 'BackgroundColor', 'w', ... | |
207 'ForegroundColor', 'k', ... | |
208 'Fontsize', Gproperties.fontsize, ... | |
209 'Position',[bl bb bw bh]); | |
210 | |
211 bl = bl + pmarg + bw; | |
212 bw = EditWidth; | |
213 th = uicontrol(htab, ... | |
214 'Style', 'edit', ... | |
215 'Units', 'normalized',... | |
216 'BackgroundColor', 'w', ... | |
217 'HorizontalAlignment', 'left', ... | |
218 'Fontsize', Gproperties.fontsize, ... | |
219 'String', '', ... | |
220 'Max', 1000, ... | |
221 'Position', [bl bb bw bh],... | |
222 'Tag', 'RepoguiReferenceIDsEdit'); | |
223 | |
224 % Additional comments | |
225 bl = BL; | |
226 bw = 0.2; | |
227 bh = CommonHeight; | |
228 bb = bb - pmarg - bh; | |
229 sth = uicontrol(htab, 'Style','text',... | |
230 'String', 'Additional Comments',... | |
231 'Units', 'normalized', ... | |
232 'BackgroundColor', 'w', ... | |
233 'ForegroundColor', 'k', ... | |
234 'Fontsize', Gproperties.fontsize, ... | |
235 'Position',[bl bb bw bh]); | |
236 | |
237 bl = bl + pmarg + bw; | |
238 bw = EditWidth; | |
239 th = uicontrol(htab, ... | |
240 'Style', 'edit', ... | |
241 'Units', 'normalized',... | |
242 'BackgroundColor', 'w', ... | |
243 'HorizontalAlignment', 'left', ... | |
244 'Fontsize', Gproperties.fontsize, ... | |
245 'String', '', ... | |
246 'Max', 1000, ... | |
247 'Position', [bl bb bw bh],... | |
248 'Tag', 'RepoguiAdditonalCommentsEdit'); | |
249 | |
250 | |
251 % Additional authors | |
252 bl = BL; | |
253 bw = 0.2; | |
254 bh = CommonHeight; | |
255 bb = bb - pmarg - bh; | |
256 sth = uicontrol(htab, 'Style','text',... | |
257 'String', 'Additional Authors',... | |
258 'Units', 'normalized', ... | |
259 'BackgroundColor', 'w', ... | |
260 'ForegroundColor', 'k', ... | |
261 'Fontsize', Gproperties.fontsize, ... | |
262 'Position',[bl bb bw bh]); | |
263 | |
264 bl = bl + pmarg + bw; | |
265 bw = EditWidth; | |
266 th = uicontrol(htab, ... | |
267 'Style', 'edit', ... | |
268 'Units', 'normalized',... | |
269 'BackgroundColor', 'w', ... | |
270 'HorizontalAlignment', 'left', ... | |
271 'Fontsize', Gproperties.fontsize, ... | |
272 'String', '', ... | |
273 'Max', 1000, ... | |
274 'Position', [bl bb bw bh],... | |
275 'Tag', 'RepoguiAdditionalAuthorsEdit'); | |
276 | |
277 % Submit button | |
278 | |
279 bb = bb - pmarg - bh; | |
280 bl = bl + bw - 0.2; | |
281 bw = 0.2; | |
282 pbh = uicontrol(htab,'Style','pushbutton',... | |
283 'String','Submit',... | |
284 'Callback', {'repogui2.cb_submit', mainfig}, ... | |
285 'Units', 'normalized', ... | |
286 'Fontsize', Gproperties.fontsize, ... | |
287 'Position',[bl bb bw bh]); | |
288 | |
289 end |