www.gusucode.com > mbcguitools 工具箱 matlab 源码程序 > mbcguitools/@mbcmultiview/@View/createDefaultWindowContainer.m

    function hPane = createDefaultWindowContainer(obj,PanelHandle)
%CREATEDEFAULTWINDOWCONTAINER Create an appropriate container for the view
%
%  HCONAINER = CREATEDEFAULTWINDOWCONTAINER(OBJ) creates and returns a
%  handle to a ViewContainer that has been set up to contain OBJ.  The
%  container should be appropriate for viewing OBJ in a standard
%  application window.  The default implementation creates a
%  PanelTitleViewContainer.

%  Copyright 2005-2011 The MathWorks, Inc. and Ford Global Technologies, Inc.



if nargin>1
    % User suplied Panel
    Parent = get(PanelHandle,'Parent');
    OtherArgs = {'PanelHandle',PanelHandle};
else
    % Use the View's parent
    Parent = get(View,'Parent');
    OtherArgs = {};
end


hPane = mbcmultiview.PanelTitleViewContainer( ...
    'Parent', Parent, ...
    'Visible', obj.Visible, ...
    'View', obj,...
    OtherArgs{:});