www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgdatasetgui/@DatasetList/refresh.m
function refresh(obj) %REFRESH Update the gui list % % REFRESH(OBJ) redraws the list of displayed dataset pointers. % Copyright 2005 The MathWorks, Inc. obj.pUpdateDatasetPointers; oppts = infoarray(obj.DatasetPointers); data = cell(length(oppts), 3); data(:,1) = cellfun(@getname, oppts, 'UniformOutput', false); data(:,2) = cellfun(@(x) get(x, 'numpoints'), oppts, 'UniformOutput', false); data(:,3) = cellfun(@i_getcontentstring, oppts, 'UniformOutput', false); ic = repmat({'cgdatasetnode.bmp'}, 1, length(oppts)); obj.Display.Peer.setData(data, ic); obj.pRefreshSelection; function str = i_getcontentstring(oppt) names = get(oppt, 'factors'); if isempty(names) str = ''; else str = sprintf('%s, ', names{:}); str = str(1:end-2); end