%% update_Statusbar
%   update the statusbar located at bottom of window based on
%   current state of typecheckness
% inputs:
%   obj:GUI - GUI object
% outputs:
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = update_Statusbar(object)

warning off MATLAB:HandleGraphics:ObsoletedProperty:JavaFrame
% statusbar depends on JavaFrame which may be obsolete in
% future versions of Matlab, can still use in old versions
try
    if (object.pvs_checked == 0)
        sb = statusbar(object.fig, 'Status: Not Typechecked');
        set(sb.TextPanel,'Foreground',[1,0,0]);
    elseif (object.pvs_checked == 1)
        sb = statusbar(object.fig, 'Status: Typechecked');
        set(sb.TextPanel,'Foreground',[0,1,0]);
        
    end
catch exception
    % do nothing if exception found, may change in future.
    
end
end
