Skip to content

Commit 7592141

Browse files
committed
Updated the Following:
- CheckboxList - ButtonGrid - ListSelector (1 + 2) - SliderSpinner - Slider Checkbox
1 parent 9962777 commit 7592141

17 files changed

+110
-55
lines changed

widgets/+wt/+abstract/BaseWidget.m

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

124124
obj.SetupFinished_I = true;
125125
obj.CreateFcn = '';
126+
disp('pee pee');
126127

127128
end %function
128129

widgets/+wt/+mixin/ButtonColorable.m

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

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

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

widgets/+wt/+mixin/Enableable.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
EnableableComponents (:,1) matlab.graphics.Graphics

widgets/+wt/+mixin/FieldColorable.m

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

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

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

widgets/+wt/+mixin/FontColorable.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
FontColorableComponents (:,1) matlab.graphics.Graphics

widgets/+wt/+mixin/Tooltipable.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
TooltipableComponents (:,1) matlab.graphics.Graphics

widgets/+wt/ButtonGrid.m

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
classdef ButtonGrid < matlab.ui.componentcontainer.ComponentContainer &...
1+
classdef ButtonGrid < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized & ...
3+
wt.mixin.BackgroundColorable & ...
24
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.ButtonColorable
5+
36
% A grid of buttons with a single callback/event
47

58
% Copyright 2020-2021 The MathWorks Inc.
@@ -56,7 +59,7 @@
5659

5760
%% Internal Properties
5861
properties ( Transient, NonCopyable, ...
59-
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest} )
62+
Access = {?wt.test.BaseWidgetTest, ?matlab.ui.componentcontainer.ComponentContainer} )
6063

6164
% Buttons (other widgets like ListSelector also access this)
6265
Button (1,:) matlab.ui.control.Button
@@ -71,7 +74,11 @@
7174
function setup(obj)
7275

7376
% Call superclass setup to establish the main grid
74-
obj.setup@wt.abstract.BaseWidget();
77+
obj.establishGrid();
78+
79+
% Establish Background Color Listener
80+
obj.BackgroundColorableComponents = obj.Grid;
81+
obj.listenForBackgroundChange();
7582

7683
% Set default size
7784
obj.Position(3:4) = [100 30];

widgets/+wt/CheckboxList.m

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
classdef CheckboxList < wt.abstract.BaseWidget &...
2-
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.Tooltipable
1+
classdef CheckboxList < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized & ...
3+
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.Tooltipable
4+
5+
36
% A checkbox list
47

58
% Copyright 2020-2021 The MathWorks Inc.
@@ -40,7 +43,7 @@
4043

4144
%% Internal Properties
4245
properties ( Transient, NonCopyable, ...
43-
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest} )
46+
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest, ?matlab.ui.componentcontainer.ComponentContainer} )
4447

4548
% Item checkboxes
4649
ItemCheck (1,:) matlab.ui.control.CheckBox
@@ -57,8 +60,12 @@
5760

5861
function setup(obj)
5962

60-
% Call superclass setup first to establish the grid
61-
obj.setup@wt.abstract.BaseWidget();
63+
% Call Grid setup first to establish the grid
64+
obj.establishGrid();
65+
66+
% Establish Background Color Listener
67+
%obj.BackgroundColorableComponents = obj.Grid;
68+
%obj.listenForBackgroundChange();
6269

6370
% Set default size
6471
obj.Position(3:4) = [100 130];

widgets/+wt/ColorSelector.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef ColorSelector < wt.abstract.BaseWidget &...
1+
classdef ColorSelector < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized &...
23
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.Tooltipable & ...
34
wt.mixin.FieldColorable
45
% A color selection control with browse button
@@ -36,7 +37,7 @@
3637

3738
%% Internal Properties
3839
properties ( Transient, NonCopyable, ...
39-
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest} )
40+
Access = {?wt.abstract.BaseWidget, ?wt.test.BaseWidgetTest, ?matlab.ui.componentcontainerComponentContainer} )
4041

4142
% Button
4243
ButtonControl (1,1) matlab.ui.control.Button
@@ -54,7 +55,7 @@
5455
function setup(obj)
5556

5657
% Call superclass setup first to establish the grid
57-
obj.setup@wt.abstract.BaseWidget();
58+
obj.establishGrid();
5859

5960
% Set default size
6061
obj.Position(3:4) = [100 25];

widgets/+wt/DatetimeSelector.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
classdef DatetimeSelector < wt.abstract.BaseWidget &...
1+
classdef DatetimeSelector < matlab.ui.componentcontainer.ComponentContainer & ...
2+
wt.mixin.ErrorHandling & wt.mixin.GridOrganized & ...
23
wt.mixin.Enableable & wt.mixin.FontStyled & wt.mixin.FieldColorable
34
% A date and time selection control
45

@@ -83,8 +84,8 @@ function setup(obj)
8384
"TimeZone","local",...
8485
"Format","dd-MMM-uuuu hh:mm aa");
8586

86-
% Call superclass setup first to establish the grid
87-
obj.setup@wt.abstract.BaseWidget();
87+
% Call Grid Mixin first to establish the grid
88+
obj.establishGrid();
8889

8990
% Configure Grid
9091
obj.Grid.ColumnWidth = {'9x',5,'4x','4x',0,0};

0 commit comments

Comments
 (0)