function menu = getPopupSchema(this,manager,varargin)
% GETPOPUPSCHEMA Constructs the default popup menu

% Author(s): James G. Owen
% Revised: 
% Copyright 1986-2002 The MathWorks, Inc.
% $Revision: 1.1.6.1 $ $Date: 2004/12/26 21:43:26 $

menu = getDefaultPopupSchema(this,manager,varargin{:});

%% Create menus
menuPreproc = com.mathworks.mwswing.MJMenuItem('Preprocess...');
menuResample = com.mathworks.mwswing.MJMenuItem('Resample...');
menuTimeshift = com.mathworks.mwswing.MJMenuItem('Time Shift...');
menuSelect = com.mathworks.mwswing.MJMenuItem('Data Selection...');
%menuExpression = com.mathworks.mwswing.MJMenuItem('MATLAB expression...');

%% Add them
menu.addSeparator;
menu.add(menuPreproc);
menu.add(menuResample);
menu.add(menuTimeshift);
menu.add(menuSelect);
% menu.addSeparator;
% menu.add(menuExpression);

%% Assign menu callbacks
set(handle(menuTimeshift,'callbackproperties'),'ActionPerformedCallback',...
    @(es,ed) openshiftdlg(this,manager))
set(handle(menuPreproc,'callbackproperties'),'ActionPerformedCallback',...
    @(es,ed) openpreprocdlg(this,manager))
set(handle(menuResample,'callbackproperties'),'ActionPerformedCallback',...
    @(es,ed) openmergedlg(this,manager))
set(handle(menuSelect,'callbackproperties'),'ActionPerformedCallback',...
    @(es,ed) openselectdlg(this,manager))


