Skip to content
Snippets Groups Projects
Commit 74c82e7d authored by Nicola Vigano's avatar Nicola Vigano
Browse files

gtGuiGrainMontage: moved to the new graphics system in uiextras

parent 16545439
No related branches found
No related tags found
No related merge requests found
......@@ -87,18 +87,18 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs, det_ind)
'HandleVisibility', 'off' );
% Boxes to help with the formatting of the window
gui_data.main_boxes = uiextras.VBox('Parent', gui_data.window);
gui_data.main_boxes = uix.VBox('Parent', gui_data.window);
% Will contain the images
gui_data.imgs_panel = uiextras.Panel('Parent', gui_data.main_boxes);
gui_data.imgs_panel = uix.Panel('Parent', gui_data.main_boxes);
% Will contain the buttons
gui_data.buttons_panel = uiextras.Panel('Parent', gui_data.main_boxes);
gui_data.buttons_panel = uix.Panel('Parent', gui_data.main_boxes);
set(gui_data.main_boxes, 'Sizes', [-1 40]);
set(gui_data.main_boxes, 'Heights', [-1 40]);
% Layout for the buttons
gui_data.butt_boxes = uiextras.HButtonBox('Parent', gui_data.buttons_panel);
gui_data.butt_boxes = uix.HButtonBox('Parent', gui_data.buttons_panel);
gui_data.guiOkButton = uicontrol( 'Style', 'PushButton', ...
'Parent', gui_data.butt_boxes, ...
......@@ -114,14 +114,14 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs, det_ind)
'Callback', @onResetButton );
% Grid that holds the images
gui_data.imgs_grid = uiextras.Grid('Parent', gui_data.imgs_panel);
gui_data.imgs_grid = uix.Grid('Parent', gui_data.imgs_panel);
% I expect a matrix like this stack(:,:,1,n) which will have n images.
% For each of these images, we will display them in proper boxes
%%% Kind of a hack - presetting the values to zeros, forces the handles
%%% to be doubles, which then forces the use of the
%%% hg.uicontrol/{get,set} methods instead of the overloaded uiextras.
%%% hg.uicontrol/{get,set} methods instead of the overloaded uix.
%%% This makes it possible to assign the 'ButtonDownFcn' callback on the
%%% panel, while with the uiextras/{get,set} would not be accessible
gui_data.listOfPlainPanels = zeros(length(selected));
......@@ -210,7 +210,7 @@ function selected = gtGuiGrainMontage(gr, selected, use_blobs, det_ind)
function gui_data = createDiffSpotPanel(gui, img, active, ii, num, omega, intensity)
% It creates the panel that contains the difspot.
text = sprintf('w: %2.1f, I: %2.1g, Id: %d', omega, intensity, num);
panel = uiextras.BoxPanel('Parent', gui.imgs_grid, 'Title', text);
panel = uix.BoxPanel('Parent', gui.imgs_grid, 'Title', text);
if (active), set(panel, 'TitleColor', 'g');
else set(panel, 'TitleColor', 'y'); end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment