Skip to content

Commit 2380f5f

Browse files
committed
fixes #51, Switch internal properties to hidden for simplicity & ui testing
1 parent b7d9418 commit 2380f5f

14 files changed

+37
-55
lines changed

widgets/+wt/+apps/BaseApp.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
wt.mixin.ErrorHandling
33
% Base class for Widgets Toolbox apps
44

5-
% Copyright 2020-2021 The MathWorks, Inc.
5+
% Copyright 2020-2023 The MathWorks, Inc.
66

77

88
%% Properties
@@ -53,8 +53,7 @@
5353
end %properties
5454

5555

56-
properties (Transient, NonCopyable, ...
57-
Access = {?wt.apps.BaseApp, ?matlab.uitest.TestCase} )
56+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
5857

5958
% Last used folder (for file operations)
6059
LastFolder (1,1) string = pwd

widgets/+wt/+model/BaseModel.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
% to enable apps/widgets to listen to model changes
99
%
1010

11-
% Copyright 2020-2021 The MathWorks, Inc.
11+
% Copyright 2020-2023 The MathWorks, Inc.
1212

1313

1414

@@ -23,8 +23,7 @@
2323

2424

2525
%% Internal Properties
26-
properties ( Transient, NonCopyable, ...
27-
Access = {?wt.abstract.BaseWidget, ?matlab.uitest.TestCase} )
26+
properties (Transient, NonCopyable, Hidden, SetAccess = private)
2827

2928
% Listeners to public properties
3029
PropListeners

widgets/+wt/ButtonGrid.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
% Array of buttons with a single callback/event
77

8-
% Copyright 2020-2022 The MathWorks Inc.
8+
% Copyright 2020-2023 The MathWorks Inc.
99

1010

1111
%% Events
@@ -58,9 +58,8 @@
5858

5959

6060
%% Internal Properties
61-
properties ( Transient, NonCopyable, ...
62-
Access = {?matlab.ui.componentcontainer.ComponentContainer, ?matlab.uitest.TestCase} )
63-
61+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
62+
6463
% Buttons (other widgets like ListSelector also access this)
6564
Button (1,:) matlab.ui.control.Button
6665

widgets/+wt/CheckboxList.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
% List of checkbox items
66

7-
% Copyright 2020-2022 The MathWorks Inc.
7+
% Copyright 2020-2023 The MathWorks Inc.
88

99

1010
%% Public properties
@@ -42,8 +42,7 @@
4242

4343

4444
%% Internal Properties
45-
properties ( Transient, NonCopyable, ...
46-
Access = {?matlab.uitest.TestCase, ?matlab.ui.componentcontainer.ComponentContainer} )
45+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
4746

4847
% Item checkboxes
4948
ItemCheck (1,:) matlab.ui.control.CheckBox

widgets/+wt/ListSelector.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
% Select from an array of items and add them to a list
77

8-
% Copyright 2020-2022 The MathWorks Inc.
8+
% Copyright 2020-2023 The MathWorks Inc.
99

1010

1111
%% Events
@@ -80,9 +80,8 @@
8080

8181

8282
%% Internal Properties
83-
properties (Transient, NonCopyable, ...
84-
Access = {?matlab.uitest.TestCase, ?matlab.ui.componentcontainer.ComponentContainer})
85-
83+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
84+
8685
% The ListBox control
8786
ListBox (1,1) matlab.ui.control.ListBox
8887

widgets/+wt/ListSelectorTwoPane.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
% Dual lists where selected items are moved from left to right
88

9-
% Copyright 2020-2022 The MathWorks Inc.
9+
% Copyright 2020-2023 The MathWorks Inc.
1010

1111

1212
%% Events
@@ -77,9 +77,8 @@
7777

7878

7979
%% Internal Properties
80-
properties ( Transient, NonCopyable, ...
81-
Access = {?matlab.uitest.TestCase, ?matlab.ui.componentcontainer.ComponentContainer} )
82-
80+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
81+
8382
% The left listbox control
8483
LeftList (1,1) matlab.ui.control.ListBox
8584

widgets/+wt/PasswordField.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
% A password entry field
55

6-
% Copyright 2020-2022 The MathWorks Inc.
6+
% Copyright 2020-2023 The MathWorks Inc.
77

88

99
%% Public properties
@@ -30,8 +30,7 @@
3030

3131

3232
%% Internal Properties
33-
properties (Transient, NonCopyable, ...
34-
Access = {?matlab.uitest.TestCase, ?matlab.ui.componentcontainer.ComponentContainer} )
33+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
3534

3635
% Grid
3736
Grid (1,1) matlab.ui.container.GridLayout

widgets/+wt/ProgressBar.m

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
% A progress bar with status and cancel button
66

7-
% Copyright 2020-2022 The MathWorks Inc.
7+
% Copyright 2020-2023 The MathWorks Inc.
88

99

1010
%% Events
@@ -71,9 +71,8 @@
7171

7272

7373
%% Internal Properties
74-
properties ( Transient, NonCopyable, ...
75-
Access = {?matlab.uitest.TestCase, ?matlab.ui.componentcontainer.ComponentContainer} )
76-
74+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
75+
7776
% Progress panel
7877
ProgressPanel (1,1) matlab.ui.container.Panel
7978

widgets/+wt/SliderCheckboxGroup.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
% A group of sliders with checkboxes, useful for visibility of various
77
% layers of imagery
88

9-
% Copyright 2020-2022 The MathWorks Inc.
9+
% Copyright 2020-2023 The MathWorks Inc.
1010

1111

1212
%% Events
@@ -48,8 +48,7 @@
4848

4949

5050
%% Internal Properties
51-
properties ( Transient, NonCopyable, ...
52-
Access = {?matlab.ui.componentcontainer.ComponentContainer, ?matlab.uitest.TestCase} )
51+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
5352

5453
% Grid for Layout
5554
Grid (1,1) matlab.ui.container.GridLayout

widgets/+wt/SliderSpinner.m

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
% A slider and spinner combination
77

8-
% Copyright 2020-2022 The MathWorks Inc.
8+
% Copyright 2020-2023 The MathWorks Inc.
99

1010

1111
%% Public properties
@@ -71,8 +71,7 @@
7171

7272

7373
%% Internal Properties
74-
properties ( Transient, NonCopyable, ...
75-
Access = {?matlab.ui.componentcontainer.ComponentContainer, ?matlab.uitest.TestCase} )
74+
properties (Transient, NonCopyable, Hidden, SetAccess = protected)
7675

7776
% Grid Layout
7877
Grid (1,1) matlab.ui.container.GridLayout

0 commit comments

Comments
 (0)