comparison m-toolbox/classes/@workspaceBrowser/workspaceBrowser.m @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children 317b5f447f3e
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1 % WORKSPACEBROWSER creates a new Workspace Browser.
2 %
3 % CALL:
4 % >> workspaceBrowser
5 %
6 % M Hewitson 23-11-08
7 %
8 % $Id: workspaceBrowser.m,v 1.9 2010/03/23 17:41:29 ingo Exp $
9 %
10
11
12 classdef workspaceBrowser < handle
13 %------------------------------------------------
14 %---------- Private read-only Properties --------
15 %------------------------------------------------
16 properties (SetAccess = public)
17 hdl = [];
18 name = '';
19 executing = false;
20 h1;
21 h2;
22 h3;
23 h4;
24 h5;
25 h6;
26 h7;
27 h8;
28 h9;
29 h10;
30 end
31
32 %-----------------------------------------
33 % Public methods
34 %-----------------------------------------
35 methods
36
37 % Construct a new workbench
38 function wb = workspaceBrowser(varargin)
39
40 twb = getappdata(0, 'WorkspaceBrowser');
41
42 if isa(twb, mfilename)
43
44 disp('*** Found existing Workspace Browser.')
45 wb = twb;
46 workspaceBrowser.cb_buildModel(wb);
47 awtinvoke(wb.hdl, 'setVisible', 'true');
48 awtinvoke(wb.hdl, 'toFront');
49
50 else
51
52 switch nargin
53 case 0
54 % Create a new WorkspaceBrowser
55 wb.hdl = mpipeline.workspace.WorkspaceBrowserDialog([], false);
56 pause(0.1);
57 % Show the browser
58 awtinvoke(wb.hdl, 'setVisible', 'true');
59 pause(0.1);
60
61 end
62
63 %--- called when window is closed
64 wb.h1 = handle(wb.hdl, 'callbackproperties');
65 wb.h1.WindowClosedCallback = @workspaceBrowser.cb_guiClosed;
66
67 % Add button actions
68
69 %--- Refresh button
70 wb.h2 = handle(wb.hdl.getRefreshBtn,'callbackproperties');
71 wb.h2.ActionPerformedCallback = @workspaceBrowser.cb_buildModel;
72
73 %--- Plot button
74 wb.h3 = handle(wb.hdl.getPlotBtn,'callbackproperties');
75 wb.h3.ActionPerformedCallback = @workspaceBrowser.cb_plot;
76
77 %--- Display button
78 wb.h4 = handle(wb.hdl.getDisplayBtn,'callbackproperties');
79 wb.h4.ActionPerformedCallback = @workspaceBrowser.cb_display;
80
81 %--- Plot history button
82 wb.h5 = handle(wb.hdl.getPlotHistoryBtn,'callbackproperties');
83 wb.h5.ActionPerformedCallback = @workspaceBrowser.cb_plothistory;
84
85 %--- Submit button
86 wb.h6 = handle(wb.hdl.getSubmitBtn,'callbackproperties');
87 wb.h6.ActionPerformedCallback = @workspaceBrowser.cb_submit;
88
89 %--- Explore button
90 wb.h7 = handle(wb.hdl.getExploreBtn,'callbackproperties');
91 wb.h7.ActionPerformedCallback = @workspaceBrowser.cb_explore;
92
93 %--- Query button
94 wb.h8 = handle(wb.hdl.getQueryBtn,'callbackproperties');
95 wb.h8.ActionPerformedCallback = @workspaceBrowser.cb_query;
96
97 %--- Retrieve button
98 wb.h9 = handle(wb.hdl.getRetrieveBtn,'callbackproperties');
99 wb.h9.ActionPerformedCallback = @workspaceBrowser.cb_retrieve;
100
101 %--- repository Manager button
102 wb.h10 = handle(wb.hdl.getRepositoryManagerBtn,'callbackproperties');
103 wb.h10.ActionPerformedCallback = @workspaceBrowser.cb_repoManager;
104
105 % Store the java gui in the application workspace
106 setappdata(0, 'WorkspaceBrowser', wb);
107
108 % Set the model
109 workspaceBrowser.cb_buildModel
110
111 end
112 end % End constructor
113
114 % Display method to make a quiet output
115 function display(varargin)
116 end
117
118
119 end % End public methods
120
121 methods(Access=private)
122 end
123
124 methods (Static=true)
125
126 varargout = getSelectedObjects(varargin)
127 varargout = getSelectedVarNames(varargin)
128
129 varargout = cb_buildModel(varargin)
130 varargout = cb_plot(varargin)
131 varargout = cb_display(varargin)
132 varargout = cb_plothistory(varargin)
133 varargout = cb_submit(varargin)
134 varargout = cb_explore(varargin)
135 varargout = cb_query(varargin)
136 varargout = cb_retrieve(varargin)
137 varargout = cb_guiClosed(varargin)
138 varargout = cb_repoManager(varargin)
139
140 varargin = retrieveObjectsFromDialog(varargin)
141
142 end
143 %------------------------------------------------
144 % Private static methods
145 %------------------------------------------------
146 methods(Access=private, Static=true)
147 end
148
149 end
150