classdef RCell < handle %UNTITLED2 Summary of this class goes here % Detailed explanation goes here properties Cell1 = []; Cell2 = []; result = []; result_text = []; color = []; end methods %% RCell % Constructor % inputs: % cell1:Cell - cell reference in top grid % cell2:Cell - Cell reference in left grid % outputs; % n:RCell - created RCell function n = RCell(cell1,cell2) n.Cell1 = cell1; n.Cell2 = cell2; end %% flag_cell % mode % 0 - normal % 1 - red (error/false) % 2 - green (ok/true) function [] = flag_cell(obj,mode) if (isempty(obj.color)) obj.color = get(obj.result,'BackgroundColor'); end if (mode == 0) set(obj.result,'BackgroundColor',obj.color); elseif (mode == 1) set(obj.result,'BackgroundColor',[0.92 0.65 0.65]) elseif (mode == 2) set(obj.result,'BackgroundColor',[0.03 1.0 0.32]); end end end end