2 properties(GetAccess=
private,SetAccess=
private,Hidden)
8 methods (Access=public)
9 function obj=
module_view(biograph_struc,internalUnits,label)
11 obj.biograph_struct = biograph_struc;
12 obj.internalUnits = internalUnits;
15 % Create and show biograph
19 function node_callback(obj,node)
20 obj.internalUnits{node.UserData}.view();
24 methods (Access=
private)
25 function createBiograph(obj)
26 if isempty(obj.biograph_struct.dg) % no edges
27 warning('Module %s encloses no units. No graph will be drawn.',obj.biograph_struct.label);
28 elseif isscalar(obj.biograph_struct.dg) % one edge
29 warning('Module %s encloses only one
unit. No graph will be drawn.',obj.biograph_struct.label);
30 else % more than one edge
31 bg = biograph(obj.biograph_struct.dg);
32 set(bg, 'NodeCallbacks', @(node)obj.node_callback(node))
33 bg.ShowTextInNodes = 'Label';
34 N = numel(obj.internalUnits);
36 bg.Nodes(i).Label = obj.biograph_struct.labels{i};
37 bg.Nodes(i).Description =
'';
38 bg.Nodes(i).UserData = i;
39 %
if(obj.internalUnits{i}.debugMode)
40 % bg.Nodes(i).Shape =
'house';
42 classes = superclasses(obj.internalUnits{i});
45 bg.Nodes(i).Color = [1 1 1];
47 bg.Nodes(i).Color = [200 200 200]/255;
51 handles = allchild(0);
Superclass: basic building block to hold functions.
Superclass: graphical interface for units.