function DialogPanel = getDialogSchema(this, manager)
% GETDIALOGSCHEMA Construct the dialog panel

% Author(s): Bora Eryilmaz, John Glass
% Revised:
% Copyright 1986-2004 The MathWorks, Inc.
% $Revision: 1.1.6.4 $ $Date: 2004/11/18 23:44:19 $

% First create the GUI panel
DialogPanel = com.mathworks.toolbox.control.workspace.Workspace;

% Get the handles
Handles = this.Handles;
buttons   = DialogPanel.getButtons;
menuitems = DialogPanel.getMenuItems;

% Add the handle
Handles.PanelManager = explorer.DefaultFolderPanel(DialogPanel, this, manager);

% New button callback
h = handle( buttons(1), 'callbackproperties' );
h.ActionPerformedCallback = @(x,y) LocalNewProject(this);
h = handle( menuitems(1), 'callbackproperties' );
h.ActionPerformedCallback = @(x,y) LocalNewProject(this);
h = handle( menuitems(4), 'callbackproperties' ); % Scroll right-click new
h.ActionPerformedCallback = @(x,y) LocalNewProject(this);

% Store the handles
this.Handles = Handles;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Local Functions
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LocalNewProject - Callback to launch the new project dialog
function LocalNewProject(this)

%% Create the new task dialog and let it handle the rest
newdlg = explorer.NewProjectDialog(this);
awtinvoke(newdlg.Dialog, 'setVisible', true)
