Home > functions > gui > bm_editor > bm_edit_app > bm_edit_app_update_history_listbox.m

bm_edit_app_update_history_listbox

PURPOSE ^

update history listbox

SYNOPSIS ^

function [obj] = bm_edit_app_update_history_listbox(obj)

DESCRIPTION ^

 update history listbox
 [USAGE]
    [obj] = bm_edit_app_update_history_listbox(<obj>);
 [IN]
    obj : bm_edit_app object
 [OUT]
    obj : bm_edit_app object

 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 [obj] = bm_edit_app_update_history_listbox(obj)
0002 % update history listbox
0003 % [USAGE]
0004 %    [obj] = bm_edit_app_update_history_listbox(<obj>);
0005 % [IN]
0006 %    obj : bm_edit_app object
0007 % [OUT]
0008 %    obj : bm_edit_app object
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('obj', 'var'), error('obj is a required parameter.'); end
0017 if ~strcmp(obj.class_type, 'bm_edit_app')
0018     error('class type is invalid.');
0019 end
0020 
0021 %
0022 % --- Main Procedure
0023 %
0024 H = guihandles(obj.h);
0025 
0026 selected_index = get(H.brain_model_list_listbox, 'value');
0027 all_index = bm_manager_get_bm_list_index(obj.bmm);
0028 
0029 if length(selected_index) == 1 && ~isempty(all_index)
0030     [description_cell, parm_cell] = bm_manager_get_history( obj.bmm, ...
0031                                                             selected_index);
0032     % Set history to history_listbox
0033     set(H.history_listbox, 'String', description_cell);
0034 
0035     % Set history parameter to execution parameter window
0036     index_no = get(H.history_listbox, 'value');
0037     parm = parm_cell{index_no};
0038     if ~isempty(parm)
0039         parm_str = vb_struct2str(parm);
0040     else
0041         parm_str = [];
0042     end
0043     % history list, history detail enable on
0044     set(H.history_edit,    'String', parm_str);
0045     set(H.history_listbox, 'Enable', 'on');
0046     set(H.history_edit,    'Enable', 'on');
0047 else
0048     % history list, history detail enable off
0049     set(H.history_listbox, 'String', '');
0050     set(H.history_edit,    'String', '');
0051     set(H.history_listbox, 'Enable', 'off');
0052     set(H.history_edit,    'Enable', 'off');
0053 end
0054 
0055 %
0056 % --- After check
0057 %
0058 if nargout ~= 1
0059     error('function caller should receive obj.');
0060 end

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