www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@toGVRowHeader/toGVRowHeader.m
function obj = toGVRowHeader(varargin) %TOGVROWHEADER Constructor for toGVRowHeader % % OUT = TOGVROWHEADER(PROP, VAL) creates a new instance of a % toGVRowHeader. This object is designed to be used as the row header in % the tradeoff grid of graphs. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin && isa(varargin{1}, 'cgtradeoffgui.toGVRowHeader') obj = varargin{1}; varargin(1) = []; else obj = cgtradeoffgui.toGVRowHeader; end % Call the inherited constructor abstractlayoutcomponent(obj, varargin{:}); obj.hBorder = mbcgui.container.layoutpanel(... 'Parent', obj.Parent,... 'Visible', obj.Visible, ... 'Position', obj.Position, ... 'BorderType','beveledout'); grid = xreggridbaglayout(obj.hBorder, ... 'dimension', [2 2], ... 'colsizes', [-1 30], ... 'rowsizes', [30 -1], ... 'border', [4 9 2 9], ... 'mergeblock', {[1 2], [2 2]}); set(obj.hBorder, 'LayoutComponent', {grid}); obj.pSwitchDisplay; obj.pSwitchWideDisplay; obj.Display = obj.hBorder; obj.addPropertyListeners( ... {'ShowAxis', ... 'WideHeaderMode'}, ... {@i_switchshowaxis, ... @i_switchwidemode}); function i_switchshowaxis(src, evt) obj = evt.AffectedObject; obj.pSwitchDisplay; function i_switchwidemode(src, evt) obj = evt.AffectedObject; obj.pSwitchWideDisplay;