JComponent (@NotNull LineSeparator separator) { JLabel label = new JLabel(separator.toString()); Color color; if (separator == LineSeparator.CRLF) { color = JBColor.RED; } else if (separator == LineSeparator.LF) { color = JBColor.BLUE; } else if (separator == LineSeparator.CR) { color = JBColor.MAGENTA; } else { color = JBColor.BLACK; } label.setForeground(color); return label; }