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

    function obj = inputlist(varargin)
%INPUTLIST Constructor for the input list object.
%
%  OBJ = INPUTLIST(FIG) creates an object which is the panel in the surface
%  viewer application in which variables and parameters can be changed.

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


obj = cgsurfview.inputlist;
abstractlayoutcomponent(obj, varargin{:});

obj.StoreGUID = guidarray(1);

panel = mbcgui.container.titlebarpanel(...
    'Parent', obj.Parent, ...
    'Visible', obj.Visible, ....
    'BarTitle', 'Inputs');
obj.hTable = mbcwidgets.VariableEditorTable(...
    'parent', panel, ...
    'visible', obj.Visible, ...
    'ValueConstraint', 'plot', ...
    'ValueChangedCallback', {@i_EditTable,obj});
obj.hTable.Peer.setBorder([]);

obj.hPanel = mbcgui.container.layoutpanel(...
    'Parent', panel, ...
    'Visible', obj.Visible, ...
    'BorderType', 'beveledout');

obj.hAxeslayout = xreggridbaglayout(obj.hPanel, ...
    'packstatus','off', ...
    'gapy', 5, ...
    'border', [5 5 5 5]);
set(obj.hPanel, 'LayoutComponent', {obj.hAxeslayout});

obj.hLayout = xreggridbaglayout(panel, ...
    'dimension', [2 1], ...
    'rowsizes', [0 -1], ...
    'elements', {obj.hPanel, obj.hTable});

set(panel,'ContentHandle',{obj.hLayout});
obj.Display = panel;

obj.hInputListListeners = obj.addPropertyListeners( ...
    {'AxisNames', 'Inputs', 'Variables'}, ...
    {@i_refresh, @i_refresh, @i_refresh});



function i_refresh(obj, ~)
obj.update;


function i_EditTable(~,evt,obj)
obj.pGetFromTable(evt.data.Rows);