(Graphics g, int width, Rectangle pos, Dimension rendererSize)
| 1414 | } |
| 1415 | |
| 1416 | private void paintFocus(Graphics g, int width, Rectangle pos, Dimension rendererSize) { |
| 1417 | if (ignoreFocusComponentWhenUnfocused && !hasFocus()) { |
| 1418 | return; |
| 1419 | } |
| 1420 | if (!shouldRenderSelection()) { |
| 1421 | return; |
| 1422 | } |
| 1423 | calculateComponentPosition(getCurrentSelected(), width, pos, rendererSize, getElementSize(true, true), true); |
| 1424 | Dimension size = pos.getSize(); |
| 1425 | |
| 1426 | Component cmp = renderer.getListFocusComponent(this); |
| 1427 | if (cmp != null) { |
| 1428 | cmp.setCellRenderer(true); |
| 1429 | int x = pos.getX(); |
| 1430 | int y = pos.getY(); |
| 1431 | |
| 1432 | // prevent focus animation from working during a drag operation |
| 1433 | if (orientation != HORIZONTAL) { |
| 1434 | y -= (animationPosition + fixedDraggedAnimationPosition); |
| 1435 | } else { |
| 1436 | x -= (animationPosition + fixedDraggedAnimationPosition); |
| 1437 | } |
| 1438 | renderComponentBackground(g, cmp, x, y, size.getWidth(), size.getHeight()); |
| 1439 | renderComponent(g, cmp, x, y, size.getWidth(), size.getHeight()); |
| 1440 | } |
| 1441 | |
| 1442 | } |
| 1443 | |
| 1444 | /// Renders the current component on the screen |
| 1445 | private void renderComponent(Graphics g, Component cmp, int x, int y, int width, int height) { |
no test coverage detected