www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@factorselector2d/pPostSetFactors.m

    function pPostSetFactors(obj, event)
%PPOSTSETFACTORS A short description of the function
%
%  PPOSTSETFACTORS(OBJ, EVENT)
%  

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



% NOTE - factors will always be a cell array of strings as this is what a
% string vector is!

% Amalgamate the popups for simplicity
popups = [obj.XFactorPopup ; obj.YFactorPopup];

% Is factors a sensible setting for the popups
if isempty(obj.factors)
    popupStrings = ' ';
    enablePopups = 'off';
else
    popupStrings = obj.factors;
    enablePopups = 'on';
end    

% Need to ensure that the popups have at least a string in them - so
% initialy reset both values to 1
set(popups, 'String', popupStrings, 'Value', 1, 'Enable', enablePopups);

% Ensure exclusivity is dealt with
obj.pCheckExclusivity;

% Update the output variables
obj.pSetOutputFactors;