Home > functions > gui > batch > batch_list > vb_batch_list_update_concrete_parm_listbox.m

vb_batch_list_update_concrete_parm_listbox

PURPOSE ^

update concrete parameter listbox

SYNOPSIS ^

function vb_batch_list_update_concrete_parm_listbox(fig)

DESCRIPTION ^

 update concrete parameter listbox

 [USAGE]
    vb_batch_list_update_concrete_parm_listbox(<fig>);
 [IN]
    fig : figure handle

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vb_batch_list_update_concrete_parm_listbox(fig)
0002 % update concrete parameter listbox
0003 %
0004 % [USAGE]
0005 %    vb_batch_list_update_concrete_parm_listbox(<fig>);
0006 % [IN]
0007 %    fig : figure handle
0008 %
0009 % Copyright (C) 2011, ATR All Rights Reserved.
0010 % License : New BSD License(see VBMEG_LICENSE.txt)
0011 
0012 
0013 %
0014 % --- Previous check
0015 %
0016 if ~exist('fig', 'var') || isempty(fig) || ~ishandle(fig)
0017     error('invalid figure handle is specified.');
0018 end
0019 
0020 %
0021 % --- Main Procedure
0022 %
0023 data = guidata(fig);
0024 
0025 % get the number of parameters in the selected parameter set.
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 % set parameter type to listbox
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 % Ajust selected line number
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 % Enable/Disable components
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

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005