Loading @GUI/draw_allgrids.m +2 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ % function will call the draw methods for each of the 3 grids. % inputs: % obj:GUI - current GUI object % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading @GUI/draw_grid0.m +5 −5 Original line number Diff line number Diff line Loading @@ -3,13 +3,13 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on left. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca % Organization: McMaster Centre for Software Certification function [] = draw_grid0(object,grid,load) function [] = draw_grid0(object,grid,load, init) % ensure that the results grid is up to date. grid.refresh(); for i=1:size(grid.Cells,2) Loading @@ -22,12 +22,12 @@ for i=1:size(grid.Cells,2) pos(2) = pos2(2); pos(3) = pos1(3); pos(4) = pos2(4); if isempty(grid.Cells(i).result) || ~ishandle(grid.Cells(i).result)%load == 1 if load == 2 || isempty(grid.Cells(i).result) || ~ishandle(grid.Cells(i).result) grid.Cells(i).result = object.create_std_text(object.fig,pos); % if we are loading the cell, try to restore the text % that was saved using save_results. if load == 1 if load ~= 0 set(grid.Cells(i).result,'String',grid.Cells(i).result_text); end else Loading @GUI/draw_grid1.m +5 −5 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on top. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading Loading @@ -34,9 +34,9 @@ for i=1:size(grid.cells,2) pos(1) = pos(1) + (i-1)*grid.cells(i).condition_text_width + grid.cells(i).condition_text_offset + pb_space; % if the edit box does not exist create it, if it does % adjust it's position. if (isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond))%load == 1) if (load == 2 || isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond)) grid.cells(i).cond = object.create_std_text(object.fig,pos); if (load == 1) if (load ~= 0) set(grid.cells(i).cond,'String',grid.cells(i).cond_text); end else Loading Loading @@ -71,7 +71,7 @@ else delete(grid.delete_cell_pb) grid.delete_cell_pb = []; end if object.edit ==1 || load == 1 if object.edit ==1 || load ~= 0 fig_pos = get(object.fig,'position'); if(pos(1)+pos(3)>fig_pos(3)) fig_pos(3) = pos(1)+pos(3); Loading @GUI/draw_grid2.m +4 −4 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on left. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading Loading @@ -67,7 +67,7 @@ if (~isempty(grid)) % if the edit box does not exist, ie. it is just being % created or we are loading the figure if (isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond))%load == 1) if (load == 2 || isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond)) % create the new edit box grid.cells(i).cond = object.create_std_text(object.fig,pos); % if cell is the first in the grid use the new Loading @@ -82,7 +82,7 @@ if (~isempty(grid)) % if we are loading the cell set the string of the % edit box to be the value that we saved as a % result of calling save_conditions if (load == 1) if (load ~= 0) set(grid.cells(i).cond,'String',grid.cells(i).cond_text); end else Loading @GUI/init.m +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ uimenu(helpmenu,'Label','About Tabular Expression Toolbox','Callback',@(src,even object.set_command_pos; object.reset_wh(); object.draw_allgrids(1); object.draw_allgrids(2); object.saved = 1; object.setPBenable; Loading Loading
@GUI/draw_allgrids.m +2 −2 Original line number Diff line number Diff line Loading @@ -2,8 +2,8 @@ % function will call the draw methods for each of the 3 grids. % inputs: % obj:GUI - current GUI object % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading
@GUI/draw_grid0.m +5 −5 Original line number Diff line number Diff line Loading @@ -3,13 +3,13 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on left. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca % Organization: McMaster Centre for Software Certification function [] = draw_grid0(object,grid,load) function [] = draw_grid0(object,grid,load, init) % ensure that the results grid is up to date. grid.refresh(); for i=1:size(grid.Cells,2) Loading @@ -22,12 +22,12 @@ for i=1:size(grid.Cells,2) pos(2) = pos2(2); pos(3) = pos1(3); pos(4) = pos2(4); if isempty(grid.Cells(i).result) || ~ishandle(grid.Cells(i).result)%load == 1 if load == 2 || isempty(grid.Cells(i).result) || ~ishandle(grid.Cells(i).result) grid.Cells(i).result = object.create_std_text(object.fig,pos); % if we are loading the cell, try to restore the text % that was saved using save_results. if load == 1 if load ~= 0 set(grid.Cells(i).result,'String',grid.Cells(i).result_text); end else Loading
@GUI/draw_grid1.m +5 −5 Original line number Diff line number Diff line Loading @@ -4,8 +4,8 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on top. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading Loading @@ -34,9 +34,9 @@ for i=1:size(grid.cells,2) pos(1) = pos(1) + (i-1)*grid.cells(i).condition_text_width + grid.cells(i).condition_text_offset + pb_space; % if the edit box does not exist create it, if it does % adjust it's position. if (isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond))%load == 1) if (load == 2 || isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond)) grid.cells(i).cond = object.create_std_text(object.fig,pos); if (load == 1) if (load ~= 0) set(grid.cells(i).cond,'String',grid.cells(i).cond_text); end else Loading Loading @@ -71,7 +71,7 @@ else delete(grid.delete_cell_pb) grid.delete_cell_pb = []; end if object.edit ==1 || load == 1 if object.edit ==1 || load ~= 0 fig_pos = get(object.fig,'position'); if(pos(1)+pos(3)>fig_pos(3)) fig_pos(3) = pos(1)+pos(3); Loading
@GUI/draw_grid2.m +4 −4 Original line number Diff line number Diff line Loading @@ -3,8 +3,8 @@ % inputs: % obj:GUI - current GUI object % grid:Grid - grid to be drawn, should be grid on left. % load:boolean - 0 if grid is being refreshed, 1 if grid is being % loaded for the firs time. % load:tristate - 0 if grid is being refreshed, 1 if grid should reload % data, 2 if the grid is being initialized. % outputs: % none % Author: Colin Eles elesc@mcmaster.ca Loading Loading @@ -67,7 +67,7 @@ if (~isempty(grid)) % if the edit box does not exist, ie. it is just being % created or we are loading the figure if (isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond))%load == 1) if (load == 2 || isempty(grid.cells(i).cond) || ~ishandle(grid.cells(i).cond)) % create the new edit box grid.cells(i).cond = object.create_std_text(object.fig,pos); % if cell is the first in the grid use the new Loading @@ -82,7 +82,7 @@ if (~isempty(grid)) % if we are loading the cell set the string of the % edit box to be the value that we saved as a % result of calling save_conditions if (load == 1) if (load ~= 0) set(grid.cells(i).cond,'String',grid.cells(i).cond_text); end else Loading
@GUI/init.m +1 −1 Original line number Diff line number Diff line Loading @@ -181,7 +181,7 @@ uimenu(helpmenu,'Label','About Tabular Expression Toolbox','Callback',@(src,even object.set_command_pos; object.reset_wh(); object.draw_allgrids(1); object.draw_allgrids(2); object.saved = 1; object.setPBenable; Loading