CreateTabHelper.java

1
package com.jsql.view.swing.interaction;
2
3
import com.jsql.util.I18nUtil;
4
import com.jsql.view.swing.util.MediatorHelper;
5
6
import javax.swing.*;
7
import java.awt.*;
8
9
/**
10
 * Set result tab panel orientation according to locale when first
11
 * tab is inserted.
12
 */
13
public class CreateTabHelper {
14
15
    protected CreateTabHelper() {
16 1 1. <init> : removed call to com/jsql/view/swing/interaction/CreateTabHelper::initializeSplitOrientation → NO_COVERAGE
        CreateTabHelper.initializeSplitOrientation();
17
    }
18
    
19
    /**
20
     * Switch left component with right component when locale orientation requires this.
21
     */
22
    public static void initializeSplitOrientation() {
23
        
24 1 1. initializeSplitOrientation : negated conditional → NO_COVERAGE
        if (MediatorHelper.tabResults().getTabCount() == 0) {
25
            
26
            JSplitPane splitPaneLeftRight = MediatorHelper.frame().getSplitHorizontalTopBottom().getSplitVerticalLeftRight();
27
            int dividerLocation = splitPaneLeftRight.getDividerLocation();
28
            
29 1 1. initializeSplitOrientation : negated conditional → NO_COVERAGE
            if (ComponentOrientation.RIGHT_TO_LEFT.equals(ComponentOrientation.getOrientation(I18nUtil.getLocaleDefault()))) {
30 1 1. initializeSplitOrientation : removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE
                splitPaneLeftRight.setLeftComponent(MediatorHelper.tabResults());
31
            } else {
32 1 1. initializeSplitOrientation : removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE
                splitPaneLeftRight.setRightComponent(MediatorHelper.tabResults());
33
            }
34
            
35 1 1. initializeSplitOrientation : removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE
            splitPaneLeftRight.setDividerLocation(dividerLocation);
36
        }
37
    }
38
}

Mutations

16

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/interaction/CreateTabHelper::initializeSplitOrientation → NO_COVERAGE

24

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

29

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

30

1.1
Location : initializeSplitOrientation
Killed by : none
removed call to javax/swing/JSplitPane::setLeftComponent → NO_COVERAGE

32

1.1
Location : initializeSplitOrientation
Killed by : none
removed call to javax/swing/JSplitPane::setRightComponent → NO_COVERAGE

35

1.1
Location : initializeSplitOrientation
Killed by : none
removed call to javax/swing/JSplitPane::setDividerLocation → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1