view m-toolbox/classes/@modelViewer/cb_selectModel.m @ 23:a71a40911c27
database-connection-manager
Update check for repository connection parameter in constructors
author |
Daniele Nicolodi <nicolodi@science.unitn.it> |
date |
Mon, 05 Dec 2011 16:20:06 +0100 (2011-12-05) |
parents |
f0afece42f48 |
children |
|
line source
% CB_SELECTMODEL callback fires when the user selects a model.
%
% M Hewitson
%
% $Id: cb_selectModel.m,v 1.4 2008/12/09 07:22:36 hewitson Exp $
%
function cb_selectModel(varargin)
myh = varargin{1};
mainfig = varargin{end};
% check model type
h = findobj(mainfig.handle, 'Tag', 'ModelTypeSelect');
mtypes = get(h, 'String');
mtype = mtypes{get(h, 'Value')};
% Get selected model
val = get(myh, 'Value');
models = get(myh, 'String');
model = models{val};
% draw parameters panel for this model
switch mtype
case 'ao'
pl = feval(['ao_model_' model], 'PLIST');
% pl = ii.plists(1);
desc = feval('help', ['ao_model_' model])
case 'ssm'
ii = ssm.getInfo('ssm', 'From Built-in Model');
pl = ii.plists(1);
pl.remove('built-in');
desc = feval('help', ['ssm_model_' model])
end
ppan = findobj(mainfig.handle, 'Tag', 'MODELVIEWERparamspanel');
modelViewer.buildParamsPanel(ppan, pl);
dtxt = findobj(mainfig.handle, 'Tag', 'MODELVIEWERmodeldescription');
set(dtxt, 'String', desc);
set(dtxt, 'TooltipString', desc);
end