(int mouseX, int mouseY)
| 658 | } |
| 659 | |
| 660 | @Override |
| 661 | public E getHoverItem(int mouseX, int mouseY) { |
| 662 | int x1, x2; |
| 663 | if (leftbound) { |
| 664 | x1 = getLeft(); |
| 665 | x2 = getLeft() + getRowWidth(); |
| 666 | } else { |
| 667 | x1 = getLeft() + (getWidth() / 2 - getRowWidth() / 2); |
| 668 | x2 = getLeft() + getWidth() / 2 + getRowWidth() / 2; |
| 669 | } |
| 670 | if (mouseX >= x1 && mouseX <= x2) { |
| 671 | synchronized (rows) { |
| 672 | for (int i = 0; i < heightMap.size(); i++) { |
| 673 | Integer y = (int) (heightMap.get(i) + getTop() + getHeaderPadding() - getCurrentScroll()); |
| 674 | E element = rows.get(i); |
| 675 | if (mouseY >= y && mouseY <= y + element.getLineHeight()) { |
| 676 | return element; |
| 677 | } |
| 678 | } |
| 679 | } |
| 680 | } |
| 681 | return null; |
| 682 | } |
| 683 | |
| 684 | @Override |
| 685 | public boolean isDrawDefaultBackground() { |
nothing calls this directly
no test coverage detected