(Graphics g)
| 457 | protected void beginPaint() { } |
| 458 | |
| 459 | public synchronized void paint(Graphics g) { |
| 460 | if (messagesWidth == 0) { |
| 461 | messagesWidth = getListWidth(); |
| 462 | } |
| 463 | beginPaint(); |
| 464 | PopUp.getInstance().init(g, width, height); |
| 465 | |
| 466 | //StaticData.getInstance().screenWidth=width; |
| 467 | |
| 468 | |
| 469 | |
| 470 | int count = updateLayout(); |
| 471 | |
| 472 | setAbsOrg(g, 0, 0); |
| 473 | |
| 474 | setInfo(); |
| 475 | |
| 476 | if (paintTop) { |
| 477 | if (reverse) { |
| 478 | if (infobar != null) { |
| 479 | list_top = infobar.getVHeight(); |
| 480 | drawInfoPanel(g); |
| 481 | } |
| 482 | } else { |
| 483 | if (mainbar != null) { |
| 484 | list_top = mainbar.getVHeight(); |
| 485 | drawMainPanel(g); |
| 486 | } |
| 487 | } |
| 488 | } |
| 489 | if (paintBottom) { |
| 490 | if (reverse) { |
| 491 | if (mainbar != null) { |
| 492 | list_bottom = mainbar.getVHeight(); |
| 493 | } |
| 494 | } else { |
| 495 | if (infobar != null) { |
| 496 | list_bottom = infobar.getVHeight(); |
| 497 | } |
| 498 | } |
| 499 | } |
| 500 | |
| 501 | winHeight = height - list_top - list_bottom; |
| 502 | |
| 503 | boolean scroll = (listHeight > winHeight); |
| 504 | |
| 505 | if (count == 0) { |
| 506 | cursor = (cursor == -1) ? -1 : 0; |
| 507 | win_top = 0; |
| 508 | } else if (cursor >= count) { |
| 509 | cursor = count - 1; |
| 510 | stickyWindow = true; |
| 511 | } |
| 512 | if (updateLayout() > 0 && stickyWindow) { |
| 513 | fitCursorByTop(); |
| 514 | } |
| 515 | |
| 516 | int itemMaxWidth = (scroll) ? (width - scrollbar.getScrollWidth()) : (width); |
nothing calls this directly
no test coverage detected