0001 function vb_batch_list_update_concrete_parm_listbox(fig)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 if ~exist('fig', 'var') || isempty(fig) || ~ishandle(fig)
0017 error('invalid figure handle is specified.');
0018 end
0019
0020
0021
0022
0023 data = guidata(fig);
0024
0025
0026 ix_main = get(data.H.concrete_parm_id_listbox, 'Value');
0027 Nparm = vb_batch_mgr_get_num_of_parm(data.bmgr, ix_main);
0028
0029
0030 listbox_str = cell(0);
0031 for k=1:Nparm
0032 ix_sub = k;
0033 [parm, parm_type] = vb_batch_mgr_get_parm(data.bmgr, ix_main, ix_sub);
0034 listbox_str{k, 1} = parm_type;
0035 end
0036
0037
0038 line_no = get(data.H.concrete_parm_listbox, 'Value');
0039 if Nparm < 1
0040 line_no = 1;
0041 elseif line_no > Nparm
0042 line_no = Nparm;
0043 end
0044 set(data.H.concrete_parm_listbox, 'String', listbox_str);
0045 set(data.H.concrete_parm_listbox, 'Value', line_no);
0046
0047
0048 components = [data.H.concrete_parm_upper_push;
0049 data.H.concrete_parm_lower_push;
0050 data.H.concrete_parm_remove_push;
0051 data.H.concrete_parm_copy_push;
0052 data.H.concrete_parm_edit_push];
0053 if Nparm
0054 set(components, 'Enable', 'on');
0055 else
0056 set(components, 'Enable', 'off');
0057 end