Home > vbmeg > functions > gui > project_mgr_dir > project_mgr_view_update.m

project_mgr_view_update

PURPOSE ^

update view of project_mgr gui.(after data loading, deleting...)

SYNOPSIS ^

function project_mgr_view_update(fig)

DESCRIPTION ^

 update view of project_mgr gui.(after data loading, deleting...)
 [USAGE]
    project_mgr_view_update(fig);
 [IN]
    fig : figure handle of project_mgr_gui.
 [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(fig)
0002 % update view of project_mgr gui.(after data loading, deleting...)
0003 % [USAGE]
0004 %    project_mgr_view_update(fig);
0005 % [IN]
0006 %    fig : figure handle of project_mgr_gui.
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 project_mgr_gui_reset(fig);
0029 
0030 % figure title update
0031 project_file = project_file_mgr('get_project_file');
0032 set(H.figure, 'Name', ['project_mgr - ' project_file]);
0033 
0034 % project setting update
0035 project_name = project_file_mgr('get_project_name');
0036 project_root = project_file_mgr('get_project_root');
0037 set(H.project_root_edit, 'String', project_root);
0038 set(H.project_name_edit, 'String', project_name);
0039 set(H.dataimport_menu, 'Enable', 'on');
0040 set(H.analysis_menu, 'Enable', 'on');
0041 set(H.output_history_menu, 'Enable', 'on');
0042 
0043 % get parameters and set to gui
0044 [all_parms, parm_types] = project_file_mgr('get_all_parameters');
0045 Nparm = length(all_parms);
0046 listbox_lines = cell(0);
0047 func_name = [];
0048 for k=1:Nparm
0049     func_name = ...
0050         vb_judge_function_name(all_parms{k}, parm_types{k});
0051 
0052     parm_name_disp = get(H.parm_name_checkbox, 'Value');
0053     func_name_disp = get(H.func_name_checkbox, 'Value');
0054 
0055     if parm_name_disp
0056         parm_type = parm_types{k};
0057     else
0058         parm_type = [];
0059     end
0060 
0061     if ~func_name_disp
0062         func_name = [];
0063     end
0064 
0065     if parm_name_disp && func_name_disp
0066         sep = ' / ';
0067     else
0068         sep = ' ';
0069     end
0070 
0071     listbox_lines{k} = [ all_parms{k}.time_stamp, ' ' func_name sep parm_type ];
0072 end
0073 set(H.history_listbox, 'String', listbox_lines);
0074 
0075 % Activate button status for 'Add to batch builder'
0076 if Nparm > 0
0077     set(H.add_parm_to_builder_push, 'Enable', 'on');
0078 else
0079     set(H.add_parm_to_builder_push, 'Enable', 'off');
0080 end
0081 
0082 project_mgr_view_update_builders(fig);
0083 
0084 % Parameter view window update
0085 project_mgr_callback(fig, H.history_listbox);

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005