@Override
public void draw(final Canvas canvas) {
super.draw(canvas);
final Text titleStyle = Toolkit.getText(ColorsAndFonts.TEXT_TITLE);
final Text normalStyle = Toolkit.getText(ColorsAndFonts.TEXT_LABEL);
final Color color = Toolkit.getColor(ColorsAndFonts.COLOR_BLACK);
clearBackground(canvas, Toolkit.getColor(ColorsAndFonts.COLOR_WHITE));
canvas.drawRectangleAround(getBounds(), Toolkit.getColor(ColorsAndFonts.COLOR_SECONDARY3));
if (showingImage()) {
canvas.drawImage(image, margin, margin);
}
int line = margin + image.getHeight() + noticePadding + normalStyle.getAscent();
// application details
String text = AboutIsis.getApplicationName();
if (text != null) {
canvas.drawText(text, left, line, MAX_WIDTH, color, titleStyle);
line += titleStyle.stringHeight(text, MAX_WIDTH) + titleStyle.getLineSpacing() + linePadding;
}
text = AboutIsis.getApplicationCopyrightNotice();
if (text != null) {
canvas.drawText(text, left, line, MAX_WIDTH, color, normalStyle);
line += normalStyle.stringHeight(text, MAX_WIDTH) + normalStyle.getLineSpacing() + linePadding;
}
text = AboutIsis.getApplicationVersion();
if (text != null) {
canvas.drawText(text, left, line, MAX_WIDTH, color, normalStyle);
line += normalStyle.stringHeight(text, MAX_WIDTH) + normalStyle.getLineSpacing() + linePadding;
line += 2 * normalStyle.getLineHeight();
}
// framework details
text = AboutIsis.getFrameworkName();
canvas.drawText(text, left, line, MAX_WIDTH, color, titleStyle);
line += titleStyle.stringHeight(text, MAX_WIDTH) + titleStyle.getLineSpacing() + linePadding;
text = AboutIsis.getFrameworkCopyrightNotice();
canvas.drawText(text, left, line, MAX_WIDTH, color, normalStyle);
line += normalStyle.stringHeight(text, MAX_WIDTH) + normalStyle.getLineSpacing() + linePadding;
canvas.drawText(frameworkVersion(), left, line, MAX_WIDTH, color, normalStyle);
}