-
Notifications
You must be signed in to change notification settings - Fork 0
/
BurstBrowser.m
4969 lines (4690 loc) · 195 KB
/
BurstBrowser.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
function BurstBrowser(~,~)
% 2017 - FAB Lab Munich - Don C. Lamb
hfig=findobj('Tag','BurstBrowser');
addpath(genpath(['.' filesep 'functions']));
global UserValues BurstMeta PathToApp
LSUserValues(0);
Look=UserValues.Look;
if isempty(PathToApp)
GetAppFolder();
end
if isempty(hfig)
warning('off','MATLAB:uigridcontainer:MigratingFunction');
warning('off','MATLAB:uiflowcontainer:MigratingFunction');
warning('off','MATLAB:ui:javaframe:PropertyToBeRemoved');
%%% start splash screen
s = SplashScreen( 'Splashscreen', [PathToApp filesep 'images' filesep 'BurstBrowser' filesep 'splash.jpg'], ...
'ProgressBar', 'on', ...
'ProgressPosition', 5, ...
'ProgressRatio', 0 );
s.addText( 30, 50, 'BurstBrowser', 'FontSize', 30, 'Color', [1 1 1] );
s.addText( 30, 80, 'v1.3', 'FontSize', 20, 'Color', [1 1 1] );
s.addText( 385, 330, 'Loading...', 'FontSize', 20, 'Color', 'white' );
try %%% try to get random fact
%%% random fact or quote?
type = randi(2);
switch type
case 1 %%% get random fact
title_str = 'Random fact:';
data = webread('http://randomuselessfact.appspot.com/random.json?language=en');
text_total = data.text;
source = 'http://randomuselessfact.appspot.com';
case 2
title_str = 'Random quote:';
data = webread('https://opinionated-quotes-api.gigalixirapp.com/v1/quotes?rand=t&tags=short');
text_total = data.quotes.quote;
if isfield(data.quotes,'author')
author = data.quotes.author;
end
source = 'http://opinionated-quotes-api.gigalixirapp.com';
end
%%% split text every N characters
N = 60;
text_total = [text_total, repmat(' ',1,N-mod(numel(text_total),N))];
txt=cellstr(reshape(text_total,N,[])');
% avoid splitting words
for i = 1:numel(txt)-1
while ~any(strcmp(txt{i}(end),{' ',',',':','.','-'}))
txt{i+1} = [txt{i}(end) txt{i+1}];
txt{i}(end) = [];
end
end
if exist('author','var')
txt{end+1} = author;
end
% render text
start = 300-numel(txt)*20;
s.addText(30,start-5,title_str,'FontSize',18,'Color',[1,1,1]);
for i = 1:numel(txt)
s.addText(30,start+i*20,txt{i},'FontSize',16,'Color',[1,1,1]);
end
s.addText(30,335,source,'FontSize',12,'Color',[1,1,1]);
% also print the fact to command line
disp(sprintf('%s\n',title_str,txt{:}));
end
%% Define main window
h.BurstBrowser = figure(...
'Units','normalized',...
'Name','BurstBrowser',...
'NumberTitle','off',...
'MenuBar','none',...
'defaultUicontrolFontName',Look.Font,...
'defaultAxesFontName',Look.Font,...
'defaultTextFontName',Look.Font,...
'OuterPosition',[0.01 0.05 0.98 0.95],...
'UserData',[],...
'Visible','off',...
'Tag','BurstBrowser',...
'ToolBar','figure',...
'CloseRequestFcn',@Close_BurstBrowser,...
'KeyPressFcn',@BurstBrowser_KeyPress,...
'WindowButtonDownFcn',@PhasorLiveUpdate);
whitebg(h.BurstBrowser,Look.Axes);
set(h.BurstBrowser,'Color',Look.Back);
%%% Remove unneeded items from toolbar
toolbar = findall(h.BurstBrowser,'Type','uitoolbar');
toolbar_items = findall(toolbar);
if verLessThan('matlab','9.5') %%% toolbar behavior changed in MATLAB 2018b
delete(toolbar_items([2:7 9 13:17]));
else %%% 2018b and upward
%%% just remove the tool bar since the options are now in the axis
%%% (e.g. axis zoom etc)
delete(toolbar_items);
end
%%% get BurstBrowser size in pixels
h.BurstBrowser.Units = 'pixels';
h.figure_size = h.BurstBrowser.Position;
%%% define menu items
h.File_Menu = uimenu(...
'Parent',h.BurstBrowser,...
'Label','File',...
'Tag','File_Menu',...
'Enable','off');
%%% Load Burst Data Callback
h.Load_Bursts = uimenu(...
'Parent',h.File_Menu,...
'Label','<html>Load <b>New</b> Burst Data <b>(Crtl+N)</b><html>',...
'Callback',@Load_Burst_Data_Callback,...
'Tag','Load_Burst_Data');
h.Load_Bursts_From_Folder = uimenu(...
'Parent',h.File_Menu,...
'Label','<html>Load <b>New</b> Burst Files from <b>Subfolders</b></html>',...
'Callback',@Load_Burst_Data_Callback,...
'Tag','Load_Bursts_From_Folder');
h.Append_File = uimenu(...
'Parent',h.File_Menu,...
'Label','<html><b>Add</b> Burst Data<html>',...
'Callback',@Load_Burst_Data_Callback,...
'Tag','Load_Burst_Data',...
'Separator','on',...
'Enable','off');
%h.Database.Add = uimenu(...
% 'Parent', h.File_Menu,...
% 'Tag','Database_Add',...
% 'Label','Add Burst File to Database',...
% 'enable', 'off',...
% 'Callback',{@Database,1});
%%% Save Analysis State
h.Save_Bursts = uimenu(...
'Parent',h.File_Menu,...
'Label','<html><b>Save</b> Analysis State <b>(Ctrl+S)</b></html>',...
'Callback',@Save_Analysis_State_Callback,...
'Tag','Save_Analysis_State',...
'Separator','on');
%%% Merge *.bur files
h.Merge_Files_Menu = uimenu(...
'Parent',h.File_Menu,...
'Label','<html><b>Merge</b> <i>*.bur</i>-files</html>',...
'Callback',@Merge_bur_files,...
'Tag','Merge_Files_Menu',...
'Separator','on');
%%% Merge *.bur files
h.Export_Files_To_CSV_Menu = uimenu(...
'Parent',h.File_Menu,...
'Label','<html><b>Export</b> to <i>*.csv</i>-file</html>',...
'Callback',@write_to_csv,...
'Tag','Export_Files_To_CSV_Menu',...
'Separator','off');
%%% "Export" Menu
h.Export_Menu = uimenu(...
'Parent',h.BurstBrowser,...
'Label','Export',...
'Tag','More_Export_Menu',...
'Enable','on');
%%% Export FRET histograms for all loaded measurements
h.FRET_Export_Top_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html>Export <b>FRET efficiency histograms</b>...</html>',...
'Callback',[],...
'Tag','FRET_Export_Top_Menu',...
'Separator','off');
h.FRET_Export_Sel_Menu = uimenu(...
'Parent',h.FRET_Export_Top_Menu,...
'Label','<html>for all selected species</html>',...
'Callback',@Export_FRET_Hist,...
'Tag','FRET_Export_Sel__Menu',...
'Separator','off');
h.FRET_Export_All_Menu = uimenu(...
'Parent',h.FRET_Export_Top_Menu,...
'Label','<html>for all loaded files</html>',...
'Callback',@Export_FRET_Hist,...
'Tag','FRET_Export_All_Menu',...
'Separator','off');
h.Export_PDA_Top_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html>Export to <b>PDA</b>...</html>',...
'Tag','Export_PDA_Top_Menu',...
'Callback',[],...
'Enable','on',...
'Separator','off');
h.Export_PDA_Sel_Menu = uimenu(...
'Parent',h.Export_PDA_Top_Menu,...
'Label','<html>for all selected species</html>',...
'Tag','Export_PDA_Sel_Menu',...
'Callback',@Export_To_PDA,...
'Enable','on');
h.Export_PDA_All_Menu = uimenu(...
'Parent',h.Export_PDA_Top_Menu,...
'Label','<html>for all loaded files</html>',...
'Tag','Export_PDA_All_Menu',...
'Callback',@Export_To_PDA,...
'Enable','on');
h.ExportAllGraphs_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html>Export all graphs (E, E-S, lifetime...)</html>',...
'Tag','ExportAllGraphs_Menu',...
'Callback',@ExportAllGraphs,...
'Enable','on',...
'Separator','on');
h.ExportAllInOneGraphs_Top_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html>Export all-in-one graphs...</html>',...
'Tag','ExportAllInOneGraphs_Top_Menu',...
'Callback',[],...
'Enable','on',...
'Separator','off');
h.ExportAllInOneGraphs_Top_Menu1 = uimenu(...
'Parent',h.ExportAllInOneGraphs_Top_Menu,...
'Label','<html>S-E plot attached</html>',...
'Tag','ExportAllInOneGraphs_Menu1',...
'Callback',{@ExportAllInOneGraphs,1},...
'Enable','on',...
'Separator','off');
h.ExportAllInOneGraphs_Top_Menu2 = uimenu(...
'Parent',h.ExportAllInOneGraphs_Top_Menu,...
'Label','<html>S-E plot centered</html>',...
'Tag','ExportAllInOneGraphs_Menu2',...
'Callback',{@ExportAllInOneGraphs,2},...
'Enable','on',...
'Separator','off');
%%% Choose print path
h.Autoset_PrintPath_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html>Export to <b>Current</b> File Path<html>',...
'Callback',@Choose_PrintPath_Menu,...
'Tag','Autoset_PrintPath_Menu',...
'Separator','on');
h.Choose_PrintPath_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html><b>Change</b> Export Path<html>',...
'Callback',@Choose_PrintPath_Menu,...
'Tag','Choose_PrintPath_Menu',...
'Separator','off');
h.Current_PrintPath_Menu = uimenu(...
'Parent',h.Export_Menu,...
'Label','<html><i>Current Export Path:</i></html>',...
'Callback',[],...
'Tag','Current_PrintPath_Menu',...
'Separator','off');
h.Current_PrintPath_Text = uimenu(...
'Parent',h.Current_PrintPath_Menu,...
'Label',UserValues.BurstBrowser.PrintPath,...
'Callback',[],...
'Tag','Current_PrintPath_Text',...
'Separator','off');
if UserValues.BurstBrowser.Settings.UseFilePathForExport
h.Autoset_PrintPath_Menu.Checked = 'on';
h.Choose_PrintPath_Menu.Enable = 'off';
h.Current_PrintPath_Menu.Enable = 'off';
else
h.Autoset_PrintPath_Menu.Checked = 'off';
h.Choose_PrintPath_Menu.Enable = 'on';
h.Current_PrintPath_Menu.Enable = 'on';
end
h.ExportToTracy = uimenu(...
'Parent',h.Export_Menu,...
'Label','Export burst-wise traces',...
'Callback',@Export_to_Tracy,...
'Tag','ExportToTracy',...
'Separator','on');
%%% "Parameter Comparison" Menu
h.Parameter_Comparison_Menu = uimenu(....
'Parent',h.BurstBrowser,...
'Label','Compare',...
'Tag','Parameter_Comparison_Menu');
h.FRET_comp_selected_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>Compare <b>FRET efficiency histograms</b> of selected species</html>',...
'Callback',[],...
'Tag','FRET_comp_selected_Menu',...
'Enable','off',...
'Separator','off');
h.FRET_comp_selected_together_Menu = uimenu(...
'Parent',h.FRET_comp_selected_Menu,...
'Label','... in one plot',...
'Callback',@Compare_FRET_Hist,...
'Tag','FRET_comp_selected_together_Menu',...
'Enable','off',...
'Separator','off');
h.FRET_comp_selected_separate_Menu = uimenu(...
'Parent',h.FRET_comp_selected_Menu,...
'Label','... stacked',...
'Callback',@Compare_FRET_Hist,...
'Tag','FRET_comp_selected_separate_Menu',...
'Enable','off',...
'Separator','off');
h.Param_comp_selected_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>Compare <b>current parameter</b> of selected species</html>',...
'Callback',[],...
'Tag','Param_comp_selected_Menu',...
'Enable','off',...
'Separator','off');
h.Param_comp_selected_together_Menu = uimenu(...
'Parent',h.Param_comp_selected_Menu,...
'Label','... in one plot',...
'Callback',@Compare_FRET_Hist,...
'Tag','Param_comp_selected_together_Menu',...
'Enable','off',...
'Separator','off');
h.Param_comp_selected_separate_Menu = uimenu(...
'Parent',h.Param_comp_selected_Menu,...
'Label','... stacked',...
'Callback',@Compare_FRET_Hist,...
'Tag','Param_comp_selected_separate_Menu',...
'Enable','off',...
'Separator','off');
%%% FRET Comparions plot of loaded files
h.FRET_comp_Loaded_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>Compare <b>FRET efficiency histograms</b> of loaded files</html>',...
'Callback',[],...
'Tag','FRET_comp_Loaded_Menu',...
'Separator','on');
h.FRET_comp_Loaded_together_Menu = uimenu(...
'Parent',h.FRET_comp_Loaded_Menu,...
'Label','... in one plot',...
'Callback',@Compare_FRET_Hist,...
'Tag','FRET_comp_Loaded_together_Menu',...
'Separator','off');
h.FRET_comp_Loaded_separate_Menu = uimenu(...
'Parent',h.FRET_comp_Loaded_Menu,...
'Label','... stacked',...
'Callback',@Compare_FRET_Hist,...
'Tag','FRET_comp_Loaded_together_Menu',...
'Separator','off');
%%% Parameter Comparions plot from loaded files
h.Param_comp_Loaded_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>Compare <b>current parameter</b> of loaded files</html>',...
'Callback',[],...
'Tag','Param_comp_Loaded_Menu',...
'Separator','off');
h.Param_comp_Loaded_together_Menu = uimenu(...
'Parent',h.Param_comp_Loaded_Menu,...
'Label','... in one plot',...
'Callback',@Compare_FRET_Hist,...
'Tag','Param_comp_Loaded_Menu',...
'Separator','off');
h.Param_comp_Loaded_separate_Menu = uimenu(...
'Parent',h.Param_comp_Loaded_Menu,...
'Label','... stacked',...
'Callback',@Compare_FRET_Hist,...
'Tag','Param_comp_Loaded_Menu',...
'Separator','off');
%%% FRET Comparions plot from *.his files
h.FRET_comp_File_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>Compare <b>FRET efficiency histograms</b> from <i>*.his</i>-files</html>',...
'Callback',@Compare_FRET_Hist,...
'Tag','FRET_comp_File_Menu',...
'Separator','on');
%%% PCA Comparion between files
h.PCA_comp_File_Menu = uimenu(...
'Parent',h.Parameter_Comparison_Menu,...
'Label','<html>PCA<b> anaylsis</html>',...
'Callback',@PCA_analysis,...
'Tag','PCA_comp',...
'Separator','on');
%%% Notepad Menu Item
h.Extras_Menu = uimenu(....
'Parent',h.BurstBrowser,...
'Label','Extras',...
'Tag','Extras_Menu');
h.Notepad_Menu = uimenu( ...
'Parent',h.Extras_Menu,...
'Label','Notepad',...
'Callback',@Open_Notepad,...
'Tag','Notepad_Menu',...
'Separator','off');
h.Convert_Seidel_Bursts=uimenu(...
'Parent',h.Extras_Menu,...
'Label','<html>Convert <b>Seidel</b> Burst Data from Margerita software</html>',...
'Callback',@Convert_Seidel_Burst_Data_Callback,...
'Separator','on',...
'Tag','Load_Seidel_Bursts');
h.Dog_Mode = uimenu(...
'Parent',h.Extras_Menu,...
'Label','<html>Enable <i>DOG MODE</i></html>',...
'Callback',@UpdateOptions,...
'Separator','on',...
'Tag','Dog_Mode');
if UserValues.BurstBrowser.Dog_Mode
h.Dog_Mode.Checked = 'on';
else
h.Dog_Mode.Checked = 'off';
end
%define tabs
%main tab
h.Main_Tab = uitabgroup(...
'Parent',h.BurstBrowser,...
'Tag','Main_Tab',...
'Units','normalized',...
'Position',[0 0 0.65 1],...
'SelectionChangedFcn',@TabSelectionChange);
h.Main_Tab_General = uitab(h.Main_Tab,...
'title','General',...
'Tag','Main_Tab_General'...
);
h.MainTabGeneralPanel = uibuttongroup(...
'Parent',h.Main_Tab_General,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','MainTabGeneralPanel');
%%% Progress Bar
%%% Panel for progressbar
h.Progress_Panel = uibuttongroup(...
'Parent',h.BurstBrowser,...
'Tag','Progress_Panel',...
'Units','normalized',...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Position',[0.65 0 0.35 0.03]);
%%% Axes for progressbar
h.Progress_Axes = axes(...
'Parent',h.Progress_Panel,...
'Tag','Progress_Axes',...
'Units','normalized',...
'Color',Look.Control,...
'Position',[0 0 1 1]);
h.Progress_Axes.XTick=[]; h.Progress_Axes.YTick=[];
%%% Progress and filename text
h.Progress_Text=text(...
'Parent',h.Progress_Axes,...
'Tag','Progress_Text',...
'Units','normalized',...
'FontSize',12,...
'FontWeight','bold',...
'String','Nothing loaded',...
'Interpreter','none',...
'HorizontalAlignment','center',...
'BackgroundColor','none',...
'Color',Look.Fore,...
'Position',[0.5 0.5]);
%%% Define hide uitabgroup
h.Hide_Tab = uitabgroup(...
'Parent',h.BurstBrowser,...
'Tag','Hide_Tab',...
'Units','normalized',...
'Position',[0 0 1 1],...
'Visible','off');
h.Hide_Stuff = uitab(...
'Parent',h.Hide_Tab,...
'Tag','Hide_Stuff');
h.Main_Tab_Lifetime= uitab(h.Main_Tab,...
'title','Lifetime',...
'Tag','Main_Tab_Lifetime'...
);
h.LifetimeTabgroup = uitabgroup(...
'Parent',h.Main_Tab_Lifetime,...
'Units','normalized',...
'Position',[0 0 1 1],...
'SelectionChangedFcn',@TabSelectionChange);
h.LifetimeTabAll = uitab('Parent',h.LifetimeTabgroup,...
'title','All');
h.LifetimePanelAll = uibuttongroup(...
'Parent',h.LifetimeTabAll,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','LifetimePanelAll');%,...
%'UIContextMenu',h.LifeTime_Menu);
h.LifetimeTabInd = uitab('Parent',h.LifetimeTabgroup,'title','Individual');
h.LifetimePanelInd = uibuttongroup(...
'Parent',h.LifetimeTabInd,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','LifetimePanelInd');%,...
%'UIContextMenu',h.LifeTime_Menu);
%%% fFCS main tab
h.Main_Tab_fFCS= uitab(h.Main_Tab,...
'title','filtered FCS',...
'Tag','Main_Tab_fFCS'...
);
h.MainTabfFCSPanel = uibuttongroup(...
'Parent',h.Main_Tab_fFCS,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','MainTabfFCSPanel');
h.Main_Tab_Corrections= uitab(h.Main_Tab,...
'title','Corrections',...
'Tag','Main_Tab_Corrections'...
);
h.MainTabCorrectionsPanel = uibuttongroup(...
'Parent',h.Main_Tab_Corrections,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','MainTabCorrectionsPanel');
h.Main_Tab_Corrections_ThreeCMFD= uitab(h.Hide_Tab,...
'title','Corrections (3C)',...
'Tag','Main_Tab_Corrections_ThreeCMFD'...
);
h.MainTabCorrectionsThreeCMFDPanel = uibuttongroup(...
'Parent',h.Main_Tab_Corrections_ThreeCMFD,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','MainTabCorrectionsThreeCMFDPanel'...
);
%%% fFCS sub tabs for display of filter and filter matching
h.fFCS_SubTabPar = uitabgroup(...
'Parent',h.MainTabfFCSPanel,...
'Tag','fFCS_SubTabPar',...
'Units','normalized',...
'Position',[0 0 0.5 0.45]);
h.fFCS_SubTabParFilter = uitab(h.fFCS_SubTabPar,...
'title','Filter Par',...
'Tag','fFCS_SubTabParFilter');
h.fFCS_SubTabParFilterPanel = uibuttongroup(...
'Parent',h.fFCS_SubTabParFilter,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','fFCS_SubTabParFilterPanel');
h.fFCS_SubTabParReconstruction = uitab(h.fFCS_SubTabPar,...
'title','Reconstruction Par',...
'Tag','fFCS_SubTabParReconstruction');
h.fFCS_SubTabParReconstructionPanel = uibuttongroup(...
'Parent',h.fFCS_SubTabParReconstruction,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','fFCS_SubTabParReconstructionPanel');
h.fFCS_SubTabPerp = uitabgroup(...
'Parent',h.MainTabfFCSPanel,...
'Tag','fFCS_SubTabPerp',...
'Units','normalized',...
'Position',[0.5 0 0.5 0.45]);
h.fFCS_SubTabPerpFilter = uitab(h.fFCS_SubTabPerp,...
'title','Filter Perp',...
'Tag','fFCS_SubTabPerpFilter');
h.fFCS_SubTabPerpFilterPanel = uibuttongroup(...
'Parent',h.fFCS_SubTabPerpFilter,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','fFCS_SubTabPerpFilterPanel');
h.fFCS_SubTabPerpReconstruction = uitab(h.fFCS_SubTabPerp,...
'title','Reconstruction Perp',...
'Tag','fFCS_SubTabPerpReconstruction');
h.fFCS_SubTabPerpReconstructionPanel = uibuttongroup(...
'Parent',h.fFCS_SubTabPerpReconstruction,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','fFCS_SubTabPerpReconstructionPanel');
%% Secondary tab selection gui
h.Secondary_Tab = uitabgroup(...
'Parent',h.BurstBrowser,...
'Tag','Secondary_Tab',...
'Units','normalized',...
'Position',[0.65 0.25 0.35 0.75]);
h.Secondary_Tab_Selection = uitab(h.Secondary_Tab,...
'title','Selection',...
'Tag','Secondary_Tab_Selection'...
);
h.SecondaryTabSelectionPanel = uibuttongroup(...
'Parent',h.Secondary_Tab_Selection,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','SecondaryTabSelectionPanel');
h.Secondary_Tab_Corrections= uitab(h.Secondary_Tab,...
'title','Corrections/FCS',...
'Tag','Secondary_Tab_Corrections'...
);
h.SecondaryTabCorrectionsPanel = uibuttongroup(...
'Parent',h.Secondary_Tab_Corrections,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','SecondaryTabCorrectionsPanel');
h.Secondary_Tab_Fitting= uitab(...
'Parent',h.Secondary_Tab,...
'title','Fitting',...
'Tag','Secondary_Tab_Fitting'...
);
h.Secondary_Tab_BVA= uitab(...
'Parent',h.Secondary_Tab,...
'title','Kinetics',...
'Tag','Secondary_Tab_BVA'...
);
h.Secondary_Tab_Options= uitab(h.Secondary_Tab,...
'title','Options',...
'Tag','Secondary_Tab_DisplayOptions'...
);
h.SecondaryTabOptionsPanel = uibuttongroup(...
'Parent',h.Secondary_Tab_Options,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','SecondaryTabOptionsPanel');
h.Secondary_Tab_Database= uitab(h.Secondary_Tab,...
'title','Database',...
'Tag','Secondary_Tab_Database');
h.DatabaseBB.Panel = uibuttongroup(...
'Parent',h.Secondary_Tab_Database,...
'BackgroundColor', Look.Back,...
'ForegroundColor', Look.Fore,...
'HighlightColor', Look.Control,...
'ShadowColor', Look.Shadow,...
'Units','normalized',...
'Position',[0 0 1 1],...
'Tag','SecondaryTabDatabasePanel');
s.ProgressRatio = 0.25;
%%% jave based right-click menu for uitree implementation
%%% see http://undocumentedmatlab.com/blog/adding-context-menu-to-uitree
% Prepare the context menu (can use HTML labels)
h.AddSpeciesMenuItem = javax.swing.JMenuItem('Add Species');
h.RemoveSpeciesMenuItem = javax.swing.JMenuItem('Remove Species');
h.RenameSpeciesMenuItem = javax.swing.JMenuItem('Rename Species');
h.RemoveFileMenuItem = javax.swing.JMenuItem('Remove File');
h.ExportMenuItem = javax.swing.JMenu('Export...');
h.ExportSpeciesToPDAMenuItem = javax.swing.JMenuItem('Export Species to PDA');
h.ExportMicrotimePattern = javax.swing.JMenuItem('Export Microtime Pattern');
h.DoTimeWindowAnalysis = javax.swing.JMenuItem('Time Window Analysis');
%h.EvsTauConfInt = javax.swing.JMenuItem('E vs. Tau (Conf. Int.)');
%h.FRET2CDEConfInt = javax.swing.JMenuItem('FRET-2CDE Filter (Conf. Int.)');
h.Export_FRET_Hist_Menu = javax.swing.JMenuItem('Export FRET Efficiency Histogram');
h.Export_FRET_Hist_Timeseries_Menu = javax.swing.JMenuItem('Export FRET Efficiency Histogram (Time Series)');
h.SendToTauFit = javax.swing.JMenuItem('Send Selected Species to TauFit');
h.DisplayFileInfo = javax.swing.JMenuItem('Display File Info');
% set callbacks
set(h.AddSpeciesMenuItem,'ActionPerformedCallback',@AddSpecies);
set(h.RemoveSpeciesMenuItem,'ActionPerformedCallback',@RemoveSpecies);
set(h.RenameSpeciesMenuItem,'ActionPerformedCallback',@RenameSpecies);
set(h.RemoveFileMenuItem,'ActionPerformedCallback',@RemoveFile);
set(h.ExportSpeciesToPDAMenuItem,'ActionPerformedCallback',@Export_To_PDA)
set(h.ExportMicrotimePattern,'ActionPerformedCallback',@Export_Microtime_Pattern);
set(h.DoTimeWindowAnalysis,'ActionPerformedCallback',@Time_Window_Analysis);
%set(h.EvsTauConfInt,'ActionPerformedCallback',@Burst_Variance_Analysis);
%set(h.FRET2CDEConfInt,'ActionPerformedCallback',@Burst_Variance_Analysis);
set(h.Export_FRET_Hist_Menu,'ActionPerformedCallback',@Export_FRET_Hist);
set(h.Export_FRET_Hist_Timeseries_Menu,'ActionPerformedCallback',@Export_FRET_Hist);
set(h.SendToTauFit,'ActionPerformedCallback',@Send_To_TauFit);
set(h.DisplayFileInfo,'ActionPerformedCallback',@DisplayFileInfo);
% construct contextmenu
h.SpeciesListMenu = javax.swing.JPopupMenu;
h.SpeciesListMenu.add(h.AddSpeciesMenuItem);
h.SpeciesListMenu.add(h.RemoveSpeciesMenuItem);
h.SpeciesListMenu.add(h.RenameSpeciesMenuItem);
h.SpeciesListMenu.addSeparator;
h.SpeciesListMenu.add(h.RemoveFileMenuItem);
h.SpeciesListMenu.addSeparator;
h.SpeciesListMenu.add(h.SendToTauFit);
h.ExportMenuItem.add(h.Export_FRET_Hist_Menu);
h.ExportMenuItem.add(h.ExportSpeciesToPDAMenuItem);
h.ExportMenuItem.add(h.ExportMicrotimePattern);
h.ExportMenuItem.add(h.Export_FRET_Hist_Timeseries_Menu);
h.SpeciesListMenu.add(h.ExportMenuItem);
h.SpeciesListMenu.add(h.DoTimeWindowAnalysis);
h.SpeciesListMenu.addSeparator;
h.SpeciesListMenu.add(h.DisplayFileInfo);
%%% Define Species List
% new: use uitreenode
%%% read icons
[iconBurst,map] = imread([PathToApp filesep 'images/BurstBrowser/plottype-hist.gif']);
iconBurst = ind2rgb(iconBurst,map);
h.icons.iconBurst = imresize(iconBurst,[16,16]);
h.icons.iconFile = imresize(imread([PathToApp filesep 'images/BurstBrowser/folder.jpg']),[16,16]);
h.icons.iconSpecies = imresize(imread([PathToApp filesep 'images/BurstBrowser/book_sim.jpg']),[16,16]);
h.icons.iconSubspecies = imresize(imread([PathToApp filesep 'images/BurstBrowser/help_rn.jpg']),[16,16]);
h.SpeciesList.Root = uitreenode('v0','internalHandle','Burst Data',[],false);
h.SpeciesList.Root.setIcon(im2java(h.icons.iconBurst));
[h.SpeciesList.Tree, h.SpeciesList.container] = uitree('v0','Root',h.SpeciesList.Root);
set(h.SpeciesList.container,...% 'Parent', h.SecondaryTabSelectionPanel,...
'Parent',h.BurstBrowser,...
'Units','normalize',...
'Position',[0.65 0.03 0.35 0.22]); % fix the uitree Parent
set(h.SpeciesList.Tree,'NodeSelectedCallback',@SpeciesList_ButtonDownFcn);
h.SpeciesList.Tree.getTree.setBackground(java.awt.Color(0.9,0.9,0.9));
% Set the tree mouse-click callback
set(h.SpeciesList.Tree.getTree, 'MousePressedCallback', {@SpeciesListContextMenuCallback,h.SpeciesListMenu});
buttonsize = 20;
offset = 5;
button_posX = (h.SpeciesList.container.Position(1)+0.5*h.SpeciesList.container.Position(3))*h.figure_size(3);
button_posY = 0.245*h.figure_size(4)-buttonsize;
%%% add buttons to species list
h.AddSpecies_Button = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor','white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','AddSpecies_Button',...
'FontSize',12,...
'TooltipString','Add Species',...
'Callback',@AddSpecies);
iconbutton(h.AddSpecies_Button,[PathToApp filesep 'images/BurstBrowser/GreenPlus_12.jpg']);
h.RemoveSpecies_Button = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor','white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+buttonsize+offset button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','RemoveSpecies_Button',...
'FontSize',12,...
'TooltipString','Remove Species',...
'Callback',@RemoveSpecies);
iconbutton(h.RemoveSpecies_Button,[PathToApp filesep 'images/BurstBrowser/status_failed.jpg']);
h.RenameSpecies_Button = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor','white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+2*(buttonsize+offset) button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','RenameSpecies_Button',...
'FontSize',12,...
'TooltipString','Rename Species',...
'Callback',@RenameSpecies);
iconbutton(h.RenameSpecies_Button,[PathToApp filesep 'images/BurstBrowser/cc_sourcecodec.jpg']);
h.Send_to_TauFit_Button = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor','black',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+3*(buttonsize+offset)+10 button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','Send_to_TauFit_Button',...
'FontSize',12,...
'TooltipString','Send selected species to TauFit',...
'Callback',@Send_To_TauFit);
iconbutton(h.Send_to_TauFit_Button,[PathToApp filesep 'images/BurstBrowser/lifetime.jpg']);
h.Export_To_PDA_Button = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor','white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+4*(buttonsize+offset)+10 button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','Export_To_PDA_Button',...
'FontSize',12,...
'TooltipString','Export selected species to PDA',...
'Callback',@Export_To_PDA);
iconbutton(h.Export_To_PDA_Button,[PathToApp filesep 'images/BurstBrowser/plottype-hist.jpg']);
%%% Context menu of multiplot button
% option to toggle normalization, normalization method selection, and
% display of sum of all populations
h.MultiPlotButtonMenu = uicontextmenu;
h.MultiPlotButtonMenu_ToggleDisplayTotal = uimenu(...
h.MultiPlotButtonMenu,...
'Tag','MultiPlotButtonMenu_ToggleDisplayTotal',...
'Label','Display sum of all populations',...
'Callback',@UpdateOptions);
if UserValues.BurstBrowser.Settings.Display_Total_Multiplot
h.MultiPlotButtonMenu_ToggleDisplayTotal.Checked = 'on';
else
h.MultiPlotButtonMenu_ToggleDisplayTotal.Checked = 'off';
end
h.MultiPlotButtonMenu_ToggleNormalize = uimenu(...
h.MultiPlotButtonMenu,...
'Tag','MultiPlotButtonMenu_ToggleNormalize',...
'Label','Normalize populations',...
'Callback',@UpdateOptions);
if UserValues.BurstBrowser.Settings.Normalize_Multiplot
h.MultiPlotButtonMenu_ToggleNormalize.Checked = 'on';
else
h.MultiPlotButtonMenu_ToggleNormalize.Checked = 'off';
end
h.MultiPlotButtonMenu_ChoooseNormalize = uimenu(...
h.MultiPlotButtonMenu,...
'Tag','MultiPlotButtonMenu_ChoooseNormalize',...
'Label','Normalize to...',...
'Callback',[]);
h.MultiPlotButtonMenu_NormalizeArea = uimenu(...
h.MultiPlotButtonMenu_ChoooseNormalize,...
'Tag','MultiPlotButtonMenu_NormalizeArea',...
'Label','area',...
'Callback',@UpdateOptions);
h.MultiPlotButtonMenu_NormalizeMaximum = uimenu(...
h.MultiPlotButtonMenu_ChoooseNormalize,...
'Tag','MultiPlotButtonMenu_NormalizeMaximum',...
'Label','maximum',...
'Callback',@UpdateOptions);
switch UserValues.BurstBrowser.Settings.Normalize_Method
case 'max'
h.MultiPlotButtonMenu_NormalizeMaximum.Checked = 'on';
h.MultiPlotButtonMenu_NormalizeArea.Checked = 'off';
case 'area'
h.MultiPlotButtonMenu_NormalizeMaximum.Checked = 'off';
h.MultiPlotButtonMenu_NormalizeArea.Checked = 'on';
end
%%% Define MultiPlot Button
h.MultiPlotButton = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor', 'white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+3*(buttonsize+offset)+10 button_posY 2.5*buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','MutliPlotButton',...
'TooltipString','Plots multiple species using different colors. Support up to three species.',...
'FontSize',12,...
'Visible','off',...
'Callback',@MultiPlot,...
'Enable','on');
%'String','Plot multiple species',...
iconbutton(h.MultiPlotButton,[PathToApp filesep 'images/BurstBrowser/plot_multiple_icon.png']);
h.MultiselectOnCheckbox = uicontrol(...
'Parent',h.BurstBrowser,...
'Units','pixels',...
'BackgroundColor', 'white',...
'ForegroundColor', Look.Fore,...
'Position',[button_posX+6*(buttonsize+offset)+20 button_posY buttonsize buttonsize],...
'Style','pushbutton',...
'Tag','MultiselectOnCheckbox',...
'FontSize',12,...
'TooltipString','Enable multiselection for plotting',...
'Callback',@UpdateOptions,...
'UserData',0,...
'UIContextMenu', h.MultiPlotButtonMenu);
iconbutton(h.MultiselectOnCheckbox,[PathToApp filesep 'images/BurstBrowser/multiselection.png']);
h.MultiselectOnCheckbox.CData(:,:,[2,3]) = 0;
%%% Cut Table right click menu
h.CutTable_Menu = uicontextmenu;
h.StoreInCutDatabase_Menu = uimenu(...
'Parent',h.CutTable_Menu,...
'Tag','StoreInCutDatabase_Menu',...
'Label','Store in cut database',...
'Callback',@UpdateCutDatabase);
h.ApplyCutsToLoaded_Menu = uimenu(...
'Parent',h.CutTable_Menu,...
'Tag','ApplyCutsToLoaded_Menu',...
'Label','Apply current cuts to all loaded files',...
'Separator','on',...
'Callback',@ApplyCutsToLoaded);
%define the cut table
if ispc
trash_image = ['<html><img src="file:/' PathToApp '/images/trash16p.png"/></html>'];
trash_image = strrep(trash_image,'\','/');
circle_image = ['<html><img src="file:/' PathToApp '/images/BurstBrowser/greencircleicon.gif"/></html>'];
circle_image = strrep(circle_image,'\','/');
zscale_image = ['<html><img src="file:/' PathToApp '/images/BurstBrowser/zscale_square.png"/></html>'];
zscale_image = strrep(zscale_image,'\','/');
else
if verLessThan('MATLAB','9.7')
trash_image = ['<html><img src="file://' PathToApp '/images/trash16p.png"/></html>'];
circle_image = ['<html><img src="file://' PathToApp '/images/BurstBrowser/greencircleicon.gif"/></html>'];
zscale_image = ['<html><img src="file://' PathToApp '/images/BurstBrowser/zscale_square.png"/></html>'];
else % on mac, from 2019b no images can be rendered in the table
trash_image = '<html><font size=4><font color="red"><b>D</b></font></html>';
circle_image = '<html><font size=4><font color="green"><b>A</b></font></html>';
zscale_image = '<html><font size=4><font color="blue"><b>Z</b></font></html>';
end
end
cname = {'<html><font size=4><b>Parameter</b></font></html>','<html><font size=4><b>min</b></font></html>','<html><font size=4><b>max</b></font></html>',circle_image,trash_image,zscale_image};
cformat = {'char','numeric','numeric','logical','logical','logical'};
ceditable = [false,true true true true true];
table_dat = {'','','',false,false,false};
cwidth = {225,80,80,25,25,25};
tooltip = '<html>A: Toggle active status of cut.<br>D: Delete cut.<br>Z: Display false-color image of parameter.</html>';
h.CutTable = uitable(...
'Parent',h.SecondaryTabSelectionPanel,...
'Units','normalized',...
'ForegroundColor',[0,0,0],...
'Position',[0 0.04 1 0.345],...
'BackgroundColor', [Look.Table1;Look.Table2],...
'ForegroundColor', Look.TableFore,...
'Tag','CutTable',...
'RowName',[],...
'ColumnName',cname,...
'ColumnFormat',cformat,...
'ColumnEditable',ceditable,...
'Data',table_dat,...
'ColumnWidth',cwidth,...
'FontSize',12,...
'CellEditCallback',@CutTableChange,...
'UIContextMenu',h.CutTable_Menu,...
'ToolTipString',tooltip);
h.CutTable.Units = 'pixels';
h.CutTable.ColumnWidth{1} = h.CutTable.Position(3)-2*80-2*25-56;
h.CutTable.Units = 'normalized';
%define the parameter selection listboxes
h.ParameterListX = uicontrol(...
'Parent',h.SecondaryTabSelectionPanel,...
'Units','normalized',...
'BackgroundColor', Look.List,...
'ForegroundColor', Look.ListFore,...
'Max',1,...
'Position',[0 0.385 0.5 0.615],...
'Style','listbox',...
'Tag','ParameterListX',...
'Interruptible','off',...
'Enable','on',...
'FontSize',12,...
'KeyPressFcn',@BurstBrowser_KeyPress);%,...
%'Callback',{@ParameterList_ButtonDownFcn,'left'},...
%'ButtonDownFcn',{@ParameterList_ButtonDownFcn,'right'});
h.ParameterListY = uicontrol(...
'Parent',h.SecondaryTabSelectionPanel,...
'Units','normalized',...
'BackgroundColor', Look.List,...
'ForegroundColor', Look.ListFore,...
'Max',1,...
'Position',[0.5 0.385 0.5 0.615],...
'Style','listbox',...
'Tag','ParameterListY',...
'Interruptible','off',...
'Enable','on',...
'FontSize',12);%,...
%'Callback',{@ParameterList_ButtonDownFcn,'left'},...
%'ButtonDownFcn',{@ParameterList_ButtonDownFcn,'right'});
% for right click selection to work, we need to access the underlying
% java object