|
74 | 74 | toSplit % Struct array of Block and corresponding Animal to split |
75 | 75 | toAdd % Struct array of Block and corresponding Animal to add |
76 | 76 | end |
| 77 | + |
| 78 | + properties (Access=private) |
| 79 | + warningsToSolence = {'MATLAB:ui:javacomponent:FunctionToBeRemoved'; |
| 80 | + 'MATLAB:ui:javaframe:PropertyToBeRemoved'}; |
| 81 | + end |
77 | 82 | % % % % % % % % % % END PROPERTIES % |
78 | 83 |
|
79 | 84 | % % % EVENTS % % % % % % % % % % % % |
|
105 | 110 | % be created separate from a Tank, but in order to use this |
106 | 111 | % interface, you must have a Tank object. |
107 | 112 |
|
| 113 | + |
| 114 | + % turn off java warnings |
| 115 | + for ii=1:numel(obj.warningsToSolence) |
| 116 | + warnID = obj.warningsToSolence{ii}; |
| 117 | + warning('off',warnID); |
| 118 | + end |
| 119 | + |
| 120 | + |
108 | 121 | % Check input |
109 | 122 | if nargin < 1 |
110 | 123 | obj = nigeLab.libs.DashBoard.empty(); % Empty DashBoard |
|
168 | 181 | % Add "rollover" interaction mediator for nigelButtons |
169 | 182 | obj.RollOver = nigeLab.utils.Mouse.rollover(... |
170 | 183 | obj.nigelGUI,[obj.nigelButtons.Tree,obj.nigelButtons.TitleBar]); |
| 184 | + |
| 185 | + |
| 186 | + |
171 | 187 | end |
172 | 188 | end |
173 | 189 |
|
@@ -852,6 +868,13 @@ function deleteDashBoard(obj) |
852 | 868 | obj.nigelGUI(:) = []; % Remove object so not deleted twice |
853 | 869 | delete(obj); |
854 | 870 |
|
| 871 | + |
| 872 | + % turn on java warnings previously deactivated |
| 873 | + for ii=1:numel(obj.warningsToSolence) |
| 874 | + warnID = obj.warningsToSolence{ii}; |
| 875 | + warning('on',warnID); |
| 876 | + end |
| 877 | + |
855 | 878 | end |
856 | 879 |
|
857 | 880 | % Delete all current event.listener object handles |
@@ -1103,15 +1126,15 @@ function refreshStats(obj,~,evt) |
1103 | 1126 | h = obj.Tree.SelectedItems; |
1104 | 1127 | switch h.Type |
1105 | 1128 | case 'Tank' |
1106 | | - [~,a] = getSelectedItems('obj'); |
| 1129 | + a = b.Parent; |
1107 | 1130 | a_all = h.Children; |
1108 | 1131 | idx = ismember(a_all,a); |
1109 | 1132 | status = getStatus(h,[]); |
1110 | | - obj.Status = status(idx,:); |
| 1133 | + obj.Status(idx,:) = status(idx,:); |
1111 | 1134 | obj.Mask = nigeLab.libs.DashBoard.animal2info(h); |
1112 | 1135 |
|
1113 | 1136 | case 'Animal' |
1114 | | - b_all = getSelectedItems('obj'); |
| 1137 | + b_all = obj.Tree.SelectedBlocks; |
1115 | 1138 | idx = find(b==b_all,1,'first'); |
1116 | 1139 | obj.Status(idx,:) = getStatus(b,[]); |
1117 | 1140 | obj.Mask = nigeLab.libs.DashBoard.animal2info(h); |
|
0 commit comments