void (final @NotNull Border value) { setText(getTextDescription(value)); if (value instanceof CompoundBorder) { Color insideColor = getBorderColor(((CompoundBorder)value).getInsideBorder()); Color outsideColor = getBorderColor(((CompoundBorder)value).getOutsideBorder()); if (insideColor != null && outsideColor != null) { setIcon(createColorIcon(insideColor, outsideColor)); } else if (insideColor != null) { setIcon(createColorIcon(insideColor)); } else if (outsideColor != null) { setIcon(createColorIcon(outsideColor)); } else { setIcon(null); } } else { Color color = getBorderColor(value); setIcon(color != null ? createColorIcon(color) : null); } }