1 | package com.jsql.view.swing.panel.preferences; | |
2 | ||
3 | import com.jsql.view.swing.panel.PanelPreferences; | |
4 | import com.jsql.view.swing.util.MediatorHelper; | |
5 | import org.apache.commons.lang3.StringUtils; | |
6 | ||
7 | import javax.swing.*; | |
8 | import java.util.stream.Stream; | |
9 | ||
10 | public class PanelStrategies extends JPanel { | |
11 | ||
12 | private final JCheckBox checkboxIsStrategyTimeDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyTimeDisabled()); | |
13 | private final JCheckBox checkboxIsStrategyBlindDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyBlindDisabled()); | |
14 | private final JCheckBox checkboxIsStrategyMultibitDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyMultibitDisabled()); | |
15 | private final JCheckBox checkboxIsStrategyErrorDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyErrorDisabled()); | |
16 | private final JCheckBox checkboxIsStrategyStackedDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyStackedDisabled()); | |
17 | private final JCheckBox checkboxIsStrategyNormalDisabled = new JCheckBox(StringUtils.EMPTY, MediatorHelper.model().getMediatorUtils().getPreferencesUtil().isStrategyNormalDisabled()); | |
18 | ||
19 | public PanelStrategies(PanelPreferences panelPreferences) { | |
20 | | |
21 |
1
1. <init> : removed call to com/jsql/view/swing/panel/preferences/PanelStrategies::setBorder → NO_COVERAGE |
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); |
22 | | |
23 | String tooltipIsStrategyTimeDisabled = "Skip Time strategy processing"; | |
24 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyTimeDisabled.setToolTipText(tooltipIsStrategyTimeDisabled); |
25 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyTimeDisabled.setFocusable(false); |
26 | var labelIsStrategyTimeDisabled = new JButton("Disable Time"); | |
27 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyTimeDisabled.setToolTipText(tooltipIsStrategyTimeDisabled); |
28 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyTimeDisabled.addActionListener(actionEvent -> { |
29 | | |
30 |
2
1. lambda$new$0 : negated conditional → NO_COVERAGE 2. lambda$new$0 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsStrategyTimeDisabled.setSelected(!this.checkboxIsStrategyTimeDisabled.isSelected()); |
31 |
1
1. lambda$new$0 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
32 | }); | |
33 | ||
34 | String tooltipIsStrategyBlindDisabled = "Skip Blind strategy processing"; | |
35 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyBlindDisabled.setToolTipText(tooltipIsStrategyBlindDisabled); |
36 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyBlindDisabled.setFocusable(false); |
37 | var labelIsStrategyBlindDisabled = new JButton("Disable Blind"); | |
38 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyBlindDisabled.setToolTipText(tooltipIsStrategyBlindDisabled); |
39 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyBlindDisabled.addActionListener(actionEvent -> { |
40 | ||
41 |
2
1. lambda$new$1 : negated conditional → NO_COVERAGE 2. lambda$new$1 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsStrategyBlindDisabled.setSelected(!this.checkboxIsStrategyBlindDisabled.isSelected()); |
42 |
1
1. lambda$new$1 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
43 | }); | |
44 | ||
45 | String tooltipIsStrategyMultibitDisabled = "Skip Multibit strategy processing"; | |
46 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyMultibitDisabled.setToolTipText(tooltipIsStrategyMultibitDisabled); |
47 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyMultibitDisabled.setFocusable(false); |
48 | var labelIsStrategyMultibitDisabled = new JButton("Disable Multibit"); | |
49 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyMultibitDisabled.setToolTipText(tooltipIsStrategyMultibitDisabled); |
50 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyMultibitDisabled.addActionListener(actionEvent -> { |
51 | ||
52 |
2
1. lambda$new$2 : negated conditional → NO_COVERAGE 2. lambda$new$2 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsStrategyMultibitDisabled.setSelected(!this.checkboxIsStrategyMultibitDisabled.isSelected()); |
53 |
1
1. lambda$new$2 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
54 | }); | |
55 | ||
56 | String tooltipIsStrategyErrorDisabled = "Skip Error strategy processing"; | |
57 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyErrorDisabled.setToolTipText(tooltipIsStrategyErrorDisabled); |
58 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyErrorDisabled.setFocusable(false); |
59 | var labelIsStrategyErrorDisabled = new JButton("Disable Error"); | |
60 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyErrorDisabled.setToolTipText(tooltipIsStrategyErrorDisabled); |
61 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyErrorDisabled.addActionListener(actionEvent -> { |
62 | ||
63 |
2
1. lambda$new$3 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE 2. lambda$new$3 : negated conditional → NO_COVERAGE |
this.checkboxIsStrategyErrorDisabled.setSelected(!this.checkboxIsStrategyErrorDisabled.isSelected()); |
64 |
1
1. lambda$new$3 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
65 | }); | |
66 | ||
67 | String tooltipIsStrategyStackedDisabled = "Skip Stacked strategy processing"; | |
68 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyStackedDisabled.setToolTipText(tooltipIsStrategyStackedDisabled); |
69 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyStackedDisabled.setFocusable(false); |
70 | var labelIsStrategyStackedDisabled = new JButton("Disable Stacked"); | |
71 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyStackedDisabled.setToolTipText(tooltipIsStrategyStackedDisabled); |
72 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyStackedDisabled.addActionListener(actionEvent -> { |
73 | ||
74 |
2
1. lambda$new$4 : negated conditional → NO_COVERAGE 2. lambda$new$4 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsStrategyStackedDisabled.setSelected(!this.checkboxIsStrategyStackedDisabled.isSelected()); |
75 |
1
1. lambda$new$4 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
76 | }); | |
77 | ||
78 | String tooltipIsStrategyNormalDisabled = "Skip Normal strategy processing"; | |
79 |
1
1. <init> : removed call to javax/swing/JCheckBox::setToolTipText → NO_COVERAGE |
this.checkboxIsStrategyNormalDisabled.setToolTipText(tooltipIsStrategyNormalDisabled); |
80 |
1
1. <init> : removed call to javax/swing/JCheckBox::setFocusable → NO_COVERAGE |
this.checkboxIsStrategyNormalDisabled.setFocusable(false); |
81 | var labelIsStrategyNormalDisabled = new JButton("Disable Normal"); | |
82 |
1
1. <init> : removed call to javax/swing/JButton::setToolTipText → NO_COVERAGE |
labelIsStrategyNormalDisabled.setToolTipText(tooltipIsStrategyNormalDisabled); |
83 |
1
1. <init> : removed call to javax/swing/JButton::addActionListener → NO_COVERAGE |
labelIsStrategyNormalDisabled.addActionListener(actionEvent -> { |
84 | ||
85 |
2
1. lambda$new$5 : negated conditional → NO_COVERAGE 2. lambda$new$5 : removed call to javax/swing/JCheckBox::setSelected → NO_COVERAGE |
this.checkboxIsStrategyNormalDisabled.setSelected(!this.checkboxIsStrategyNormalDisabled.isSelected()); |
86 |
1
1. lambda$new$5 : removed call to java/awt/event/ActionListener::actionPerformed → NO_COVERAGE |
panelPreferences.getActionListenerSave().actionPerformed(null); |
87 | }); | |
88 | | |
89 | Stream.of( | |
90 | labelIsStrategyTimeDisabled, | |
91 | labelIsStrategyBlindDisabled, | |
92 | labelIsStrategyMultibitDisabled, | |
93 | labelIsStrategyErrorDisabled, | |
94 | labelIsStrategyStackedDisabled, | |
95 | labelIsStrategyNormalDisabled | |
96 | ) | |
97 |
1
1. <init> : removed call to java/util/stream/Stream::forEach → NO_COVERAGE |
.forEach(label -> { |
98 | | |
99 |
1
1. lambda$new$6 : removed call to javax/swing/JButton::setHorizontalAlignment → NO_COVERAGE |
label.setHorizontalAlignment(SwingConstants.LEFT); |
100 |
1
1. lambda$new$6 : removed call to javax/swing/JButton::setBorderPainted → NO_COVERAGE |
label.setBorderPainted(false); |
101 |
1
1. lambda$new$6 : removed call to javax/swing/JButton::setContentAreaFilled → NO_COVERAGE |
label.setContentAreaFilled(false); |
102 | }); | |
103 | ||
104 | var groupLayout = new GroupLayout(this); | |
105 |
1
1. <init> : removed call to com/jsql/view/swing/panel/preferences/PanelStrategies::setLayout → NO_COVERAGE |
this.setLayout(groupLayout); |
106 | | |
107 | groupLayout | |
108 |
1
1. <init> : removed call to javax/swing/GroupLayout::setHorizontalGroup → NO_COVERAGE |
.setHorizontalGroup( |
109 | groupLayout | |
110 | .createSequentialGroup() | |
111 | .addGroup( | |
112 | groupLayout | |
113 | .createParallelGroup(GroupLayout.Alignment.TRAILING, false) | |
114 | .addComponent(this.checkboxIsStrategyTimeDisabled) | |
115 | .addComponent(this.checkboxIsStrategyBlindDisabled) | |
116 | .addComponent(this.checkboxIsStrategyMultibitDisabled) | |
117 | .addComponent(this.checkboxIsStrategyErrorDisabled) | |
118 | .addComponent(this.checkboxIsStrategyStackedDisabled) | |
119 | .addComponent(this.checkboxIsStrategyNormalDisabled) | |
120 | ) | |
121 | .addGroup( | |
122 | groupLayout | |
123 | .createParallelGroup() | |
124 | .addComponent(labelIsStrategyTimeDisabled) | |
125 | .addComponent(labelIsStrategyBlindDisabled) | |
126 | .addComponent(labelIsStrategyMultibitDisabled) | |
127 | .addComponent(labelIsStrategyErrorDisabled) | |
128 | .addComponent(labelIsStrategyStackedDisabled) | |
129 | .addComponent(labelIsStrategyNormalDisabled) | |
130 | ) | |
131 | ); | |
132 | | |
133 | groupLayout | |
134 |
1
1. <init> : removed call to javax/swing/GroupLayout::setVerticalGroup → NO_COVERAGE |
.setVerticalGroup( |
135 | groupLayout | |
136 | .createSequentialGroup() | |
137 | .addGroup( | |
138 | groupLayout | |
139 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
140 | .addComponent(this.checkboxIsStrategyTimeDisabled) | |
141 | .addComponent(labelIsStrategyTimeDisabled) | |
142 | ) | |
143 | .addGroup( | |
144 | groupLayout | |
145 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
146 | .addComponent(this.checkboxIsStrategyBlindDisabled) | |
147 | .addComponent(labelIsStrategyBlindDisabled) | |
148 | ) | |
149 | .addGroup( | |
150 | groupLayout | |
151 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
152 | .addComponent(this.checkboxIsStrategyMultibitDisabled) | |
153 | .addComponent(labelIsStrategyMultibitDisabled) | |
154 | ) | |
155 | .addGroup( | |
156 | groupLayout | |
157 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
158 | .addComponent(this.checkboxIsStrategyErrorDisabled) | |
159 | .addComponent(labelIsStrategyErrorDisabled) | |
160 | ) | |
161 | .addGroup( | |
162 | groupLayout | |
163 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
164 | .addComponent(this.checkboxIsStrategyStackedDisabled) | |
165 | .addComponent(labelIsStrategyStackedDisabled) | |
166 | ) | |
167 | .addGroup( | |
168 | groupLayout | |
169 | .createParallelGroup(GroupLayout.Alignment.BASELINE) | |
170 | .addComponent(this.checkboxIsStrategyNormalDisabled) | |
171 | .addComponent(labelIsStrategyNormalDisabled) | |
172 | ) | |
173 | ); | |
174 | | |
175 | Stream.of( | |
176 | this.checkboxIsStrategyTimeDisabled, | |
177 | this.checkboxIsStrategyBlindDisabled, | |
178 | this.checkboxIsStrategyMultibitDisabled, | |
179 | this.checkboxIsStrategyErrorDisabled, | |
180 | this.checkboxIsStrategyStackedDisabled, | |
181 | this.checkboxIsStrategyNormalDisabled | |
182 | ) | |
183 |
2
1. <init> : removed call to java/util/stream/Stream::forEach → NO_COVERAGE 2. lambda$new$7 : removed call to javax/swing/JCheckBox::addActionListener → NO_COVERAGE |
.forEach(button -> button.addActionListener(panelPreferences.getActionListenerSave())); |
184 | } | |
185 | | |
186 | | |
187 | // Getter and setter | |
188 | ||
189 | public JCheckBox getCheckboxIsStrategyTimeDisabled() { | |
190 |
1
1. getCheckboxIsStrategyTimeDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyTimeDisabled → NO_COVERAGE |
return checkboxIsStrategyTimeDisabled; |
191 | } | |
192 | ||
193 | public JCheckBox getCheckboxIsStrategyBlindDisabled() { | |
194 |
1
1. getCheckboxIsStrategyBlindDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyBlindDisabled → NO_COVERAGE |
return checkboxIsStrategyBlindDisabled; |
195 | } | |
196 | ||
197 | public JCheckBox getCheckboxIsStrategyStackedDisabled() { | |
198 |
1
1. getCheckboxIsStrategyStackedDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyStackedDisabled → NO_COVERAGE |
return checkboxIsStrategyStackedDisabled; |
199 | } | |
200 | ||
201 | public JCheckBox getCheckboxIsStrategyMultibitDisabled() { | |
202 |
1
1. getCheckboxIsStrategyMultibitDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyMultibitDisabled → NO_COVERAGE |
return checkboxIsStrategyMultibitDisabled; |
203 | } | |
204 | ||
205 | public JCheckBox getCheckboxIsStrategyErrorDisabled() { | |
206 |
1
1. getCheckboxIsStrategyErrorDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyErrorDisabled → NO_COVERAGE |
return checkboxIsStrategyErrorDisabled; |
207 | } | |
208 | ||
209 | public JCheckBox getCheckboxIsStrategyNormalDisabled() { | |
210 |
1
1. getCheckboxIsStrategyNormalDisabled : replaced return value with null for com/jsql/view/swing/panel/preferences/PanelStrategies::getCheckboxIsStrategyNormalDisabled → NO_COVERAGE |
return checkboxIsStrategyNormalDisabled; |
211 | } | |
212 | } | |
Mutations | ||
21 |
1.1 |
|
24 |
1.1 |
|
25 |
1.1 |
|
27 |
1.1 |
|
28 |
1.1 |
|
30 |
1.1 2.2 |
|
31 |
1.1 |
|
35 |
1.1 |
|
36 |
1.1 |
|
38 |
1.1 |
|
39 |
1.1 |
|
41 |
1.1 2.2 |
|
42 |
1.1 |
|
46 |
1.1 |
|
47 |
1.1 |
|
49 |
1.1 |
|
50 |
1.1 |
|
52 |
1.1 2.2 |
|
53 |
1.1 |
|
57 |
1.1 |
|
58 |
1.1 |
|
60 |
1.1 |
|
61 |
1.1 |
|
63 |
1.1 2.2 |
|
64 |
1.1 |
|
68 |
1.1 |
|
69 |
1.1 |
|
71 |
1.1 |
|
72 |
1.1 |
|
74 |
1.1 2.2 |
|
75 |
1.1 |
|
79 |
1.1 |
|
80 |
1.1 |
|
82 |
1.1 |
|
83 |
1.1 |
|
85 |
1.1 2.2 |
|
86 |
1.1 |
|
97 |
1.1 |
|
99 |
1.1 |
|
100 |
1.1 |
|
101 |
1.1 |
|
105 |
1.1 |
|
108 |
1.1 |
|
134 |
1.1 |
|
183 |
1.1 2.2 |
|
190 |
1.1 |
|
194 |
1.1 |
|
198 |
1.1 |
|
202 |
1.1 |
|
206 |
1.1 |
|
210 |
1.1 |