ActionHideShowResult.java

1
package com.jsql.view.swing.panel.split;
2
3
import com.jsql.view.swing.util.MediatorHelper;
4
5
import javax.swing.*;
6
import java.awt.event.ActionEvent;
7
import java.awt.event.ActionListener;
8
9
/**
10
 * MouseAdapter to show/hide bottom panel.
11
 */
12
public class ActionHideShowResult implements ActionListener {
13
    
14
    /**
15
     * Hide bottom panel if both main and bottom are visible, also
16
     * displays an ersatz bar replacing tabbedpane.
17
     * Or else if only main panel is visible then displays bottom panel
18
     * and hide ersatz panel.
19
     */
20
    @Override
21
    public void actionPerformed(ActionEvent e) {
22
        var split = MediatorHelper.frame().getSplitNS();
23 2 1. actionPerformed : negated conditional → NO_COVERAGE
2. actionPerformed : negated conditional → NO_COVERAGE
        if (split.getTopComponent().isVisible() && split.getBottomComponent().isVisible()) {
24 1 1. actionPerformed : removed call to com/jsql/view/swing/panel/PanelConsoles::setDividerLocation → NO_COVERAGE
            MediatorHelper.panelConsoles().setDividerLocation(split.getDividerLocation());
25 1 1. actionPerformed : removed call to java/awt/Component::setVisible → NO_COVERAGE
            split.getTopComponent().setVisible(false);
26 1 1. actionPerformed : removed call to javax/swing/JLabel::setVisible → NO_COVERAGE
            MediatorHelper.panelConsoles().getLabelShowNorth().setVisible(false);
27 1 1. actionPerformed : removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerSize → NO_COVERAGE
            split.setDividerSize(0);  // required to hide bar
28 2 1. actionPerformed : negated conditional → NO_COVERAGE
2. actionPerformed : negated conditional → NO_COVERAGE
        } else if (split.getTopComponent().isVisible() && !split.getBottomComponent().isVisible()) {
29 1 1. actionPerformed : removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerLocation → NO_COVERAGE
            split.setDividerLocation(MediatorHelper.panelConsoles().getDividerLocation());
30 1 1. actionPerformed : removed call to java/awt/Component::setVisible → NO_COVERAGE
            split.getBottomComponent().setVisible(true);
31 1 1. actionPerformed : removed call to java/awt/Component::setVisible → NO_COVERAGE
            split.getTopComponent().setVisible(true);
32 1 1. actionPerformed : removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerSize → NO_COVERAGE
            split.setDividerSize(UIManager.getInt("SplitPane.dividerSize"));
33
        }
34
    }
35
}

Mutations

23

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

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

24

1.1
Location : actionPerformed
Killed by : none
removed call to com/jsql/view/swing/panel/PanelConsoles::setDividerLocation → NO_COVERAGE

25

1.1
Location : actionPerformed
Killed by : none
removed call to java/awt/Component::setVisible → NO_COVERAGE

26

1.1
Location : actionPerformed
Killed by : none
removed call to javax/swing/JLabel::setVisible → NO_COVERAGE

27

1.1
Location : actionPerformed
Killed by : none
removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerSize → NO_COVERAGE

28

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

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

29

1.1
Location : actionPerformed
Killed by : none
removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerLocation → NO_COVERAGE

30

1.1
Location : actionPerformed
Killed by : none
removed call to java/awt/Component::setVisible → NO_COVERAGE

31

1.1
Location : actionPerformed
Killed by : none
removed call to java/awt/Component::setVisible → NO_COVERAGE

32

1.1
Location : actionPerformed
Killed by : none
removed call to com/jsql/view/swing/panel/split/SplitNS::setDividerSize → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.19.1