www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgtools/@normcomp/normcomp.m

    function obj = normcomp(varargin)
%NORMCOMP Constructor for pane which evaluates breakpoint choices against a model
%
%  obj = NORMCOMP(PROP, VALUE)

%  Copyright 2000-2015 The MathWorks, Inc. and Ford Global Technologies, Inc.


if nargin && isa(varargin{1}, 'cgtools.normcomp')
    obj = varargin{1};
    varargin(1) = [];
else
    obj = cgtools.normcomp;
end

% Call the inherited constructor
abstractlayoutcomponent(obj, varargin{:});

% Axes and plot type combo box
axeslayout = mbcgui.container.layoutpanel(...
    'Parent', obj.Parent, ...
    'Visible', obj.Visible, ...
    'BorderType', 'beveledin');
obj.ComparisonPane = cgtools.comparisonpane('Parent', axeslayout);
obj.ComparisonPane.setDataNames('Generated Table','Model');
set(axeslayout, 'LayoutComponent', obj.ComparisonPane);

plottypelayout = mbcgui.container.layoutpanel(...
    'Parent', obj.Parent, ...
    'Visible', obj.Visible, ...
    'BorderType', 'etchedin', ...
    'LayoutBorder', [3 5 3 5]);
plottypecombo = obj.ComparisonPane.createComboController(...
    'Parent', plottypelayout, 'Visible', 'on');
cblabel = xregGui.labelcontrol('parent',plottypelayout,...
    'LabelAlignment','left','gap',5,...
    'control',plottypecombo,...
    'ControlSize',180,...
    'string',' Plot type:');
set(plottypelayout, 'LayoutComponent', {cblabel});


% table of inputs
tablelayout = mbcgui.container.titlebarpanel(...
    'Parent', obj.Parent, ...
    'Visible', obj.Visible, ...
    'BarTitle', 'Feature and Model Inputs');
obj.ValueTable = mbcwidgets.VariableEditorTable('parent', tablelayout, ...
    'valuechangedcallback', {@i_EditTable,obj}, ...
    'ValueConstraint', 'plot');
obj.ValueTable.Peer.setBorder([]);
set(tablelayout,'ContentHandle',obj.ValueTable);

% error stats
errorlayout = mbcgui.container.titlebarpanel(...
    'Parent', obj.Parent, ...
    'Visible', obj.Visible, ...
    'BarTitle', 'Error Statistics for Graph');
obj.Stats = mbcgui.table.InfoPane('Parent', errorlayout, ...
    'SplitPosition', 0.7);
set(errorlayout, 'ContentHandle',obj.Stats);

obj.Display = xreggridbaglayout(obj.Parent,...
    'dimension',[3,2],...
    'colsizes',[250,-1],...
    'rowsizes',[36,-1,72],...
    'gap',2, ...
    'mergeblock',{[1 3],[2 2]},...
    'position', obj.Position, ...
    'elements',{plottypelayout, tablelayout, errorlayout, axeslayout});



function i_EditTable(~,~,obj)
obj.pPlotSurface;