(int mouseX, int mouseY)
| 427 | } |
| 428 | |
| 429 | @Override |
| 430 | public void mouseClicked(int mouseX, int mouseY) { |
| 431 | if (mouseX >= getLeft() && mouseX <= getRight() && mouseY >= getTop() & mouseY <= getBottom()) { |
| 432 | synchronized (rows) { |
| 433 | for (int rowIndex = 0; rowIndex < heightMap.size(); ++rowIndex) { |
| 434 | int newY = (int) (getTop() + heightMap.get(rowIndex) + getHeaderPadding() - getCurrentScroll()); |
| 435 | int slotHeight = rows.get(rowIndex).getLineHeight() - 4; |
| 436 | if ((newY <= getBottom()) && (newY + slotHeight >= getTop())) { |
| 437 | Row row = rows.get(rowIndex); |
| 438 | if (row instanceof RowExtended) { |
| 439 | IButton pressed = ((RowExtended) row).mousePressed(mouseX, mouseY); |
| 440 | if (pressed != null) { |
| 441 | if (selectedButton != null && pressed != selectedButton) |
| 442 | selectedButton.mouseClicked(mouseX, mouseY); |
| 443 | selectedButton = pressed; |
| 444 | return; |
| 445 | } |
| 446 | } |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | /** |
| 454 | * @return x-coordinate of the scroll bar |
nothing calls this directly
no test coverage detected