IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_blmisc_fearange.m
Go to the documentation of this file.
1 %>@file
2 %>@ingroup guigroup
3 %>@brief Properties Window for @ref blmisc_fearange
4 %> @sa blmisc_fearange
5 
6 %>@cond
7 function varargout = uip_blmisc_fearange(varargin)
8 % Begin initialization code - DO NOT EDIT
9 gui_Singleton = 1;
10 gui_State = struct('gui_Name', mfilename, ...
11  'gui_Singleton', gui_Singleton, ...
12  'gui_OpeningFcn', @uip_blmisc_fearange_OpeningFcn, ...
13  'gui_OutputFcn', @uip_blmisc_fearange_OutputFcn, ...
14  'gui_LayoutFcn', [] , ...
15  'gui_Callback', []);
16 if nargin && ischar(varargin{1})
17  gui_State.gui_Callback = str2func(varargin{1});
18 end
19 
20 if nargout
21  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
22 else
23  gui_mainfcn(gui_State, varargin{:});
24 end
25 % End initialization code - DO NOT EDIT
26 
27 
28 % --- Executes just before uip_blmisc_fearange is made visible.
29 function uip_blmisc_fearange_OpeningFcn(hObject, eventdata, handles, varargin)
30 if nargin > 4
31  % Dataset is expected as parameter
32  ds = varargin{2};
33  set(handles.edit_range, 'String', mat2str([ds.fea_x(1), ds.fea_x(end)]));
34 end;
35 handles.output.flag_ok = 0;
36 guidata(hObject, handles);
37 gui_set_position(hObject);
38 
39 
40 % --- Outputs from this function are returned to the command clae.
41 function varargout = uip_blmisc_fearange_OutputFcn(hObject, eventdata, handles)
42 try
43  uiwait(handles.figure1);
44  handles = guidata(hObject);
45  varargout{1} = handles.output;
46  delete(gcf);
47 catch
48  output.flag_ok = 0;
49  varargout{1} = output;
50 end;
51 
52 
53 
54 function editReg_Callback(hObject, eventdata, handles)
55 % hObject handle to editReg (see GCBO)
56 % eventdata reserved - to be defined in a future version of MATLAB
57 % handles structure with handles and user data (see GUIDATA)
58 
59 % Hints: get(hObject,'String') returns contents of editReg as text
60 % str2double(get(hObject,'String')) returns contents of editReg as a double
61 
62 
63 % --- Executes during object creation, after setting all properties.
64 function editReg_CreateFcn(hObject, eventdata, handles)
65 % hObject handle to editReg (see GCBO)
66 % eventdata reserved - to be defined in a future version of MATLAB
67 % handles empty - handles not created until after all CreateFcns called
68 
69 % Hint: edit controls usually have a white background on Windows.
70 % See ISPC and COMPUTER.
71 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
72  set(hObject,'BackgroundColor','white');
73 end
74 
75 
76 
77 % --- Executes on button press in pushbuttonOk.
78 function pushbuttonOk_Callback(hObject, eventdata, handles)
79 
80 handles.output.params = {...
81 'range', get(handles.edit_range, 'String') ...
82 };
83 handles.output.flag_ok = 1;
84 guidata(hObject, handles);
85 uiresume();
86 
87 
88 
89 function edit_range_Callback(hObject, eventdata, handles)
90 % hObject handle to edit_range (see GCBO)
91 % eventdata reserved - to be defined in a future version of MATLAB
92 % handles structure with handles and user data (see GUIDATA)
93 
94 % Hints: get(hObject,'String') returns contents of edit_range as text
95 % str2double(get(hObject,'String')) returns contents of edit_range as a double
96 
97 
98 % --- Executes during object creation, after setting all properties.
99 function edit_range_CreateFcn(hObject, eventdata, handles)
100 % hObject handle to edit_range (see GCBO)
101 % eventdata reserved - to be defined in a future version of MATLAB
102 % handles empty - handles not created until after all CreateFcns called
103 
104 % Hint: edit controls usually have a white background on Windows.
105 % See ISPC and COMPUTER.
106 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
107  set(hObject,'BackgroundColor','white');
108 end
109 %>@endcond
Re-sets the x-axis of a dataset using 2-element range vector provided.
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6