%% flag_cell
%   allows changing the background color of a cell based on an
%   inputed mode
% inputs
%   object:RCell - current object
%   mode:int -
%       0 - normal
%       1 - red (error/false)
%       2 - green (ok/true)
% outputs:
%   none
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function [] = flag_cell(object,mode)

if (isempty(object.color))
    object.color = get(object.result,'BackgroundColor');
end
if ishandle(object.result)
    if (mode == 0)
        set(object.result,'BackgroundColor',object.color);
    elseif (mode == 1)
        set(object.result,'BackgroundColor',[0.92 0.65 0.65]);
    elseif (mode == 2)
        set(object.result,'BackgroundColor',[0.03 1.0 0.32]);
    end
end

end