(int mouseX, int mouseY)
| 337 | } |
| 338 | |
| 339 | @Override |
| 340 | public void mouseClicked(int mouseX, int mouseY) { |
| 341 | hasSelected = mouseX >= getLeft() && mouseX <= getRight() && mouseY >= getTop() & mouseY <= getBottom(); |
| 342 | |
| 343 | if (this.m() && this.b((double)mouseX, (double)mouseY)) { |
| 344 | int var6 = this.a((double)mouseX, (double)mouseY); |
| 345 | if (var6 == -1) { |
| 346 | this.a((int)(mouseX - (double)(this.k + this.f / 2 - this.e() / 2)), (int)(mouseY - (double)this.h) + (int)this.o - 4); // TODO |
| 347 | } else if (this.a(var6, 0, (double)mouseX, (double)mouseY)) { |
| 348 | if (this.b().size() > var6) { |
| 349 | this.a(this.b().get(var6)); |
| 350 | } |
| 351 | |
| 352 | this.e(true); |
| 353 | this.b(var6); |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | if (hasSelected) { |
| 358 | synchronized (rows) { |
| 359 | for (int rowIndex = 0; rowIndex < heightMap.size(); ++rowIndex) { |
| 360 | int newY = (int) (getTop() + heightMap.get(rowIndex) + getHeaderPadding() - getCurrentScroll()); |
| 361 | int slotHeight = rows.get(rowIndex).getLineHeight() - 4; |
| 362 | if ((newY <= getBottom()) && (newY + slotHeight >= getTop())) { |
| 363 | Row row = rows.get(rowIndex); |
| 364 | if (row instanceof RowExtended) { |
| 365 | IButton pressed = ((RowExtended) row).mousePressed(mouseX, mouseY); |
| 366 | if (pressed != null) { |
| 367 | if (selectedButton != null && pressed != selectedButton) |
| 368 | selectedButton.mouseClicked(mouseX, mouseY); |
| 369 | selectedButton = pressed; |
| 370 | return; |
| 371 | } |
| 372 | } |
| 373 | } |
| 374 | } |
| 375 | } |
| 376 | } |
| 377 | } |
| 378 | |
| 379 | /** |
| 380 | * @return x-coordinate of the scroll bar |
nothing calls this directly
no test coverage detected