final int nameLinePadding = 3;
final int nameLineHeight = getRowHeight();
boolean isOddRow = false;
for (Iterator user = users.iterator(); user.hasNext();) {
HumanResource hr = (HumanResource) user.next();
{
// paint resource name here
String nameOfRes = hr.toString();
if (isOddRow) {
g.setColor(ODD_ROW_COLOR);
g.fillRect(0, y, width, nameLineHeight);
}
g.setColor(Color.black);
//
g.drawRect(0, y, width, nameLineHeight);
g.drawString(nameOfRes, 5, y+nameLineHeight-nameLinePadding);
g.setColor(BORDER_COLOR_3D);
g.drawLine(1, y+nameLineHeight-1, width-1, y+nameLineHeight-1);
y += nameLineHeight;
isOddRow = !isOddRow;
}
{
//paint assigned task names
ResourceAssignment[] assignments = hr.getAssignments();
if (assignments != null) {
for (int i = 0; i < assignments.length; i++) {
if (isAssignmentVisible(assignments[i])) {
if (isOddRow) {
g.setColor(ODD_ROW_COLOR);