| 1 | package com.jsql.view.swing.manager.util; | |
| 2 | ||
| 3 | import com.jsql.model.accessible.ExploitMode; | |
| 4 | import com.jsql.view.swing.util.I18nViewUtil; | |
| 5 | ||
| 6 | import javax.swing.*; | |
| 7 | import java.awt.*; | |
| 8 | ||
| 9 | public class ComboBoxMethodRenderer extends JLabel implements ListCellRenderer<Object> { | |
| 10 | public static final JSeparator SEPARATOR = new JSeparator(); | |
| 11 | ||
| 12 | public Component getListCellRendererComponent( | |
| 13 | JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus | |
| 14 | ) { | |
| 15 |
1
1. getListCellRendererComponent : negated conditional → NO_COVERAGE |
if (value == ComboBoxMethodRenderer.SEPARATOR) { |
| 16 |
1
1. getListCellRendererComponent : replaced return value with null for com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::getListCellRendererComponent → NO_COVERAGE |
return ComboBoxMethodRenderer.SEPARATOR; |
| 17 | } | |
| 18 |
1
1. getListCellRendererComponent : negated conditional → NO_COVERAGE |
if (value instanceof ExploitMode) { |
| 19 | var exploitMethods = (ExploitMode) value; | |
| 20 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setToolTipText → NO_COVERAGE |
this.setToolTipText(I18nViewUtil.valueByKey(exploitMethods.getKeyTooltip())); |
| 21 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setText → NO_COVERAGE |
this.setText(I18nViewUtil.valueByKey(exploitMethods.getKeyLabel())); |
| 22 | } | |
| 23 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setForeground → NO_COVERAGE |
this.setForeground(UIManager.getColor("ComboBox.foreground")); |
| 24 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setBackground → NO_COVERAGE |
this.setBackground(UIManager.getColor("ComboBox.background")); |
| 25 |
1
1. getListCellRendererComponent : negated conditional → NO_COVERAGE |
if (isSelected) { |
| 26 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setForeground → NO_COVERAGE |
this.setForeground(UIManager.getColor("ComboBox.selectionForeground")); |
| 27 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setBackground → NO_COVERAGE |
this.setBackground(UIManager.getColor("ComboBox.selectionBackground")); |
| 28 | } | |
| 29 |
1
1. getListCellRendererComponent : removed call to com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::setFont → NO_COVERAGE |
this.setFont(list.getFont()); |
| 30 |
1
1. getListCellRendererComponent : replaced return value with null for com/jsql/view/swing/manager/util/ComboBoxMethodRenderer::getListCellRendererComponent → NO_COVERAGE |
return this; |
| 31 | } | |
| 32 | } | |
Mutations | ||
| 15 |
1.1 |
|
| 16 |
1.1 |
|
| 18 |
1.1 |
|
| 20 |
1.1 |
|
| 21 |
1.1 |
|
| 23 |
1.1 |
|
| 24 |
1.1 |
|
| 25 |
1.1 |
|
| 26 |
1.1 |
|
| 27 |
1.1 |
|
| 29 |
1.1 |
|
| 30 |
1.1 |