Skip to content

Commit a34a1fe

Browse files
committed
Modified the following components to inherit from matlab.ui.componentcontainer:
- TaskStatusTable - Toolbar
1 parent 7592141 commit a34a1fe

File tree

5 files changed

+31
-18
lines changed

5 files changed

+31
-18
lines changed

widgets/+wt/+abstract/BaseWidget.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ function toggleSetupFinished_I(obj)
123123

124124
obj.SetupFinished_I = true;
125125
obj.CreateFcn = '';
126-
disp('pee pee');
127126

128127
end %function
129128

widgets/+wt/+mixin/TitleColorable.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
%% Internal properties
1818
properties (AbortSet, Transient, NonCopyable, ...
19-
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest} )
19+
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest, ?matlab.ui.componentcontainer.ComponentContainer} )
2020

2121
% List of graphics controls to apply to
2222
TitleColorableComponents (:,1) matlab.graphics.Graphics

widgets/+wt/TaskStatusTable.m

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
classdef TaskStatusTable < wt.abstract.BaseWidget &...
1+
classdef TaskStatusTable < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized &...
23
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.Tooltipable & ...
3-
wt.mixin.ButtonColorable
4+
wt.mixin.ButtonColorable & wt.mixin.BackgroundColorable
5+
46
% A table showing status of multiple tasks
57

68
% Copyright 2020-2021 The MathWorks Inc.
@@ -62,7 +64,7 @@
6264

6365
%% Internal Properties
6466
properties ( Transient, NonCopyable, ...
65-
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest} )
67+
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest,?matlab.ui.componentcontainer.ComponentContainer} )
6668

6769
% Grid for task items
6870
TaskGrid (1,1) matlab.ui.container.GridLayout
@@ -91,9 +93,14 @@
9193

9294
function setup(obj)
9395

94-
% Call superclass setup first to establish the grid
95-
obj.setup@wt.abstract.BaseWidget();
96-
96+
% Call Grid setup first to establish the grid
97+
obj.establishGrid();
98+
99+
100+
% Establish Background Color Listener
101+
obj.BackgroundColorableComponents = obj.Grid;
102+
obj.listenForBackgroundChange();
103+
97104
% Set default size
98105
obj.Position(3:4) = [100 180];
99106

widgets/+wt/Toolbar.m

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
classdef (Sealed) Toolbar < wt.abstract.BaseWidget & wt.mixin.TitleColorable ...
2-
& wt.mixin.FontStyled
1+
classdef (Sealed) Toolbar < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized & wt.mixin.BackgroundColorable & ...
3+
wt.mixin.TitleColorable & ...
4+
wt.mixin.FontStyled
5+
36
% A configurable toolbar
47

58
% Copyright 2020-2021 The MathWorks Inc.
@@ -82,8 +85,12 @@
8285

8386
function setup(obj)
8487

85-
% Call superclass setup first to establish the grid
86-
obj.setup@wt.abstract.BaseWidget();
88+
% Establish Grid for Control
89+
obj.establishGrid();
90+
91+
% Establish Background Color Listener
92+
obj.BackgroundColorableComponents = obj.Grid;
93+
obj.listenForBackgroundChange();
8794

8895
% Set default size
8996
obj.Position(3:4) = [500 90];

0 commit comments

Comments
 (0)