Mercurial > hg > ltpda
comparison m-toolbox/classes/@LTPDAprefs/cb_guiClosed.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children | ce4df2e95a55 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % cb_guiClosed callback for closing the LTPDAprefs GUI | |
2 % | |
3 % Parameters: | |
4 % first - LTPDAprefs object | |
5 % second - Source object (here: java LTPDAPrefsGui) | |
6 % third - Event Object (here: WindowEvent) | |
7 % | |
8 % Version: | |
9 % $Id: cb_guiClosed.m,v 1.4 2011/04/27 12:45:49 hewitson Exp $ | |
10 % | |
11 | |
12 function cb_guiClosed(varargin) | |
13 disp('*** Goodbye from LTPDAprefs'); | |
14 ltpdaPrefs = varargin{1}; | |
15 | |
16 if ~isempty(ltpdaPrefs) && isvalid(ltpdaPrefs) | |
17 % fprintf(2, 'deleting handles\n'); | |
18 %--- called when window is closed | |
19 h = handle(ltpdaPrefs.gui, 'callbackproperties'); | |
20 set(h, 'WindowClosedCallback', []); | |
21 %--- Add extension path button | |
22 h = handle(ltpdaPrefs.gui.getPrefsTabPane().getExtensionsPanel().getAddPathBtn(), 'callbackproperties'); | |
23 set(h, 'ActionPerformedCallback', []); | |
24 %--- Remove extension path button | |
25 h = handle(ltpdaPrefs.gui.getPrefsTabPane().getExtensionsPanel().getRemovePathBtn(), 'callbackproperties'); | |
26 set(h, 'ActionPerformedCallback', []); | |
27 %--- Plot preferences changed | |
28 h = handle(ltpdaPrefs.gui.getPrefs().getPlotPrefs(), 'callbackproperties'); | |
29 set(h, 'PropertyChangeCallback', []); | |
30 | |
31 ltpdaPrefs.gui.setPrefs([]); | |
32 | |
33 %--- It is also necessary to destroy the GUI with the destructor 'delete' | |
34 delete(ltpdaPrefs); | |
35 | |
36 end | |
37 | |
38 java.lang.System.gc | |
39 clear(); | |
40 | |
41 end |