source: aedes_viewprocpar.m @ 144

Last change on this file since 144 was 144, checked in by tjniskan, 9 years ago
  • Added a first (hpopefully) working version of the VNMR procpar tool

(aedes_viewprocpar.m). It is still under testing and is not integrated
with Aedes yet. NOTE: Only works in Matlab R2008a and newer!

  • aedes_inputdlg.m should no focus to the editbox
  • some minor modifications to aedes_gui_defaults.m

M aedes_inputdlg.m
M aedes_viewprocpar.m
M aedes_gui_defaults.m
M aedes_revision.m

File size: 20.0 KB
Line 
1function aedes_viewprocpar(procpar)
2% AEDES_VIEWPROCPAR - VNMR Procpar-file viewer
3%   
4%
5% Synopsis:
6%       aedes_viewprocpar(procpar)
7%
8% Description:
9%
10% Examples:
11%
12% See also:
13%       AEDES
14
15% This function is a part of Aedes - A graphical tool for analyzing
16% medical images
17%
18% Copyright (C) 2006 Juha-Pekka Niskanen <Juha-Pekka.Niskanen@uku.fi>
19%
20% Department of Physics, Department of Neurobiology
21% University of Kuopio, FINLAND
22%
23% This program may be used under the terms of the GNU General Public
24% License version 2.0 as published by the Free Software Foundation
25% and appearing in the file LICENSE.TXT included in the packaging of
26% this program.
27%
28% This program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
29% WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
30
31% Public variables
32H = [];    % Handles structure
33Dat = [];  % Internal data structure
34
35
36% Do some error checking
37if nargin ~= 1
38  error('Invalid number of input arguments!')
39end
40
41% Check if input is a Aedes data structure
42if isfield(procpar,'PROCPAR') && isfield(procpar,'FTDATA') && ...
43    isfield(procpar,'HDR')
44  ProcparFileName = [procpar.HDR.fpath,'procpar'];
45  procpar = procpar.PROCPAR;
46else
47  ProcparFileName = '';
48end
49
50if ~isstruct(procpar) || ~isfield(procpar,'console')
51  error('Input argument is not a valid Varian PROCPAR structure!')
52end
53
54% Draw main GUI
55[H,Dat]=l_DrawGui();
56
57% Default favourites
58%FavouriteList = {};
59%FavouriteList = {'tr','te','kakka','lpe','lro'};
60%set(H.FavListBox,'string',FavouriteList);
61
62% Parse PROCPAR structure
63l_ParseProcparStructure(procpar)
64
65% Update Data Table
66l_UpdateDataTable([],[]);
67
68% Set initial focus to search editbox
69uicontrol(H.SearchEdit);
70
71  function [H,Dat]=l_DrawGui()
72
73    % Load default font and colors
74    Dat.GD=aedes_gui_defaults;
75
76    % Position figure to the center of the screen
77    scrsz = get(0,'screensize');
78    fig_w = 600;
79    fig_h = 700;
80    fig_pos = [scrsz(3)/2-fig_w/2 scrsz(4)/2-fig_h/2 fig_w fig_h];
81   
82   
83    % Main Figure ----------------------------
84    H.fh = figure('Units','Pixel', ...
85      'position',fig_pos,...
86      'Name','VNMR PROCPAR Viewer', ...
87      'Numbertitle','off', ...
88      'Tag','procpar_viewer_fig', ...
89      'Color',Dat.GD.col.mainfig, ...
90      'Toolbar','none', ...
91      'Menubar','none', ...
92      'DoubleBuffer','on', ...
93      'DockControls','off',...
94      'renderer','painters',...
95      'resize','off',...
96      'Handlevisibility','off',...
97      'KeyPressFcn',@l_EscapeCloseFig,...
98      'CloseReq',@l_CloseFig);
99   
100    % File name
101    fname_txh = 0;
102    if ~isempty(ProcparFileName)
103      fname_txh = 70;
104      H.FileNameUipanel = uipanel('parent',H.fh,...
105        'units','pixel',...
106        'position',[10 fig_h-fname_txh fig_w-20 fname_txh-10],...
107        'title','File Name',...
108        'backgroundcolor',Dat.GD.col.mainfig);
109     
110      tmp_pos=get(H.FileNameUipanel,'position');
111      H.FileNameText = uicontrol('parent',H.FileNameUipanel,...
112        'style','text',...
113        'string',ProcparFileName,...
114        'units','pixel',...
115        'position',[10 5 tmp_pos(3)-20 fname_txh-35],...
116        'horizontalalign','left',...
117        'backgroundcolor',Dat.GD.col.mainfig);
118    end
119   
120    % Search uipanel ----------------------
121    up_height = 80;
122    H.SearchUipanel = uipanel('parent',H.fh,...
123      'units','pixel',...
124      'position',[10 fig_h-up_height-10-fname_txh fig_w-20 up_height],...
125      'title','Search Options',...
126      'backgroundcolor',Dat.GD.col.mainfig);
127
128    % Search text
129    pos=get(H.SearchUipanel,'position');
130    H.SearchText = uicontrol('parent',H.SearchUipanel,...
131      'style','text',...
132      'string','Parameter:',...
133      'units','pixel',...
134      'position',[10 pos(4)-45 100 19],...
135      'horizontalalign','left',...
136      'backgroundcolor',Dat.GD.col.mainfig);
137
138    % Search type popupmenu
139    try
140      val = getpref('Aedes','ViewProcparSearchHow');
141    catch
142      val = 1;
143    end
144    tmp_pos = get(H.SearchText,'position');
145    H.SearchHowPopup = uicontrol('parent',H.SearchUipanel,...
146      'style','popup',...
147      'string',{'contains...',...
148      'is exactly...','begins with...',...
149      'ends with...'},...
150      'units','pixel',...
151      'position',[tmp_pos(1)+tmp_pos(3)+5 tmp_pos(2) ...
152      150 22],...
153      'value',val,...
154      'tag','',...
155      'backgroundcolor',Dat.GD.col.popup,...
156      'callback',@l_SearchParams,...
157      'KeyPressFcn',@l_EscapeCloseFig);
158
159    % Search editbox
160    tmp_pos = get(H.SearchHowPopup,'position');
161    H.SearchEdit = uicontrol('parent',H.SearchUipanel,...
162      'style','edit',...
163      'units','pixel',...
164      'position',[tmp_pos(1)+tmp_pos(3)+5 tmp_pos(2) pos(3)-tmp_pos(1)-tmp_pos(3)-15 tmp_pos(4)],...
165      'Callback',@l_SearchParams,...
166      'backgroundcolor',Dat.GD.col.edit,...
167      'KeyPressFcn',@l_SearchParams);
168   
169    % If other procpar viewer windows are currently open, the figure name
170    % has to be unique for finding the correct javaFrame.
171    figs=findall(0,'tag','procpar_viewer_fig');
172    if length(figs)>1
173      set(H.fh,'Name',['VNMR PROCPAR Viewer (',num2str(H.fh),')']);
174      drawnow,pause(0.02);
175    end
176    H.jh=l_GetEditboxJavaHandle(H.fh);
177    if isempty(H.jh)
178      % Fall back to basic matlab code -> no search as you type... :-(
179      Dat.SearchEditUseJava = false;
180      set(H.SearchEdit,'KeyPressFcn','')
181    else
182      Dat.SearchEditUseJava = true;
183    end
184    set(H.fh,'Name','VNMR PROCPAR Viewer'); % Set Figure name back to original...
185   
186   
187    % Case sensitive
188    try
189      val = getpref('Aedes','ViewProcparCaseSensitivity');
190    catch
191      val = 1;
192    end
193    tmp_pos = get(H.SearchEdit,'position');
194    H.SearchCaseSens = uicontrol('parent',H.SearchUipanel,...
195      'style','checkbox',...
196      'units','pixel',...
197      'string','Case sensitive',...
198      'position',[tmp_pos(1) tmp_pos(2)-25 tmp_pos(3) tmp_pos(4)],...
199      'Callback',@l_SearchParams,...
200      'value',val,...
201      'backgroundcolor',Dat.GD.col.mainfig,...
202      'KeyPressFcn',@l_EscapeCloseFig);
203   
204    % --------------------------------------
205    % Favourite params list
206    favup_height = 150;
207    tmp_pos = get(H.SearchUipanel,'position');
208    H.FavUipanel = uipanel('parent',H.fh,...
209      'units','pixel',...
210      'position',[10 fig_h-up_height-favup_height-fname_txh-15 fig_w-20 favup_height],...
211      'title','Favourite parameters',...
212      'backgroundcolor',Dat.GD.col.mainfig);
213   
214    tmp_pos = get(H.FavUipanel,'position');
215    InfoTx = {['The parameter names entered here will be searched ',...
216      'automatically. The matching parameters are placed on top of the parameter list ',...
217      'in boldface. This automatic search is case sensitive and only returns exact matches.']};
218    H.FavInfoText = uicontrol('parent',H.FavUipanel,...
219      'style','text',...
220      'units','pixel',...
221      'string','',...
222      'position',[10 10 250 120],...
223      'horizontalalign','left',...
224      'fontsize',10,...
225      'backgroundcolor',[0.85 0.85 0.85]);%Dat.GD.col.mainfig);
226    InfoTx=textwrap(H.FavInfoText,InfoTx);
227    set(H.FavInfoText,'string',InfoTx)
228   
229    tmp_pos = get(H.FavInfoText,'position');
230    H.FavAdd = uicontrol('parent',H.FavUipanel,...
231      'style','pushbutton',...
232      'units','pixels',...
233      'position',[tmp_pos(1)+tmp_pos(3)+5 ...
234      tmp_pos(2)+tmp_pos(4)-25 70 25],...
235      'String','Add',...
236      'callback',@l_AddFavourite,...
237      'KeyPressFcn',@l_EscapeCloseFig);
238   
239    H.FavRem = uicontrol('parent',H.FavUipanel,...
240      'style','pushbutton',...
241      'units','pixels',...
242      'position',[tmp_pos(1)+tmp_pos(3)+5 ...
243      tmp_pos(2)+tmp_pos(4)-2*25-5 70 25],...
244      'String','Remove',...
245      'callback',@l_RemFavourite,...
246      'KeyPressFcn',@l_EscapeCloseFig);
247   
248    try
249      Dat.FavouriteList = getpref('Aedes','ViewProcparFavourites');
250    catch
251      Dat.FavouriteList = {''};
252    end
253    tmp_pos = get(H.FavInfoText,'position');
254    H.FavListBox = uicontrol('parent',H.FavUipanel,...
255      'style','listbox',...
256      'units','pixels',...
257      'min',1,...
258      'max',3,...
259      'position',[tmp_pos(1)+tmp_pos(3)+80 ...
260      tmp_pos(2) fig_w-30-tmp_pos(3)-90 tmp_pos(4)],...
261      'String',Dat.FavouriteList,...
262      'value',[],...
263      'backgroundcolor','w',...
264      'KeyPressFcn',@l_EscapeCloseFig);
265   
266    % Close & Export to workspace btns -------
267    tmp_pos = get(H.FavUipanel,'position');
268    btn_w = 200;
269    btn_h = 25;
270    H.ExportBtn = uicontrol('parent',H.fh,...
271      'style','pushbutton',...
272      'units','pixels',...
273      'position',[tmp_pos(1) ...
274      tmp_pos(2)-btn_h-5 btn_w btn_h],...
275      'string','Export to workspace',...
276      'callback',@l_ExportToWorkspace,...
277      'KeyPressFcn',@l_EscapeCloseFig);
278   
279    btn_w = 200;
280    btn_h = 25;
281    H.CloseBtn = uicontrol('parent',H.fh,...
282      'style','pushbutton',...
283      'units','pixels',...
284      'position',[tmp_pos(1)+tmp_pos(3)-btn_w ...
285      tmp_pos(2)-btn_h-5 btn_w btn_h],...
286      'string','Close',...
287      'callback',@l_CloseFig,...
288      'KeyPressFcn',@l_EscapeCloseFig);
289   
290    % Data Table -----------------------------
291    pos=get(H.FavUipanel,'position');
292    H.restable = uitable('Parent',H.fh,...
293      'units','pixel',...
294      'position',[10 10 fig_w-20 pos(2)-20-btn_h-5],...
295      'KeyPressFcn',@l_EscapeCloseFig);
296
297  end
298
299%% --------------------------------------------------------
300  function l_ParseProcparStructure(procpar)
301
302    %% Read procpar and construct a cell array
303    DataTable = {};
304    fldnames=fieldnames(procpar);
305    fldnames=sort(fldnames);
306    for ii=1:length(fldnames)
307      DataTable{end+1,1}=fldnames{ii};
308      val=procpar.(fldnames{ii});
309      if length(val)>1
310        if iscell(val)
311          if strcmpi(fldnames{ii},'array')
312            if iscell(val{1})
313              str='(';
314              for jj=1:length(val{1})
315                val{1}{jj}=strrep(val{1}{jj},'''','''''');
316                str = [str,', ''',val{1}{jj},''''];
317              end
318              str=[str,')'];
319              DataTable{end,2}=str;
320            else
321              for jj=1:length(val)
322                val{jj}=strrep(val{jj},'''','''''');
323                str = [str,', ''',val{jj},''''];
324              end
325              DataTable{end,2}=str;
326            end
327          else
328            DataTable{end,2}=val{1};
329          end
330        else
331          str='[ ';
332          for ii=1:length(val)
333            str=[str,' ',num2str(val(ii)),' '];
334          end
335          str=[str,' ]'];
336          DataTable{end,2}=str;
337        end
338      else
339        if iscell(val)
340          DataTable{end,2}=val{1};
341        else
342          DataTable{end,2}=val;
343        end
344      end
345    end
346
347    % Save the full table
348    Dat.FullTable = DataTable;
349
350    % Put favourites on top
351    Dat.DataTable = l_PutFavouritesOnTop(Dat.FullTable);
352
353  end
354
355%% ---------------------------------------------
356  function l_SearchParams(fh,evd)
357
358    if ~isempty(evd) && isfield(evd,'Key') && ...
359        strcmpi(evd.Key,'escape')
360      l_EscapeCloseFig(fh,evd);
361      return
362    end
363   
364    % Get the search string
365    if Dat.SearchEditUseJava
366      SearchStr = get(H.jh,'Text');
367    else
368      SearchStr = get(H.SearchEdit,'string');
369    end
370   
371    % Get case sensitivity
372    CaseSens = get(H.SearchCaseSens,'value');
373    if CaseSens==0
374      RegExpOpt = 'ignorecase';
375    else
376      RegExpOpt = 'matchcase';
377    end
378   
379    if isempty(SearchStr)
380      % If the search string is empty, show full table
381      Dat.DataTable = l_PutFavouritesOnTop(Dat.FullTable);
382    else
383      switch get(H.SearchHowPopup,'value')
384        case 1
385          % Search contains
386          RegExpStr = SearchStr;
387        case 2
388          % Search is exactly
389          RegExpStr = ['^',SearchStr,'$'];
390        case 3
391          % Search begins with
392          RegExpStr = ['^',SearchStr];
393        case 4
394          % Search ends with
395          RegExpStr = [SearchStr,'$'];
396      end
397     
398      % Regexp the full table parameters
399      ind=find(~cellfun('isempty',regexp(Dat.FullTable(:,1),RegExpStr,RegExpOpt)));
400     
401      % Update DataTable
402      if isempty(ind)
403        Dat.DataTable = {'<html><b>No matches!</b></html>',''};
404        %set(H.SearchEdit,'string',['<html><font color="red">',SearchStr,'</font></html>']);
405      else
406        Dat.DataTable = Dat.FullTable(ind,:);
407        Dat.DataTable(:,1)=regexprep(Dat.DataTable(:,1),['(',SearchStr,')'],['<b>$1</b>'],RegExpOpt);
408        Dat.DataTable(:,1)=regexprep(Dat.DataTable(:,1),'(^.*$)','<html>$1</html>',RegExpOpt);
409      end
410    end
411
412    % Update Data Table
413    l_UpdateDataTable([],[])
414   
415  end
416
417%% ---------------------------------------------
418  function l_UpdateDataTable(fh,evd)
419
420    set(H.restable,'Data',Dat.DataTable,...
421      'ColumnFormat',{'char','char'},...
422      'ColumnWidth',{200,350},...
423      'RowName',[],...
424      'ColumnName',{'Parameter','Value(s)'})
425   
426  end
427
428%% ---------------------------------------------
429  function l_AddFavourite(fh,evd)
430   
431    % Prompt for a favourite search string
432    resp = aedes_inputdlg('Search text to be added:');
433    if isempty(resp) || isempty(resp{1})
434      return
435    end
436   
437    % Add search string to list
438    Dat.FavouriteList{end+1} = resp{1};
439%     ListBoxStr = get(H.FavListBox,'string');
440%     ListBoxStr{end+1} = resp{1};
441    set(H.FavListBox,'string',Dat.FavouriteList,...
442      'value',[]);
443   
444    % Run search
445    l_SearchParams([],[]);
446   
447  end
448
449%% ---------------------------------------------
450  function l_RemFavourite(fh,evd)
451   
452    % Get selected indices
453    ind = get(H.FavListBox,'value');
454    if isempty(ind)
455      return
456    end
457   
458    % Ask for confirmation
459    resp = questdlg('Remove selected favourites?',...
460      'Remove favourites','Yes','No','No');
461    if strcmpi(resp,'No')
462      return
463    end
464    Dat.FavouriteList(ind)=[];
465%     ListBoxStr = get(H.FavListBox,'string');
466%     ListBoxStr(ind)=[];
467    set(H.FavListBox,'string',Dat.FavouriteList,...
468      'value',[]);
469   
470   
471    % Run search to update changes
472    l_SearchParams([],[]);
473   
474  end
475
476
477%% ---------------------------------------------
478  function TableOut = l_PutFavouritesOnTop(TableIn)
479   
480    FavouriteList = get(H.FavListBox,'string');
481   
482    % Put favourite list matches on top of the search list and bold face
483    ind = [];
484    for ii=1:length(FavouriteList)
485      tmp_ind=find(~cellfun('isempty',regexp(TableIn(:,1),['^',FavouriteList{ii},'$'])));
486      ind = [ind tmp_ind];
487      if isempty(tmp_ind)
488        % If favourite is not found, color it red in the listbox
489        ListboxStr=get(H.FavListBox,'string');
490        ListboxStr = regexprep(ListboxStr,['(^',FavouriteList{ii},'$)'],...
491          '<html><font color="red"><b>$1 (not found)</b></font></html>');
492        set(H.FavListBox,'string',ListboxStr)
493      end
494    end
495    if ~isempty(ind)
496      ind2 = setdiff(1:size(TableIn,1),ind);
497      FavList = TableIn(ind,:);
498      FavList(:,1)=regexprep(FavList(:,1),'(\w+)',...
499        '<html><b>$1</b></html>');
500      TableOut = cat(1,...
501        FavList,...
502        {'<html><b>============</b></html>','<html><b>============</b></html>'},...
503        TableIn(ind2,:));
504    else
505      TableOut = TableIn;
506    end
507  end
508
509%% --------------------------------------
510  function l_ExportToWorkspace(fh,evd)
511   
512    assignin('base','procpar',procpar);
513    msgstr = sprintf('PROCPAR exported to variable "%s".','procpar');
514   
515    % Print notification to workspace
516    fprintf(1,['AEDES_VIEWPROCPAR: ',msgstr,'\n']);
517   
518    % Nag with a dialog...
519    helpdlg(msgstr,'PROCPAR exported!')
520   
521  end
522
523%% --------------------------------------------
524  function l_EscapeCloseFig(fh,evd)
525   
526    % Call l_CloseFig if ESC is pressed
527    if ~isempty(evd) && isfield(evd,'Key') && ...
528        strcmpi(evd.Key,'escape')
529      l_CloseFig([],[])
530    end
531   
532  end
533
534%% --------------------------------------------
535  function l_CloseFig(fh,evd)
536   
537    % Try to save preferences to disk before exiting
538    try
539      CaseSens = get(H.SearchCaseSens,'value');
540      setpref('Aedes','ViewProcparCaseSensitivity',CaseSens);
541     
542      val = get(H.SearchHowPopup,'value');
543      setpref('Aedes','ViewProcparSearchHow',val);
544     
545      setpref('Aedes','ViewProcparFavourites',Dat.FavouriteList);
546    catch
547      disp('Warning: Could not save AEDES_VIEWPROCPAR preferences!');
548    end
549    delete(H.fh)
550   
551  end
552
553%% -----------------------------------------------
554  function jhEditBox=l_GetEditboxJavaHandle(hFig)
555    % Parts of this code are originally written by Yair Altman, whose
556    % wizardry in Java programming in Matlab has been of great help in many
557    % occasions. Please see http://undocumentedmatlab.com and the
558    % comp.soft-sys.matlab news group for further information. The
559    % following license notice is for findjobj.m (by Yair Altman, available
560    % in the Matlab File Exchange,
561    % http://www.mathworks.com/matlabcentral/fileexchange/14317) from which
562    % I have used code snippets in this subfunction.
563    %
564    %
565    % Copyright (c) 2009, Yair Altman All rights reserved.
566    %
567    % Redistribution and use in source and binary forms, with or without
568    % modification, are permitted provided that the following conditions
569    % are met:
570    %
571    %   * Redistributions of source code must retain the above copyright
572    %     notice, this list of conditions and the following disclaimer.
573    %   * Redistributions in binary form must reproduce the above copyright
574    %     notice, this list of conditions and the following disclaimer in
575    %     the documentation and/or other materials provided with the
576    %     distribution
577    %
578    % THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
579    % "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
580    % LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
581    % A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
582    % OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
583    % SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
584    % LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
585    % DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
586    % THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
587    % (INCLUDING NEGLIGENCE OR OTHERWISE) RISING IN ANY WAY OUT OF THE USE
588    % OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
589   
590    % Allocate handle
591    jhEditBox = handle([]);
592   
593    % Ensure that objects have been drawn
594    drawnow;
595    pause(0.01);
596   
597    % Get figure's root pane
598     try
599       figName = get(hFig,'Name');
600       mde = com.mathworks.mde.desk.MLDesktop.getInstance;
601       jFigPanel = mde.getClient(figName);
602       jRootPane = jFigPanel;
603       jRootPane = jFigPanel.getRootPane;
604     catch
605       try
606         warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');  % R2008b compatibility
607         jFrame = get(hFig,'JavaFrame');
608         jFigPanel = get(jFrame,'FigurePanelContainer');
609         jRootPane = jFigPanel;
610         jRootPane = jFigPanel.getComponent(0).getRootPane;
611       catch
612         % Never mind
613       end
614     end
615     try
616      % If invalid RootPane - try another method...
617      warning('off','MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame');  % R2008b compatibility
618      jFrame = get(hFig,'JavaFrame');
619      jAxisComponent = get(jFrame,'AxisComponent');
620      jRootPane = jAxisComponent.getParent.getParent.getRootPane;
621     catch
622      % Never mind
623     end
624     %jRootPane=handle(jRootPane,'callbackproperties');
625     
626     % Find java handle to Search editbox recursively
627     Dat.javaHandleFound = false;
628     jhEditBox=l_FindJavaHandle(jRootPane);
629  end
630
631% Recursion function for finding java handle for search editbox
632  function jhout=l_FindJavaHandle(jhin)
633    jhout = handle([]);
634    jhin=handle(jhin,'callbackproperties');
635   
636    if ~isempty(regexp(char(jhin.toString),'EditTextPeer\$hgTextField'))
637      jhout = jhin;
638      Dat.javaHandleFound=true;
639      return;
640    else
641      try
642        compCount = jhin.getComponentCount;
643        for ii=0:compCount-1
644          childComp = jhin.getComponent(ii);
645          if ~Dat.javaHandleFound
646            jhout=l_FindJavaHandle(childComp);
647          else
648            break;
649          end
650        end
651      catch
652        % Nothing to do here...
653      end
654    end
655   
656  end
657     
658
659end
660
661 
Note: See TracBrowser for help on using the repository browser.

Powered by Trac 1.0.9.Copyright © Juha-Pekka Niskanen 2008