www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@ColorBar/pDoLayout.m
function pDoLayout(obj) %PDOLAYOUT Set up the layout. % % PDOLAYOUT(OBJ) creates the correct layout for the object. % Copyright 2005-2010 The MathWorks, Inc. if ~isempty(obj.Display) oldL = obj.Display; set(oldL, 'elements', {}); delete(oldL); end if obj.RangeEditable L = xreggridbaglayout(obj.Parent, ... 'Position', obj.Position, ... 'dimension',[4 1], ... 'rowsizes',[20 10 -1 20], ... 'gapy', 8,... 'elements',{obj.hMax, [], obj.hAxesPanel, obj.hMin}); set([obj.hMax, obj.hMin], 'Visible', obj.Visible); else % Ignore the range editors. set([obj.hMax, obj.hMin], 'Visible', 'off'); L = xreglayerlayout(obj.Parent, ... 'Position', obj.Position, ... 'elements',{obj.hAxesPanel}); end obj.Display = L;