SimpleTextAttributes (@NotNull Component rendererComponent, int row, int column, boolean hasFocus, final boolean selected) { VcsCommitStyle style = getStyle(row, column, hasFocus, selected, row == getHoveredRow(this)); assert style.getBackground() != null && style.getForeground() != null && style.getTextStyle() != null; rendererComponent.setBackground(style.getBackground()); rendererComponent.setForeground(style.getForeground()); return switch (style.getTextStyle()) { case BOLD -> SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES; case ITALIC -> SimpleTextAttributes.REGULAR_ITALIC_ATTRIBUTES; default -> SimpleTextAttributes.REGULAR_ATTRIBUTES; }; }