Component (@NotNull JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { int modelRow = table.convertRowIndexToModel(row); RegistryValue v = ((MyTableModel)table.getModel()).getRegistryValue(modelRow); Color bg = isSelected ? table.getSelectionBackground() : table.getBackground(); if (v != null) { switch (column) { case 0 -> { myComponent.clear(); myComponent.append(v.getKey(), getAttributes(v, isSelected)); myComponent.setBackground(bg); if (v.isRestartRequired()) { myComponent.setIconOnTheRight(true); myComponent.setIcon(AllIcons.General.Warning); myComponent.setIconOpaque(false); myComponent.setTransparentIconBackground(true); } SpeedSearchUtil.applySpeedSearchHighlighting(table, myComponent, true, hasFocus); return myComponent; } case 1 -> { if (v.asColor(null) != null) { myLabel.setText(null); myLabel.setToolTipText(v.asString()); myLabel.setIcon(createColoredIcon(v.asColor(null))); myLabel.setHorizontalAlignment(SwingConstants.LEFT); } else if (v.isBoolean()) { final JCheckBox box = new JCheckBox(); box.setSelected(v.asBoolean()); box.setBackground(bg); return box; } else if (v.isMultiValue()) { String[] options = getOptions(v); ComboBox<String> combo = new ComboBox<>(options); combo.setSelectedItem(v.getSelectedOption()); return combo; } else { myComponent.clear(); myComponent.setBackground(bg); myComponent.append(v.asString(), getAttributes(v, isSelected)); if (v.isChangedFromDefault()) { myComponent.append(" [" + Registry.getInstance().getBundleValueOrNull(v.getKey()) + "]", SimpleTextAttributes.GRAYED_ATTRIBUTES); } SpeedSearchUtil.applySpeedSearchHighlighting(table, myComponent, true, hasFocus); return myComponent; } } } myLabel.setOpaque(true); myLabel.setBackground(bg); } return myLabel; }