www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@scrollTable/paintRows.m
function paintRows(obj, R) %PAINTROWS Refresh specified rows % % PAINTROWS(OBJ, R) forces a repaint of the specified rows. If the rows % are not currently visible, nothing will be done. % Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc. if obj.canPaint % Filter out rows that are not displayed R = R((R >= obj.CurrentRow) & (R < (obj.CurrentRow + obj.numRows))); % Paint rows and row headers for n = 1:length(R) obj.paintObjects(obj.MainObjects(R(n)-obj.CurrentRow+1, :), ... obj.indexData(obj.MainData, R(n), R(n), obj.CurrentColumn, (obj.CurrentColumn + obj.numCols - 1)), ... R(n), obj.CurrentColumn) if obj.ShowRowHeaders obj.paintObjects(obj.RowHeaderObjects(R(n)-obj.CurrentRow+1), ... obj.indexData(obj.RowHeaderData, R(n), R(n)), ... R(n), 0); end end end