JButtonStateful.java

1
package com.jsql.view.swing.manager.util;
2
3
import com.jsql.view.swing.util.I18nViewUtil;
4
5
import javax.swing.*;
6
7
public class JButtonStateful extends JButton {
8
9
    /**
10
     * State of current injection.
11
     */
12
    private StateButton state = StateButton.STARTABLE;
13
    
14
    private String defaultText;
15
16
    public JButtonStateful(String defaultText) {
17
        
18
        super(I18nViewUtil.valueByKey(defaultText));
19
        this.defaultText = defaultText;
20
    }
21
    
22
    
23
    // Getter and setter
24
25
    /**
26
     * Return the current state of current process.
27
     * @return State of process
28
     */
29
    public StateButton getState() {
30 1 1. getState : replaced return value with null for com/jsql/view/swing/manager/util/JButtonStateful::getState → NO_COVERAGE
        return this.state;
31
    }
32
    
33
    public void setState(StateButton state) {
34
        this.state = state;
35
    }
36
37
    public String getDefaultText() {
38 1 1. getDefaultText : replaced return value with "" for com/jsql/view/swing/manager/util/JButtonStateful::getDefaultText → NO_COVERAGE
        return this.defaultText;
39
    }
40
41
    public void setDefaultText(String defaultText) {
42
        this.defaultText = defaultText;
43
    }
44
}

Mutations

30

1.1
Location : getState
Killed by : none
replaced return value with null for com/jsql/view/swing/manager/util/JButtonStateful::getState → NO_COVERAGE

38

1.1
Location : getDefaultText
Killed by : none
replaced return value with "" for com/jsql/view/swing/manager/util/JButtonStateful::getDefaultText → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1