void (@NotNull final JList list, final Object value, final int index, final boolean selected, final boolean hasFocus) { if (value == null) { append(XDebuggerBundle.message("stack.frame.loading.text"), SimpleTextAttributes.GRAY_ATTRIBUTES); return; } if (value instanceof String) { append((String)value, SimpleTextAttributes.ERROR_ATTRIBUTES); return; } XStackFrame stackFrame = (XStackFrame)value; var loc = XDebuggerFrameListMouseListener.getMouseLocation(list); var bounds = XDebuggerFrameListMouseListener.getHoveredCellBounds(list); var hoveredIndex = XDebuggerFrameListMouseListener.getHoveredIndex(list); var iconHovered = isIconHovered(loc, bounds); var hovered = index == hoveredIndex; boolean canDropSomething = XDebuggerFrameListMouseListener.getCanDropFrame(list); if (!selected) { Color c = getFrameBgColor(stackFrame); if (index <= hoveredIndex && canDropSomething && iconHovered) { setBackground(RenderingUtil.getHoverBackground(list)); } else if (c != null) { setBackground(c); } } else { setBackground(UIUtil.getListSelectionBackground(hasFocus)); setForeground(NamedColorUtil.getListSelectionForeground(hasFocus)); mySelectionForeground = getForeground(); } stackFrame.customizePresentation(this); // override icon which is set by customizePresentation if needed if ((hovered && canDropSomething) || (selected && hoveredIndex < 0 && canDropSelectedFrame(list))) { setIcon(myPopFrameIcon); if (iconHovered && selected) { myPopFrameIcon.setBackground(ColorUtil.withAlpha(NamedColorUtil.getListSelectionForeground(true), 0.2)); } else { myPopFrameIcon.setBackground(null); } myPopFrameIcon.setSelected(selected && hasFocus); } }