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