www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcwidgets/@factorselector3d/factorselector3d.m

    function obj = factorselector3d(varargin)
%FACTORSELECTOR3D constructor for the abstractDataView object
%
%  OBJ = FACTORSELECTOR3D
%  OBJ = FACTORSELECTOR3D(OBJ)
%  OBJ = FACTORSELECTOR3D('Property', Value)

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


% Is the first input argument a udd object derived from me? If it is then
% we are being called as a super class constructor and don't have to
% construct an object
if nargin && isa(varargin{1}, 'mbcwidgets.factorselector3d')
   obj = varargin{1};
   varargin(1) = [];
else
    obj = mbcwidgets.factorselector3d;
end

% Look to see if axes are required.
boolAxesInput = strcmp(varargin, 'HasAxes');
idxAxesInput = find(boolAxesInput);
if isempty(idxAxesInput)
    HasAxes = true;
else
    HasAxes = varargin{idxAxesInput(1) + 1};
    varargin([idxAxesInput, idxAxesInput + 1]) = [];
end

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

% Create the display
obj.pCreateDisplay(HasAxes);

% Set up property listeners
obj.addPropertyListeners( ...
    { ...
        'Factors', ...
        'SelectionType', ...
        'UIContextMenu' ...
        'BackgroundColor', ...
    }, ...
    { ...
        @pPostSetFactors, ...
        @pPostSetSelectionType, ...
        @pPostSetUIContextMenu, ...
        @pPostSetBackgroundColor, ...
    } ...
    );

% Assume that we might have had some factors in the constructor
obj.pPostSetFactors;