Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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