| 1 | package com.jsql.view.swing.util; | |
| 2 | ||
| 3 | import javax.swing.*; | |
| 4 | import java.awt.event.MouseEvent; | |
| 5 | ||
| 6 | public class RadioItemNonClosing extends JRadioButtonMenuItem { | |
| 7 | ||
| 8 | public RadioItemNonClosing(String text) { | |
| 9 | super(text); | |
| 10 | } | |
| 11 | ||
| 12 | public RadioItemNonClosing(String text, boolean selected) { | |
| 13 | super(text, selected); | |
| 14 | } | |
| 15 | ||
| 16 | public RadioItemNonClosing(String text, ImageIcon icon, boolean selected) { | |
| 17 | super(text, icon, selected); | |
| 18 | } | |
| 19 | ||
| 20 | public RadioItemNonClosing(AbstractAction a) { | |
| 21 | super(a); | |
| 22 | } | |
| 23 | ||
| 24 | @Override | |
| 25 | protected void processMouseEvent(MouseEvent e) { | |
| 26 |
1
1. processMouseEvent : negated conditional → NO_COVERAGE |
if (RadioItemNonClosing.shouldClose(e, this)) { |
| 27 |
1
1. processMouseEvent : removed call to javax/swing/JRadioButtonMenuItem::processMouseEvent → NO_COVERAGE |
super.processMouseEvent(e); |
| 28 | } | |
| 29 | } | |
| 30 | ||
| 31 | public static boolean shouldClose(MouseEvent e, JMenuItem m) { | |
| 32 |
2
1. shouldClose : negated conditional → NO_COVERAGE 2. shouldClose : negated conditional → NO_COVERAGE |
if (e.getID() == MouseEvent.MOUSE_RELEASED && m.contains(e.getPoint())) { |
| 33 |
1
1. shouldClose : removed call to javax/swing/JMenuItem::doClick → NO_COVERAGE |
m.doClick(); |
| 34 |
1
1. shouldClose : removed call to javax/swing/JMenuItem::setArmed → NO_COVERAGE |
m.setArmed(true); |
| 35 |
1
1. shouldClose : replaced boolean return with true for com/jsql/view/swing/util/RadioItemNonClosing::shouldClose → NO_COVERAGE |
return false; |
| 36 | } | |
| 37 |
1
1. shouldClose : replaced boolean return with false for com/jsql/view/swing/util/RadioItemNonClosing::shouldClose → NO_COVERAGE |
return true; |
| 38 | } | |
| 39 | } | |
Mutations | ||
| 26 |
1.1 |
|
| 27 |
1.1 |
|
| 32 |
1.1 2.2 |
|
| 33 |
1.1 |
|
| 34 |
1.1 |
|
| 35 |
1.1 |
|
| 37 |
1.1 |