(final int w, final int h, final Graphics g)
| 628 | } |
| 629 | |
| 630 | private void drawClock(final int w, final int h, final Graphics g) { |
| 631 | |
| 632 | repaintClock = false; |
| 633 | |
| 634 | final Calendar calendar = Calendar.getInstance(); |
| 635 | final int hour = calendar.get(Calendar.HOUR_OF_DAY); |
| 636 | final int minute = calendar.get(Calendar.MINUTE); |
| 637 | final char[] clock = clockChars; |
| 638 | |
| 639 | clock[0] = (char) ('0' + (hour / 10)); |
| 640 | clock[1] = (char) ('0' + (hour % 10)); |
| 641 | clock[3] = (char) ('0' + (minute / 10)); |
| 642 | clock[4] = (char) ('0' + (minute % 10)); |
| 643 | |
| 644 | final int clockPixelWidth = fontStatus.charsWidth( |
| 645 | clock, 0, clock.length); |
| 646 | |
| 647 | /* |
| 648 | * Clear background |
| 649 | */ |
| 650 | g.setColor(currentScheme.colors[ |
| 651 | ColorScheme.COLOR_BACKGROUND]); |
| 652 | |
| 653 | g.fillRect(w - clockWidth, h - statusBarHeight, clockWidth, |
| 654 | statusBarHeight); |
| 655 | |
| 656 | /* |
| 657 | * Draw time |
| 658 | */ |
| 659 | |
| 660 | fontStatus.drawChars(g, currentScheme.colors[ |
| 661 | ColorScheme.COLOR_TEXT_STATUS], clock, |
| 662 | w - clockPixelWidth - STATUS_BAR_SPACING, |
| 663 | h - statusBarHeight + STATUS_BAR_SPACING); |
| 664 | } |
| 665 | |
| 666 | private ImageButton findButtonPressed(final int x, final int y) { |
| 667 | if (buttons != null) { |
no test coverage detected