www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtradeoffgui/@tradeoffInfoBarView/tradeoffInfoBarView.m
function obj = tradeoffInfoBarView(varargin) %TRADEOFFINFOBARVIEW Constructor for tableTableView object % % OBJ = TRADEOFFINFOBARVIEW(PROP, VALUE, ...) creates an object that % displays information for the currently selected selection of the % tradeoff. % Copyright 2000-2010 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin && isa(varargin{1}, 'cgtradeoffgui.tradeoffInfoBarView') obj = varargin{1}; varargin(1) = []; else obj = cgtradeoffgui.tradeoffInfoBarView; end % Call the inherited constructor obj.View(varargin{:}); hPanel = mbcgui.container.layoutpanel(... 'Parent', obj.Parent, ... 'Visible', obj.Visible, ... 'Position', obj.Position, ... 'BorderType', 'beveledout'); hTableLabel = i_maketext(hPanel, 'Table:', 'right'); hFillLabel = i_maketext(hPanel, 'Filled by:', 'right'); obj.hTableName = i_maketext(hPanel, '', 'left'); obj.hFillName = i_maketext(hPanel, '', 'left'); hSelectedLabel = i_maketext(hPanel, 'Selected cell:', 'left'); obj.hInputString = i_maketext(hPanel, '', 'left'); div = xregGui.dividerline('parent', hPanel, ... 'Orientation', 'vertical'); hGrid = xreggridbaglayout(hPanel, ... 'packgroup', 'XREG_PERM_ON', ... 'dimension', [5 5], ... 'rowsizes', [3 15 3 15 -1], ... 'colsizes', [45 100 2 150 -1], ... 'gapx', 5, ... 'border', [5 2 5 2], ... 'mergeblock', {[1 5], [3 3]}, ... 'mergeblock', {[2 2], [4 5]}, ... 'mergeblock', {[4 4], [4 5]}, ... 'elements', {[], hTableLabel, [], hFillLabel, [], ... [], obj.hTableName, [], obj.hFillName, [], ... div, [], [], [], [], ... [], hSelectedLabel, [], obj.hInputString}); set(hPanel, 'LayoutComponent', {hGrid}); obj.Display = hPanel; % Hook up to the message service if it exists if ~isempty(obj.MessageService) obj.pPostSetMessageService; end function hText = i_maketext(hP, string, align) hText = mbcgui.widget.Label('Parent', hP, ... 'String', string, ... 'HorizontalAlignment', align);