Component (JList<? extends AutoCompletionCommand> list, AutoCompletionCommand value, int index, boolean isSelected, boolean cellHasFocus) { clear(); getIpad().left = getIpad().right = UIUtil.isUnderWin10LookAndFeel() ? 0 : JBUIScale.scale(UIUtil.getListCellHPadding()); setPaintFocusBorder(false); setFocusBorderAroundIcon(true); setFont(list.getFont()); setIcon(EmptyIcon.ICON_16); mySelected = isSelected; myForeground = isEnabled() ? list.getForeground() : UIUtil.getLabelDisabledForeground(); mySelectionForeground = list.getSelectionForeground(); if (UIUtil.isUnderWin10LookAndFeel()) { setBackground(isSelected ? list.getSelectionBackground() : list.getBackground()); } else { setBackground(isSelected ? list.getSelectionBackground() : null); } SimpleTextAttributes baseStyle = new SimpleTextAttributes(SimpleTextAttributes.STYLE_PLAIN, list.getForeground()); appendHTML(value.getPresentationString(), baseStyle); return this; }