34 lines
894 B
Matlab
34 lines
894 B
Matlab
function[session] = patternBuilder(session)
|
|
|
|
pbfig = figure;
|
|
pbevents = figure;
|
|
|
|
jList = java.util.ArrayList;
|
|
j=0;
|
|
for i = 1:length(session.events_)
|
|
if (strmatch('MSG', session.events_{i}))
|
|
jList.add(j,['<html><font name="Verdana" size=1><b>' session.events_{i} '</b></font></html>']);
|
|
j=j+1;
|
|
end
|
|
end
|
|
|
|
jCBList = com.mathworks.mwswing.checkboxlist.CheckBoxList(jList);
|
|
jScrollPane = com.mathworks.mwswing.MJScrollPane(jCBList);
|
|
posfig = get(gcf, 'Position');
|
|
posfig(1) = 0;
|
|
set(pbevents, 'Position', posfig);
|
|
|
|
posfig(1) = posfig(3)+10;
|
|
set(pbfig, 'Position' , posfig);
|
|
[jhCBList,hContainer] = javacomponent(jScrollPane,[20,20,posfig(3)-40,posfig(4)-40],gcf);
|
|
set(jCBList, 'ValueChangedCallback', @session.plotTrialBasedonPattern);
|
|
set(jCBList, 'Tag', 'msg_events');
|
|
jCBModel = jCBList.getCheckModel;
|
|
jCBModel.uncheckAll;
|
|
jCBModel.checkIndex(1);
|
|
|
|
|
|
get(jCBList, 'Tag')
|
|
|
|
|