private void drawDummyPhoto(Graphics graphics) { graphics.setColor(0xcccccc); int w = TEXT_ANCHOR - 2 * PADDING_TOP; graphics.fillRoundRect(PADDING_LEFT, PADDING_TOP, w, w, 10, 10); graphics.setFont(Utils.getFont(5)); graphics.setColor(0x999999); graphics.drawText( "NO PHOTO", (TEXT_ANCHOR - graphics.getFont().getAdvance("NO PHOTO")) / 2, (TEXT_ANCHOR - graphics.getFont().getHeight()) / 2); }
private void drawStatusBox(ListField listField, Graphics graphics, int index, Child child) { String childStatusString = child.childStatus().getStatusString(); int boxHeight = getFont().getHeight() + 4; int boxWidth = getFont().getAdvance(childStatusString) + 4; int boxX = screenWidth - 10 - boxWidth; int boxY = ((index) * listField.getRowHeight()) + getFont().getHeight() + 2; graphics.setColor(child.childStatus().getStatusColor()); graphics.drawRoundRect(boxX, boxY, boxWidth, boxHeight, 10, 10); graphics.fillRoundRect(boxX, boxY, boxWidth, boxHeight, 10, 10); graphics.setColor(16777215); graphics.setFont(rowFont); graphics.drawText( childStatusString, boxX, boxY + 2, (DrawStyle.HCENTER | DrawStyle.ELLIPSIS | DrawStyle.TOP), boxWidth); }