JavaConsoleAdapter.java

1
package com.jsql.view.swing.console;
2
3
import javax.swing.text.SimpleAttributeSet;
4
import javax.swing.text.StyleConstants;
5
import java.awt.*;
6
7
/**
8
 * A textpane with color.
9
 */
10
public class JavaConsoleAdapter extends AbstractColoredConsole {
11
    
12
    private final SimpleAttributeSet attributeTimestamp = new SimpleAttributeSet();
13
    
14
    /**
15
     * Create adapter for java console.
16
     * @param tabName Default text
17
     */
18
    public JavaConsoleAdapter(String tabName, String placeholder) {
19
        
20
        super(tabName, placeholder);
21
        
22 1 1. <init> : removed call to javax/swing/text/StyleConstants::setForeground → NO_COVERAGE
        StyleConstants.setForeground(this.attributeTimestamp, Color.RED);
23
    }
24
25
    @Override
26
    public SimpleAttributeSet getColorAttribute() {
27 1 1. getColorAttribute : replaced return value with null for com/jsql/view/swing/console/JavaConsoleAdapter::getColorAttribute → NO_COVERAGE
        return this.attributeTimestamp;
28
    }
29
}

Mutations

22

1.1
Location : <init>
Killed by : none
removed call to javax/swing/text/StyleConstants::setForeground → NO_COVERAGE

27

1.1
Location : getColorAttribute
Killed by : none
replaced return value with null for com/jsql/view/swing/console/JavaConsoleAdapter::getColorAttribute → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1