(int mouseX, int mouseY)
| 387 | } |
| 388 | |
| 389 | @Override |
| 390 | public void mouseClicked(int mouseX, int mouseY) { |
| 391 | if (mouseX >= getLeft() && mouseX <= getRight() && mouseY >= getTop() & mouseY <= getBottom()) { |
| 392 | synchronized (rows) { |
| 393 | for (int rowIndex = 0; rowIndex < heightMap.size(); ++rowIndex) { |
| 394 | int newY = (int) (getTop() + heightMap.get(rowIndex) + getHeaderPadding() - getCurrentScroll()); |
| 395 | int slotHeight = rows.get(rowIndex).getLineHeight() - 4; |
| 396 | if ((newY <= getBottom()) && (newY + slotHeight >= getTop())) { |
| 397 | Row row = rows.get(rowIndex); |
| 398 | if (row instanceof RowExtended) { |
| 399 | IButton pressed = ((RowExtended) row).mousePressed(mouseX, mouseY); |
| 400 | if (pressed != null) { |
| 401 | if (selectedButton != null && pressed != selectedButton) |
| 402 | selectedButton.mouseClicked(mouseX, mouseY); |
| 403 | selectedButton = pressed; |
| 404 | return; |
| 405 | } |
| 406 | } |
| 407 | } |
| 408 | } |
| 409 | } |
| 410 | } |
| 411 | } |
| 412 | |
| 413 | /** |
| 414 | * @return x-coordinate of the scroll bar |
nothing calls this directly
no test coverage detected