www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@xregGui/@sharedAxisHeader/setTableData.m
function setTableData(obj, R, C, data) %SETTABLEDATA Table drawing interface function % % SETTABLEDATA(OBJ, ROW, COL, DATA) where DATA should be a structure % containing the fields Limits, Value and Label. % Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc. if isa(data, 'mbcwidgets.scrollTableData') % Use standard interface to get the structure of information if R==0 data = data.getStandardColumnHeaderData(C); else data = data.getStandardRowHeaderData(R); end end if (data.Value < data.Limits(1)) || (data.Value > data.Limits(2)) val = NaN; else val = data.Value; end set(obj, 'Label', data.Label, ... 'Value', val); obj.setLimits(data.Limits(1), data.Limits(2)); if isfield(data, 'Color') obj.BackgroundColor = data.Color; end