(int mouseX, int mouseY)
| 373 | } |
| 374 | |
| 375 | @Override |
| 376 | public void mouseClicked(int mouseX, int mouseY) { |
| 377 | if (mouseX >= getLeft() && mouseX <= getRight() && mouseY >= getTop() & mouseY <= getBottom()) { |
| 378 | synchronized (rows) { |
| 379 | for (int rowIndex = 0; rowIndex < heightMap.size(); ++rowIndex) { |
| 380 | int newY = (int) (getTop() + heightMap.get(rowIndex) + getHeaderPadding() - getCurrentScroll()); |
| 381 | int slotHeight = rows.get(rowIndex).getLineHeight() - 4; |
| 382 | if ((newY <= getBottom()) && (newY + slotHeight >= getTop())) { |
| 383 | Row row = rows.get(rowIndex); |
| 384 | if (row instanceof RowExtended) { |
| 385 | IButton pressed = ((RowExtended) row).mousePressed(mouseX, mouseY); |
| 386 | if (pressed != null) { |
| 387 | if (selectedButton != null && pressed != selectedButton) |
| 388 | selectedButton.mouseClicked(mouseX, mouseY); |
| 389 | selectedButton = pressed; |
| 390 | return; |
| 391 | } |
| 392 | } |
| 393 | } |
| 394 | } |
| 395 | } |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * @return x-coordinate of the scroll bar |
nothing calls this directly
no test coverage detected