showUsernameInReviewCategory = true;
}
}
for (final ApprovalType type : approvalTypes) {
final PatchSetApproval ca = approvals.get(type.getCategory().getId());
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().negscore());
fmt.removeStyleName(row, col, Gerrit.RESOURCES.css().posscore());
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().singleLine());
if (ca == null || ca.getValue() == 0) {
table.clearCell(row, col);
} else {
haveReview = true;
final ApprovalCategoryValue acv = type.getValue(ca);
final AccountInfo ai = aic.get(ca.getAccountId());
if (type.isMaxNegative(ca)) {
if (showUsernameInReviewCategory) {
FlowPanel fp = new FlowPanel();
fp.add(new Image(Gerrit.RESOURCES.redNot()));
fp.add(new InlineLabel(FormatUtil.name(ai)));
table.setWidget(row, col, fp);
} else {
table.setWidget(row, col, new Image(Gerrit.RESOURCES.redNot()));
}
} else if (type.isMaxPositive(ca)) {
if (showUsernameInReviewCategory) {
FlowPanel fp = new FlowPanel();
fp.add(new Image(Gerrit.RESOURCES.greenCheck()));
fp.add(new InlineLabel(FormatUtil.name(ai)));
table.setWidget(row, col, fp);
} else {
table.setWidget(row, col, new Image(Gerrit.RESOURCES.greenCheck()));
}
} else {
String vstr = String.valueOf(ca.getValue());
if (showUsernameInReviewCategory) {
vstr = vstr + " " + FormatUtil.name(ai);
}
if (ca.getValue() > 0) {
vstr = "+" + vstr;
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().posscore());
} else {
fmt.addStyleName(row, col, Gerrit.RESOURCES.css().negscore());
}