void (SelectablePanel panel, int column, Color rowBackground, Color rowSelectionBackground) { if (ExperimentalUI.isNewUI()) { int leftRightInset = JBUI.CurrentTheme.Popup.Selection.LEFT_RIGHT_INSET.get(); Insets innerInsets = JBUI.CurrentTheme.Popup.Selection.innerInsets(); switch (column) { case CURRENT_ASTERISK_COL -> { panel.setSelectionArc(JBUI.CurrentTheme.Popup.Selection.ARC.get()); panel.setSelectionArcCorners(SelectablePanel.SelectionArcCorners.LEFT); //noinspection UseDPIAwareInsets panel.setSelectionInsets(new Insets(0, leftRightInset, 0, 0)); //noinspection UseDPIAwareBorders panel.setBorder(new EmptyBorder(innerInsets.top, leftRightInset + innerInsets.left, innerInsets.bottom, 0)); } case USAGE_TEXT_COL -> { panel.setSelectionArc(JBUI.CurrentTheme.Popup.Selection.ARC.get()); panel.setSelectionArcCorners(SelectablePanel.SelectionArcCorners.RIGHT); //noinspection UseDPIAwareInsets panel.setSelectionInsets(new Insets(0, 0, 0, leftRightInset)); //noinspection UseDPIAwareBorders panel.setBorder(new EmptyBorder(innerInsets.top, 0, innerInsets.bottom, innerInsets.right + leftRightInset)); } default -> //noinspection UseDPIAwareBorders panel.setBorder(new EmptyBorder(innerInsets.top, 0, innerInsets.bottom, 0)); } panel.setBackground(rowBackground); panel.setSelectionColor(rowSelectionBackground); } else { if (column == CURRENT_ASTERISK_COL) { panel.setBorder(JBUI.Borders.empty(MARGIN, MARGIN, MARGIN, 0)); } else { panel.setBorder(JBUI.Borders.empty(MARGIN, 0)); } panel.setBackground(rowSelectionBackground == null ? rowBackground : rowSelectionBackground); } }