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 | | |
20 | super(tabName, placeholder); | |
21 | | |
22 |
1
1. <init> : removed call to javax/swing/text/StyleConstants::setForeground → NO_COVERAGE |
StyleConstants.setForeground(this.attributeTimestamp, new Color(75, 143, 211)); |
23 | } | |
24 | ||
25 | @Override | |
26 | public SimpleAttributeSet getColorAttribute() { | |
27 |
1
1. getColorAttribute : replaced return value with null for com/jsql/view/swing/console/SimpleConsoleAdapter::getColorAttribute → NO_COVERAGE |
return this.attributeTimestamp; |
28 | } | |
29 | } | |
Mutations | ||
22 |
1.1 |
|
27 |
1.1 |