www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/+xregbdrygui/BdryViewList.m

    classdef BdryViewList < mbcgui.multiview.ViewList
    %xregbdrygui.BdryViewList class
    %   xregbdrygui.BdryViewList extends mbcgui.multiview.ViewList.
    %
    %    xregbdrygui.BdryViewList properties:
    %       ConstructorFcns - Property is of type 'MATLAB array' (read only)
    %       Labels - Property is of type 'MATLAB array' (read only)
    %       IconFiles - Property is of type 'MATLAB array' (read only)
    %       Descriptions - Property is of type 'MATLAB array' (read only)
    %       MaxRecommended - Property is of type 'MATLAB array' (read only)
    
    % Copyright 2005-2015 The MathWorks, Inc. and Ford Global Technologies, Inc.
    
    methods  % constructor block
        function obj = BdryViewList( varargin )
        % XREGBDRYGUI.BDRYVIEWLIST class constructor
        
        % Check the extensions package for extra views
        e = mbcextensions.Extensions.Model;
        % Get unique extra views
        [~, index] = unique( cellfun( @func2str, ...
            {e.BoundaryEditorViews.Constructor}, 'UniformOutput', false ) );
        index = sort( index );
        % Need to extract the views structure because MATLAB doesn't currently
        % dispatch from UDD correctly
        validBdryViews = e.BoundaryEditorViews(index);
        
        %  CONSTRUCTORS  :  Cell array of construction functions, one for each
        %                   view.  A construction function must be either a string
        %                   or a function handle to a function that accepts
        %                   arguments in the standard component Property-Value
        %                   syntax, and returns a handle to a View object.
        %
        %  LABELS        :  Cell array of strings that are suitable for placing on
        %                   a menu item that creates the view.  A preferred
        %                   mnemonic character should be included in the string,
        %                   although the mnemonic may be altered if it clashes with
        %                   another view.
        %
        %  ICONS         :  Cell array of strings that contains the full path of a
        %                   (16-by-16) icon that can be used to represent the view
        %                   on a toolbar button.
        %
        %  DESCRIPTIONS  :  Cell array of strings that are suitable for using as
        %                   tooltip descriptions for the view's toolbar button.
        %                   This may be left empty.
        %
        %  MAXVIEW       :  Vector of numbers that are >=1, one for each view. This
        %                   number defines the maximum number of views that it is
        %                   useful for a user to have open at once.  Specify inf if
        %                   you do not want to think about this.
        views = {
            % CONSTRUCTORS,                        LABELS,                  ICONS,             DESCRIPTIONS,     MAXVIEW
            @xregbdrygui.BdrySlice1               '&1D Slice',             'bdry1Dgraph.bmp'  '1D Slice'             Inf
            @xregbdrygui.BdrySlice2               '&2D Slice',             'bdry2Dgraph.bmp'  '2D Slice'             Inf
            @xregbdrygui.BdrySlice3               '&3D Slice',             'bdry3Dgraph.bmp'  '3D Slice'             Inf
            @xregbdrygui.BdryPairwiseProjections  '&Pairwise Projections', 'bdryPairwise.bmp' 'Pairwise Projections' 1
            @xregbdrygui.DataView4                '&4D Data',              '4dscatter.bmp'    '4D Data Projection'   1
            };
        
        % Form full paths for icons
        for i = 1:size( views, 1 )
            views{i,3} = fullfile( xregrespath, views{i,3} );
        end
        % Add the extensions
        if ~isempty( validBdryViews ),
            views = [views; struct2cell( validBdryViews ).'];
        end
        
        struct( ...
            'Constructor', {}, ...
            'MenuLabel', {}, ...
            'Icon', {}, ...
            'Description', {}, ...
            'MaxRecommended', {} );
        
        % Call the inherited constructor
        obj@mbcgui.multiview.ViewList(views( :, 1 ),views( :, 2 ),views( :, 3 ),views( :, 4 ),[ views{ :, 5 } ]); % converted super class constructor call
        
        end
        
        
        
        
    end  % constructor block
end  % classdef