Home > functions > gui > project_mgr_dir > project_mgr_view_update_builders.m

project_mgr_view_update_builders

PURPOSE ^

update builder name list

SYNOPSIS ^

function project_mgr_view_update_builders(fig)

DESCRIPTION ^

 update builder name list
 [USAGE]
    project_mgr_view_update_builders(<fig>);
 [IN]
    fig : figure handle of project_mgr
 [OUT]
    none

 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 project_mgr_view_update_builders(fig)
0002 % update builder name list
0003 % [USAGE]
0004 %    project_mgr_view_update_builders(<fig>);
0005 % [IN]
0006 %    fig : figure handle of project_mgr
0007 % [OUT]
0008 %    none
0009 %
0010 % Copyright (C) 2011, ATR All Rights Reserved.
0011 % License : New BSD License(see VBMEG_LICENSE.txt)
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 
0024 % load data (@see project_mgr)
0025 data = guidata(fig);
0026 H = data.H; % component handles
0027 
0028 component = [H.add_parm_to_builder_push;
0029              H.add_builder_push;
0030              H.copy_builder_push;
0031              H.remove_builder_push;
0032              H.open_builder_push;
0033              H.builder_popup];
0034 
0035 %
0036 % --- Add builder names to popup listbox
0037 %
0038 builders = cell(0);
0039 Nbuilders = length(data.batch_builders);
0040 for k=1:Nbuilders
0041     bmgr = data.batch_builders{k};
0042     name = vb_batch_mgr_get_name(bmgr);
0043     builders{k,1} = name;
0044 end
0045 
0046 % adjust focus line
0047 no_line = get(H.builder_popup, 'Value');
0048 if no_line < 1
0049     no_line = 1;
0050 elseif no_line > Nbuilders
0051     no_line = Nbuilders;
0052 end
0053 % Component enable/disable
0054 if Nbuilders == 0
0055     set(component, 'Enable', 'off');
0056 else
0057     set(component, 'Enable', 'on');
0058     set(H.builder_popup, 'String', builders);
0059     set(H.builder_popup, 'Value',  no_line);
0060 end

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