www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/+mbcgui/+widget/@ScrollTable/paintColumns.m
function paintColumns(obj, C) %PAINTCOLUMNS Refresh specified columns % % PAINTCOLUMNS(OBJ, C) forces a repaint of the specified columns. If the % columns are not currently visible, nothing will be done. % Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc. if obj.canPaint % Filter out columns that are not displayed C = C((C >= obj.CurrentColumn) & (C < (obj.CurrentColumn + obj.numCols))); % Paint columns and column headers for n = 1:length(C) obj.paintObjects(obj.MainObjects(:, C(n)-obj.CurrentColumn+1), ... obj.MainData, ... obj.CurrentRow, C(n)) if obj.ShowColumnHeaders obj.paintObjects(obj.ColumnHeaderObjects(C(n)-obj.CurrentColumn+1), ... obj.ColumnHeaderData, ... -1, C(n)); end end end