www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@tradeoffMessageService/notifyTradeoffGraphChange.m

    function notifyTradeoffGraphChange(obj, reason)
%NOTIFYTRADEOFFGRAPHCHANGE Fire the TradeoffGraphSettingsChanged event
%
%  NOTIFYTRADEOFFGRAPHCHANGE(OBJ) fires the "TradeoffGraphSettingsChanged"
%  event which is used to notify users that the settings for tradeoff
%  graphs have been altered.
%
%  NOTIFYTRADEOFFGRAPHCHANGE(OBJ, REASON) allows you to further specify the
%  setting that has been altered.  This is passed to listeners in the
%  SettingChanged field of the event data.  Valid settings for this are
%  'ylim', 'constraints' and 'errors'.

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


if nargin<2
    reason = '';
else
    % Check the reason is valid
    if ~any(strcmp(reason, {'ylim', 'constraints', 'errors'}));
        error(message('mbc:cgtradeoffgui:tradeoffMessageService:InvalidArgument'));
    end
end
s = struct('SettingChanged', reason);
data = xregGui.xregEventData(obj, 'TradeoffGraphSettingsChanged', s);
obj.send('TradeoffGraphSettingsChanged', data);