SimpleConsoleAdapter.java

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

Mutations

21

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

26

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

Active mutators

Tests examined


Report generated by PIT 1.22.0