www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/+xregdesgui/DesignView4d.m

    classdef DesignView4d < xregdesgui.DesignProjView
    %xregdesgui.DesignView4d class
    %   xregdesgui.DesignView4d extends xregdesgui.DesignProjView.
    %
    %    xregdesgui.DesignView4d properties:
    %       Parent - Property is of type 'MATLAB array'
    %       Position - Property is of type 'rect'
    %       Enable - Property is of type 'on/off'
    %       Visible - Property is of type 'on/off'
    %       UserData - Property is of type 'MATLAB array'
    %       Tag - Property is of type 'string'
    %       MessageService - Property is of type 'handle'
    %       Options - Property is of type 'handle vector'
    %       Actions - Property is of type 'handle vector'
    %       UIContextMenu - Property is of type 'MATLAB array'
    %
    %    xregdesgui.DesignView4d methods:
    %       createDisplay - Create the graph object for the view
    %       gettitle - Return a suitable title for a window
    
    %  Copyright 2015 The MathWorks, Inc. and Ford Global Technologies, Inc.
    
    methods  % constructor block
        function obj = DesignView4d(varargin)
        %DESIGNVIEW4D Constructor for DesignView4d
        %  OBJ = DESIGNVIEW4D(PROP, VALUE, ...)
        
        obj@xregdesgui.DesignProjView(varargin{ : }); % converted super class constructor call
        
        % Add an option for editing the colormap
        A =mbcgui.actions.StatefulAction({@i_editcmap, obj}, 'Edit Color&map...', 'Edit view colormap');
        obj.Options.Actions = [obj.Options.Actions; A];
        end  % DesignView4d
        
    end  % constructor block
    
    methods  % public methods
        %----------------------------------------
        function G = createDisplay(obj)
        %CREATEDISPLAY Create the graph object for the view
        %  G = CREATEDISPLAY(OBJ) creates the nD graph object that is used for the
        %  display.
        
        G = mvgraph4d(obj.Parent, ...
            'visible', obj.Visible, ...
            'position', obj.Position, ...
            'frame','off', ...
            'factorselection','exclusive');
        
        end  % createDisplay
        
        %----------------------------------------
        function s = gettitle(obj) %#ok<MANU>
        %GETTITLE Return a suitable title for a window
        %  GETTITLE(OBJ) returns a string that can be used as a title for the view.
        
        s = '4D Design Projection';
        
        end  % gettitle
        
    end  % public methods
    
end  % classdef

function i_editcmap(~, ~, obj)
cmapgui(obj.GObject);
end  % i_editcmap