www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@tradeoffGraphView/pUpdateHighlight.m
function pUpdateHighlight(obj) %PUPDATEHIGHLIGHT Update the highlight setting % % PUPDATEHIGHLIGHT(OBJ) updates the current highlight setting in the data % model % Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc. if ~isempty(obj.MessageService) ... && ~isempty(obj.MessageService.CurrentTradeoff) ... && ~isempty(obj.MessageService.CurrentTable) pTO = obj.MessageService.CurrentTradeoff; pT = obj.MessageService.CurrentTable; dm = obj.hDataModel; % Find the current table's fill item in the list of inputs or % outputs pFill = pTO.getFillExpression(pT); if ~isnull(pFill) idx = find(obj.MessageService.TradeoffServices.pInputs==pFill); if ~isempty(idx) dm.HighLightedColumn = idx; dm.HighLightedRow = 0; else dm.HighLightedColumn = 0; idx = find(obj.OutputsCache==pFill); if ~isempty(idx) dm.HighLightedRow = idx; else dm.HighLightedRow = 0; end end else dm.HighLightedRow = 0; dm.HighLightedColumn = 0; end else dm.HighLightedRow = 0; dm.HighLightedColumn = 0; end