RadioItemPreventClose.java

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

Mutations

21

1.1
Location : processMouseEvent
Killed by : none
negated conditional → NO_COVERAGE

22

1.1
Location : processMouseEvent
Killed by : none
removed call to javax/swing/JRadioButtonMenuItem::processMouseEvent → NO_COVERAGE

26

1.1
Location : preventClose
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : preventClose
Killed by : none
negated conditional → NO_COVERAGE

27

1.1
Location : preventClose
Killed by : none
removed call to javax/swing/JMenuItem::doClick → NO_COVERAGE

28

1.1
Location : preventClose
Killed by : none
removed call to javax/swing/JMenuItem::setArmed → NO_COVERAGE

29

1.1
Location : preventClose
Killed by : none
replaced boolean return with false for com/jsql/view/swing/util/RadioItemPreventClose::preventClose → NO_COVERAGE

31

1.1
Location : preventClose
Killed by : none
replaced boolean return with true for com/jsql/view/swing/util/RadioItemPreventClose::preventClose → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.1