view m-toolbox/classes/@sigBuilder/cb_sigListClick.m @ 50:7d2e2e065cf1 database-connection-manager

Update unit tests
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source

% CB_SIGLISTCLICK fires when the user clicks on the signal list table
% 
% M Hewitson 
% 
% $Id: cb_sigListClick.m,v 1.1 2008/10/19 11:42:40 hewitson Exp $
% 
function cb_sigListClick(varargin)
  
  % inputs
  myh = varargin{1};
  mainfig = varargin{end};
  
  % pop-up menu
  
  % get row that is clicked
  if ~isempty(mainfig.SigSelected.Indices)
    row = mainfig.SigSelected.Indices(1);
    % get object
    obj = mainfig.signals(row);
    
    hcmenu = uicontextmenu;
    item1 = uimenu(hcmenu, 'Label', 'plot', 'Callback', {'iplot', obj});
    item2 = uimenu(hcmenu, 'Label', 'plot PSD', 'Callback', {'iplot', obj.psd});
    item3 = uimenu(hcmenu, 'Label', 'display', 'Callback', {'display', obj});
    set(myh,'uicontextmenu',hcmenu)
  end
  
end