SimpleConsoleAdapter.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 SimpleConsoleAdapter extends AbstractColoredConsole {
11
    
12
    private final SimpleAttributeSet attributeTimestamp = new SimpleAttributeSet();
13
    
14
    /**
15
     * Create adapter for console.
16
     * @param tabName Default text
17
     */
18
    public SimpleConsoleAdapter(String tabName, String placeholder) {
19
        super(tabName, placeholder);
20 1 1. <init> : removed call to javax/swing/text/StyleConstants::setForeground → NO_COVERAGE
        StyleConstants.setForeground(this.attributeTimestamp, new Color(0x555555));  // timestamp color
21
    }
22
23
    @Override
24
    public SimpleAttributeSet getColorAttribute() {
25 1 1. getColorAttribute : replaced return value with null for com/jsql/view/swing/console/SimpleConsoleAdapter::getColorAttribute → NO_COVERAGE
        return this.attributeTimestamp;
26
    }
27
}

Mutations

20

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

25

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.19.1