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