www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@comparisonpane/pUpdateControllerValues.m

    function pUpdateControllerValues(obj)
%PUPDATECONTROLLERVALUES Synchronize all controllers with the current PlotType
%
%  PUPDATECONTROLLERVALUES(OBJ) updates all of the PlotType controllers so
%  that they correctly reflect the current setting of the PlotType
%  property.

%  Copyright 2000-2013 The MathWorks, Inc. and Ford Global Technologies, Inc.


Remove = false(size(obj.PlotTypeControllers));
for n = 1:length(obj.PlotTypeControllers)
    if isa(obj.PlotTypeControllers{n}, 'xregGui.rbgroup')
        set(obj.PlotTypeControllers{n}, 'Selected', obj.PlotType);
    elseif isgraphics(obj.PlotTypeControllers{n})
        set(obj.PlotTypeControllers{n}, 'Value', obj.PlotType);
    else
        Remove(n) = true;
    end
end
obj.PlotTypeControllers(Remove) = [];