0001 function varargout = repogui(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 id = findobj('Tag', 'LTPDARepomainfig');
0014 if ~isempty(id)
0015 figure(id)
0016 return
0017 end
0018
0019
0020
0021
0022
0023 Gproperties.Gcol = [240 240 240]/255;
0024 Gproperties.Gwidth = 800;
0025 Gproperties.Gheight = 650;
0026 Gproperties.Gborder = 10;
0027 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0028
0029 Gproperties.Screen = get(0,'screensize');
0030 Gproperties.Gposition = [Gproperties.Screen(3)/2-Gproperties.Gwidth/2 ...
0031 Gproperties.Screen(4)/2-Gproperties.Gheight/2 ...
0032 Gproperties.Gwidth...
0033 Gproperties.Gheight];
0034
0035
0036 mainfig = figure('Name', 'LTPDA Repository GUI',...
0037 'NumberTitle', 'off',...
0038 'Visible','off',...
0039 'Position',Gproperties.Gposition,...
0040 'Color', Gproperties.Gcol,...
0041 'Toolbar', 'none',...
0042 'MenuBar', 'none',...
0043 'Resize', 'off',...
0044 'Tag', 'LTPDARepomainfig');
0045
0046
0047 set(mainfig, 'CloseRequestFcn', {'cb_mainfigClose', mainfig});
0048
0049
0050 setappdata(mainfig, 'Gproperties', Gproperties);
0051 setappdata(mainfig, 'connection', []);
0052 setappdata(mainfig, 'Nconditions', 0);
0053 setappdata(mainfig, 'tableSelected', 1);
0054
0055
0056
0057 Tleft = Gproperties.Gborder/Gproperties.Gwidth;
0058 Theight = 1-2*Gproperties.Gborder/Gproperties.Gheight - 0.07;
0059 Tbottom = (1 - Gproperties.Gborder/Gproperties.Gheight - Theight);
0060 Twidth = 1-2*Gproperties.Gborder/Gproperties.Gwidth;
0061
0062 htab = uitabpanel(...
0063 'Parent',mainfig,...
0064 'Style','lefttop',...
0065 'Units','normalized',...
0066 'Position',[Tleft Tbottom Twidth Theight],...
0067 'Fontsize', fontsize,...
0068 'FrameBackgroundColor',Gproperties.Gcol,...
0069 'FrameBorderType','etchedout',...
0070 'Title',{'Connection','Submit','Query', 'Retrieve'},...
0071 'HorizontalAlignment','left',...
0072 'FontWeight','bold',...
0073 'TitleBackgroundColor',Gproperties.Gcol,...
0074 'TitleForegroundColor','k',...
0075 'TitleHighlightColor', [1 0 0],...
0076 'PanelBackgroundColor',Gproperties.Gcol,...
0077 'PanelBorderType','line');
0078
0079 hpanel = getappdata(htab,'panels');
0080 setappdata(mainfig, 'panels', hpanel);
0081
0082
0083 cp = create_connection_panel(hpanel(1), Gproperties);
0084
0085 sp = create_submit_panel(hpanel(2), Gproperties);
0086
0087 qp = create_query_panel(hpanel(3), Gproperties);
0088
0089 rp = create_retrieve_panel(hpanel(4), Gproperties);
0090
0091
0092
0093 Ppos = get(mainfig, 'Position');
0094
0095 Sleft = Gproperties.Gborder;
0096 Sbottom = Gproperties.Gborder + 10;
0097 Swidth = 60;
0098 Sheight = 20;
0099
0100 sth = uicontrol(mainfig,'Style','text',...
0101 'String','Status:',...
0102 'Fontsize', fontsize,...
0103 'BackgroundColor', Gproperties.Gcol,...
0104 'HorizontalAlignment', 'left',...
0105 'Position',[Sleft Sbottom Swidth Sheight]);
0106
0107 pos = get(sth, 'Position');
0108 Sleft = 4*Gproperties.Gborder + pos(2);
0109 Swidth = Gproperties.Gwidth - Gproperties.Gborder - Sleft;
0110 Sheight = 30;
0111 Sbottom = Gproperties.Gborder;
0112 sth = uicontrol(mainfig,'Style','text',...
0113 'String','not connected',...
0114 'Fontsize', fontsize,...
0115 'BackgroundColor', 'w',...
0116 'ForegroundColor', 'r', ...
0117 'HorizontalAlignment', 'left',...
0118 'Max', 100,...
0119 'Position',[Sleft Sbottom Swidth Sheight],...
0120 'Tag', 'statusTxt');
0121
0122
0123
0124
0125 set(mainfig,'Visible','on')
0126
0127 h = findobj(mainfig, 'Tag', 'statusTxt');
0128 get(h, 'String')
0129
0130 end
0131
0132
0133
0134
0135 function panel = create_quicklook_panel(panel, Gproperties)
0136
0137 Ppos = get(panel, 'Position');
0138 mainfig = findobj('Tag', 'LTPDARepomainfig');
0139
0140
0141 Sleft = 10;
0142 Sheight = 20;
0143 Sbottom = Ppos(2) + Ppos(4) - 20 - Gproperties.Gborder - Sheight;
0144 Swidth = 200;
0145 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0146 sth = uicontrol(panel,'Style','text',...
0147 'String','LTPDA Objects',...
0148 'Fontsize', fontsize,...
0149 'BackgroundColor', Gproperties.Gcol,...
0150 'HorizontalAlignment', 'center',...
0151 'Position',[Sleft Sbottom Swidth Sheight]);
0152
0153
0154 Lleft = 10;
0155 Lheight = 350;
0156 Lbottom = Ppos(2) + Ppos(4) - 40 - Gproperties.Gborder - Lheight;
0157 Lwidth = Swidth;
0158
0159 lbh = uicontrol(panel,'Style','listbox',...
0160 'String',{' '},...
0161 'Value',1,...
0162 'BackgroundColor', 'w',...
0163 'Fontsize', fontsize,...
0164 'Max', 1000,...
0165 'Position',[Lleft Lbottom Lwidth Lheight],...
0166 'Tag', 'workspaceObjsListQL');
0167
0168
0169 set(lbh, 'Callback', {'cb_workspaceObjsListQL', lbh, mainfig});
0170
0171
0172 objs = getWorkspaceObjs();
0173 setWorkspaceObjsListQL(objs);
0174
0175
0176 pos = get(lbh, 'Position');
0177 Bleft = Lleft;
0178 Bheight = 20;
0179 Bwidth = 100;
0180 Bbottom = pos(2) - Bheight - 10;
0181 pbh = uicontrol(panel,'Style','pushbutton','String','Refresh list',...
0182 'Position',[Bleft Bbottom Bwidth Bheight ],...
0183 'Tag', 'refreshListBtnQL');
0184 set(pbh, 'Callback', {'cb_refreshObjsListQL', pbh, mainfig});
0185
0186
0187
0188 pos = get(lbh, 'Position');
0189 Sleft = 10 + pos(1) + pos(3);
0190 Sheight = 150;
0191 Sbottom = Ppos(2) + Ppos(4) - 40 - Gproperties.Gborder - Sheight;
0192 Swidth = 550;
0193 iph = uicontrol(panel,'Style','edit',...
0194 'String','',...
0195 'Fontsize', fontsize,...
0196 'BackgroundColor', 'w',...
0197 'ForegroundColor', 'b',...
0198 'HorizontalAlignment', 'left',...
0199 'Enable', 'on',...
0200 'Max', 1000,...
0201 'Position',[Sleft Sbottom Swidth Sheight],...
0202 'Tag', 'ltpdaObjInfoQL');
0203
0204
0205 pos = get(iph, 'Position');
0206 Sheight = 20;
0207 Sbottom = pos(2) - Sheight - 20;
0208 Swidth = 300;
0209 sth = uicontrol(panel,'Style','text',...
0210 'String','Class Methods',...
0211 'Fontsize', fontsize,...
0212 'BackgroundColor', Gproperties.Gcol,...
0213 'HorizontalAlignment', 'left',...
0214 'Position',[Sleft Sbottom Swidth Sheight]);
0215
0216
0217 pos = get(lbh, 'Position');
0218 Lleft = pos(1) + pos(3) + 10;
0219 Lheight = 150;
0220 Lbottom = pos(2);
0221 Lwidth = 150;
0222
0223 lbh = uicontrol(panel,'Style','listbox',...
0224 'String',{' '},...
0225 'Value',1,...
0226 'BackgroundColor', 'w',...
0227 'Fontsize', fontsize,...
0228 'Max', 1000,...
0229 'Position',[Lleft Lbottom Lwidth Lheight],...
0230 'Tag', 'classMethodList');
0231
0232
0233 set(lbh, 'Callback', {'cb_classMethodList', lbh, mainfig});
0234
0235
0236 fillClassMethodsList();
0237
0238
0239 pos = get(lbh, 'Position');
0240 Sleft = pos(1) + pos(3) + 10;
0241 Sheight = 150;
0242 Sbottom = pos(2);
0243 Swidth = 550;
0244 sth = uicontrol(panel,'Style','edit',...
0245 'String','',...
0246 'Fontsize', fontsize,...
0247 'BackgroundColor', 'w',...
0248 'ForegroundColor', 'b',...
0249 'HorizontalAlignment', 'left',...
0250 'Enable', 'on',...
0251 'Max', 1000,...
0252 'Position',[Sleft Sbottom Swidth Sheight],...
0253 'Tag', 'methodInfoPanel');
0254
0255
0256 end
0257
0258
0259
0260
0261 function panel = create_retrieve_panel(panel, Gproperties)
0262
0263 Ppos = get(panel, 'Position');
0264 mainfig = findobj('Tag', 'LTPDARepomainfig');
0265 ALLHEIGHT = 25;
0266
0267
0268 Sleft = 10;
0269 Sheight = ALLHEIGHT;
0270 Sbottom = Ppos(2) + Ppos(4) - 20 - Gproperties.Gborder - Sheight;
0271 Swidth = 300;
0272 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0273 Osth = uicontrol(panel,'Style','text',...
0274 'String','Retrieve object IDs',...
0275 'Fontsize', fontsize,...
0276 'BackgroundColor', Gproperties.Gcol,...
0277 'HorizontalAlignment', 'left',...
0278 'Position',[Sleft Sbottom Swidth Sheight]);
0279
0280
0281 pos = get(Osth, 'Position');
0282 Sleft = 10;
0283 Sheight = 250;
0284 Swidth = 250;
0285 Sbottom = pos(2) - 20 - Sheight;
0286
0287 sth = uicontrol(panel,'Style','edit',...
0288 'String','',...
0289 'Fontsize', fontsize,...
0290 'BackgroundColor', 'w',...
0291 'Max', 10,...
0292 'HorizontalAlignment', 'left',...
0293 'Position',[Sleft Sbottom Swidth Sheight],...
0294 'Tag', 'retrieveIDsTxt');
0295
0296
0297 pos = get(sth, 'Position');
0298 Sleft = 10;
0299 Sheight = ALLHEIGHT;
0300 Sbottom = pos(2) - 20 - Sheight;
0301 Swidth = 50;
0302 sth = uicontrol(panel,'Style','text',...
0303 'String','Prefix',...
0304 'Fontsize', fontsize,...
0305 'BackgroundColor', Gproperties.Gcol,...
0306 'HorizontalAlignment', 'left',...
0307 'Position',[Sleft Sbottom Swidth Sheight]);
0308
0309
0310 Sleft = Sleft + Swidth + 20;
0311 Sheight = ALLHEIGHT;
0312 Swidth = 150;
0313 sth = uicontrol(panel,'Style','edit',...
0314 'String','obj',...
0315 'Fontsize', fontsize,...
0316 'BackgroundColor', 'w',...
0317 'HorizontalAlignment', 'left',...
0318 'Position',[Sleft Sbottom Swidth Sheight],...
0319 'Tag', 'objPrefixTxt');
0320
0321
0322 pos = get(sth, 'Position');
0323 Sleft = 10;
0324 Swidth = 150;
0325 Sheight = ALLHEIGHT;
0326 Sbottom = pos(2) - 20 - Sheight;
0327 cbh = uicontrol(panel,'Style','checkbox',...
0328 'String','Append object type',...
0329 'Fontsize', fontsize,...
0330 'BackgroundColor', Gproperties.Gcol,...
0331 'Value',1,'Position',[Sleft Sbottom Swidth Sheight],...
0332 'Tag', 'appendObjTypeChk');
0333
0334
0335
0336 Bleft = 10;
0337 Bheight = ALLHEIGHT;
0338 Bwidth = 100;
0339 Bbottom = Ppos(2) + 10;
0340 pbh = uicontrol(panel,'Style','pushbutton','String','Retrieve',...
0341 'Position',[Bleft Bbottom Bwidth Bheight ],...
0342 'Fontsize', fontsize,...
0343 'Fontweight', 'bold',...
0344 'Tag', 'retrieveBtn');
0345 set(pbh, 'Callback', {'cb_retrieveBtn', pbh, mainfig});
0346
0347
0348
0349 end
0350
0351
0352
0353
0354 function panel = create_query_panel(panel, Gproperties)
0355
0356 Ppos = get(panel, 'Position');
0357 mainfig = findobj('Tag', 'LTPDARepomainfig');
0358
0359
0360 buildConditions(panel);
0361
0362 end
0363
0364
0365
0366
0367 function panel = create_submit_panel(panel, Gproperties)
0368
0369 Ppos = get(panel, 'Position');
0370 mainfig = findobj('Tag', 'LTPDARepomainfig');
0371 ALLHEIGHT = 25;
0372
0373
0374 Sleft = 10;
0375 Sheight = ALLHEIGHT;
0376 Sbottom = Ppos(2) + Ppos(4) - 20 - Gproperties.Gborder - Sheight;
0377 Swidth = 150;
0378 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0379 sth = uicontrol(panel,'Style','text',...
0380 'String','LTPDA Objects',...
0381 'Fontsize', fontsize,...
0382 'BackgroundColor', Gproperties.Gcol,...
0383 'HorizontalAlignment', 'center',...
0384 'Position',[Sleft Sbottom Swidth Sheight]);
0385
0386
0387
0388 Lleft = 10;
0389 Lheight = 350;
0390 Lbottom = Ppos(2) + Ppos(4) - 40 - Gproperties.Gborder - Lheight;
0391 Lwidth = Swidth;
0392
0393 lbh = uicontrol(panel,'Style','listbox',...
0394 'String',{' '},...
0395 'Value',1,...
0396 'BackgroundColor', 'w',...
0397 'Fontsize', fontsize,...
0398 'Max', 1000,...
0399 'Position',[Lleft Lbottom Lwidth Lheight],...
0400 'Tag', 'workspaceObjsList');
0401
0402
0403 set(lbh, 'Callback', {'cb_workspaceObjsList', lbh, mainfig});
0404
0405
0406 objs = getWorkspaceObjs();
0407 setWorkspaceObjsList(objs);
0408
0409
0410
0411 pos = get(lbh, 'Position');
0412 Bleft = Lleft;
0413 Bheight = ALLHEIGHT;
0414 Bwidth = 100;
0415 Bbottom = pos(2) - Bheight - 10;
0416 pbh = uicontrol(panel,'Style','pushbutton','String','Refresh list',...
0417 'Position',[Bleft Bbottom Bwidth Bheight ],...
0418 'Tag', 'refreshListBtn');
0419 set(pbh, 'Callback', {'cb_refreshObjsList', pbh, mainfig});
0420
0421
0422
0423
0424
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440 pos = get(sth, 'Position');
0441 Sleft = 20 + pos(1) + pos(3);
0442 Sheight = ALLHEIGHT;
0443 Swidth = 150;
0444
0445 Sbottom = Ppos(2) + Ppos(4) - 20 - Gproperties.Gborder - Sheight;
0446
0447 sth = uicontrol(panel,'Style','text',...
0448 'String','Experiment Title',...
0449 'Fontsize', fontsize,...
0450 'BackgroundColor', Gproperties.Gcol,...
0451 'HorizontalAlignment', 'left',...
0452 'Position',[Sleft Sbottom Swidth Sheight]);
0453
0454 Tleft = Sleft + Swidth + 20;
0455 Theight = ALLHEIGHT;
0456 Twidth = 380;
0457 Tbottom = Sbottom;
0458
0459 sth = uicontrol(panel,'Style','edit',...
0460 'String','',...
0461 'Fontsize', fontsize,...
0462 'BackgroundColor', 'w',...
0463 'HorizontalAlignment', 'left',...
0464 'Position',[Tleft Tbottom Twidth Theight],...
0465 'Tag', 'experimentTitle');
0466
0467 ttstr = 'A short title for the experiment from which the data originates.';
0468 set(sth, 'Tooltipstring', ttstr)
0469
0470
0471
0472 Sheight = ALLHEIGHT;
0473 Tbottom = Tbottom - 20 - ALLHEIGHT;
0474
0475 sth = uicontrol(panel,'Style','text',...
0476 'String','Experiment description',...
0477 'Fontsize', fontsize,...
0478 'BackgroundColor', Gproperties.Gcol,...
0479 'HorizontalAlignment', 'left',...
0480 'Position',[Sleft Tbottom Swidth Sheight]);
0481
0482 Extra = 60;
0483 Tbottom = Tbottom + 20 - Theight - Extra;
0484 Theight = ALLHEIGHT + Extra;
0485 sth = uicontrol(panel,'Style','edit',...
0486 'String','',...
0487 'Fontsize', fontsize,...
0488 'BackgroundColor', 'w',...
0489 'Max', 100,...
0490 'HorizontalAlignment', 'left',...
0491 'Position',[Tleft Tbottom Twidth Theight],...
0492 'Tag', 'experimentDescription');
0493
0494 ttstr = 'A description of the experiment from which the data originates.';
0495 set(sth, 'Tooltipstring', ttstr)
0496
0497
0498
0499 Tbottom = Tbottom - 20 - Sheight;
0500
0501 sth = uicontrol(panel,'Style','text',...
0502 'String','Analysis description',...
0503 'Fontsize', fontsize,...
0504 'BackgroundColor', Gproperties.Gcol,...
0505 'HorizontalAlignment', 'left',...
0506 'Position',[Sleft Tbottom Swidth Sheight]);
0507
0508 Extra = ALLHEIGHT;
0509 Tbottom = Tbottom - Extra;
0510 Theight = ALLHEIGHT + Extra;
0511 sth = uicontrol(panel,'Style','edit',...
0512 'String','',...
0513 'Fontsize', fontsize,...
0514 'BackgroundColor', 'w',...
0515 'Max', 100,...
0516 'HorizontalAlignment', 'left',...
0517 'Position',[Tleft Tbottom Twidth Theight],...
0518 'Tag', 'analysisDescription');
0519
0520 ttstr = 'Describe the analysis you did, not the experiment.';
0521 set(sth, 'Tooltipstring', ttstr)
0522
0523
0524
0525 Tbottom = Tbottom - 20 - Sheight;
0526
0527 sth = uicontrol(panel,'Style','text',...
0528 'String','Quantity',...
0529 'Fontsize', fontsize,...
0530 'BackgroundColor', Gproperties.Gcol,...
0531 'HorizontalAlignment', 'left',...
0532 'Position',[Sleft Tbottom Swidth Sheight]);
0533
0534 Theight = ALLHEIGHT;
0535 Tbottom = Tbottom;
0536 sth = uicontrol(panel,'Style','edit',...
0537 'String','',...
0538 'Fontsize', fontsize,...
0539 'BackgroundColor', 'w',...
0540 'Max', 1,...
0541 'HorizontalAlignment', 'left',...
0542 'Position',[Tleft Tbottom Twidth Theight],...
0543 'Tag', 'quantity');
0544
0545 ttstr = 'The physical quantity that the data represents.';
0546 set(sth, 'Tooltipstring', ttstr)
0547
0548
0549
0550 Tbottom = Tbottom - 20 - Theight;
0551
0552 sth = uicontrol(panel,'Style','text',...
0553 'String','Keywords',...
0554 'Fontsize', fontsize,...
0555 'BackgroundColor', Gproperties.Gcol,...
0556 'HorizontalAlignment', 'left',...
0557 'Position',[Sleft Tbottom Swidth Sheight]);
0558
0559 Extra = 20;
0560 Theight = ALLHEIGHT + Extra;
0561 Tbottom = Tbottom - Extra;
0562 sth = uicontrol(panel,'Style','edit',...
0563 'String','',...
0564 'Fontsize', fontsize,...
0565 'BackgroundColor', 'w',...
0566 'Max', 1,...
0567 'HorizontalAlignment', 'left',...
0568 'Position',[Tleft Tbottom Twidth Theight],...
0569 'Tag', 'keywords');
0570
0571 ttstr = 'A comma-delimeted list of keywords.';
0572 set(sth, 'Tooltipstring', ttstr)
0573
0574
0575
0576 Tbottom = Tbottom - Theight;
0577
0578 sth = uicontrol(panel,'Style','text',...
0579 'String','Reference IDs',...
0580 'Fontsize', fontsize,...
0581 'BackgroundColor', Gproperties.Gcol,...
0582 'HorizontalAlignment', 'left',...
0583 'Position',[Sleft Tbottom Swidth Sheight]);
0584
0585 Theight = ALLHEIGHT;
0586 Tbottom = Tbottom;
0587 sth = uicontrol(panel,'Style','edit',...
0588 'String','',...
0589 'Fontsize', fontsize,...
0590 'BackgroundColor', 'w',...
0591 'Max', 1,...
0592 'HorizontalAlignment', 'left',...
0593 'Position',[Tleft Tbottom Twidth Theight],...
0594 'Tag', 'referenceIDs');
0595
0596 ttstr = 'List any object IDs that are relevant to this/these results.';
0597 set(sth, 'Tooltipstring', ttstr)
0598
0599
0600
0601 Tbottom = Tbottom - 20 - Theight;
0602
0603 sth = uicontrol(panel,'Style','text',...
0604 'String','Additional Comments',...
0605 'Fontsize', fontsize,...
0606 'BackgroundColor', Gproperties.Gcol,...
0607 'HorizontalAlignment', 'left',...
0608 'Position',[Sleft Tbottom Swidth Sheight]);
0609
0610 Extra = 30;
0611 Tbottom = Tbottom - Extra;
0612 Theight = ALLHEIGHT + Extra;
0613 sth = uicontrol(panel,'Style','edit',...
0614 'String','',...
0615 'Fontsize', fontsize,...
0616 'BackgroundColor', 'w',...
0617 'Max', 100,...
0618 'HorizontalAlignment', 'left',...
0619 'Position',[Tleft Tbottom Twidth Theight],...
0620 'Tag', 'additionalComments');
0621
0622 ttstr = 'Anything else you want to say about the objects being submitted.';
0623 set(sth, 'Tooltipstring', ttstr)
0624
0625
0626
0627 Tbottom = Tbottom - Theight;
0628
0629 sth = uicontrol(panel,'Style','text',...
0630 'String','Additional Authors',...
0631 'Fontsize', fontsize,...
0632 'BackgroundColor', Gproperties.Gcol,...
0633 'HorizontalAlignment', 'left',...
0634 'Position',[Sleft Tbottom Swidth Sheight]);
0635
0636 Extra = 0;
0637 Tbottom = Tbottom - Extra;
0638 Theight = ALLHEIGHT + Extra;
0639 sth = uicontrol(panel,'Style','edit',...
0640 'String','',...
0641 'Fontsize', fontsize,...
0642 'BackgroundColor', 'w',...
0643 'Max', 100,...
0644 'HorizontalAlignment', 'left',...
0645 'Position',[Tleft Tbottom Twidth Theight],...
0646 'Tag', 'additionalAuthors');
0647
0648 ttstr = 'Who else helped creating these objects?.';
0649 set(sth, 'Tooltipstring', ttstr)
0650
0651
0652
0653
0654 pos = get(lbh, 'Position');
0655 Bleft = Lleft;
0656 Bheight = ALLHEIGHT;
0657 Bwidth = 100;
0658 Bbottom = Ppos(2) + 10;
0659 pbh = uicontrol(panel,'Style','pushbutton','String','Submit',...
0660 'Position',[Bleft Bbottom Bwidth Bheight ],...
0661 'Fontsize', fontsize,...
0662 'Fontweight', 'bold',...
0663 'Tag', 'submitBtn');
0664 set(pbh, 'Callback', {'cb_submitBtn', pbh, mainfig});
0665
0666
0667
0668 end
0669
0670
0671
0672
0673
0674 function panel = create_connection_panel(panel, Gproperties)
0675
0676
0677
0678
0679
0680
0681
0682
0683
0684
0685
0686
0687
0688
0689
0690
0691 Ppos = get(panel, 'Position');
0692 mainfig = findobj('Tag', 'LTPDARepomainfig');
0693
0694
0695 Sleft = 10;
0696 Sbottom = Ppos(2) + Ppos(4) - 40-Gproperties.Gborder;
0697 Swidth = 150;
0698 Sheight = 25;
0699 fontsize = getappdata(0, 'ltpda_repo_gui_fontsize');
0700
0701 pmh = uicontrol(panel,'Style','popupmenu',...
0702 'String',{'localhost','130.75.117.67'},...
0703 'Fontsize', fontsize,...
0704 'BackgroundColor', Gproperties.Gcol,...
0705 'Value',1,'Position',[Sleft Sbottom Swidth Sheight],...
0706 'Tag', 'serverSelect');
0707 set(pmh, 'Callback', {'cb_serverSelect', pmh, mainfig});
0708
0709
0710 Tleft = Sleft + Swidth + 10;
0711 Tbottom = Sbottom;
0712 Twidth = 200;
0713 Theight = Sheight;
0714
0715 eth = uicontrol(panel,'Style','edit',...
0716 'String','localhost',...
0717 'Fontsize', fontsize,...
0718 'BackgroundColor', 'w',...
0719 'Position',[Tleft Tbottom Twidth Theight],...
0720 'Tag', 'serverTxt');
0721
0722
0723 sth = uicontrol(panel,'Style','text',...
0724 'String','Server hostname',...
0725 'Fontsize', fontsize,...
0726 'BackgroundColor', Gproperties.Gcol,...
0727 'HorizontalAlignment', 'left',...
0728 'Position',[Tleft+Twidth+10 Tbottom 120 Theight]);
0729
0730
0731 pmh = uicontrol(panel,'Style','popupmenu',...
0732 'String',{'ltpda_test','utp','test'},...
0733 'Fontsize', fontsize,...
0734 'BackgroundColor', Gproperties.Gcol,...
0735 'Value',1,'Position',[Sleft Sbottom-Sheight-10 Swidth Sheight],...
0736 'Tag', 'dbSelect');
0737 set(pmh, 'Callback', {'cb_dbSelect', pmh, mainfig});
0738
0739
0740 eth = uicontrol(panel,'Style','edit',...
0741 'String','ltpda_test',...
0742 'Fontsize', fontsize,...
0743 'BackgroundColor', 'w',...
0744 'Position',[Tleft Tbottom-Theight-10 Twidth Theight],...
0745 'Tag', 'databaseTxt');
0746
0747
0748 sth = uicontrol(panel,'Style','text',...
0749 'String','Database',...
0750 'Fontsize', fontsize,...
0751 'BackgroundColor', Gproperties.Gcol,...
0752 'HorizontalAlignment', 'left',...
0753 'Position',[Tleft+Twidth+10 Tbottom-Theight-10 120 Theight]);
0754
0755
0756 pos = get(sth, 'Position');
0757 Bleft = pos(1) + pos(3) + 20;
0758 Bbottom = pos(2);
0759 Bwidth = 100;
0760 Bheight = Sheight;
0761 pbh = uicontrol(panel,'Style','pushbutton','String','Get DBs',...
0762 'Position',[Bleft Bbottom Bwidth Bheight ],...
0763 'Tag', 'getDbsBtn');
0764 set(pbh, 'Callback', {'cb_getDBs', pbh, mainfig});
0765
0766
0767 pos = get(pmh, 'Position');
0768 Bleft = pos(1);
0769 Bbottom = pos(2) - pos(4) - 20;
0770 Bwidth = 100;
0771 Bheight = Sheight;
0772
0773 pbh = uicontrol(panel,'Style','pushbutton','String','Connect',...
0774 'Position',[Bleft Bbottom Bwidth Bheight ],...
0775 'Tag', 'connectBtn');
0776 set(pbh, 'Callback', {'cb_connectBtn', pbh, mainfig});
0777
0778
0779
0780
0781 end
0782