if ((blockArr != null) && (blockArr.length > 0)) {
boolean toggleFlag = false;
int width = getWidth();
int height = getHeight();
Rectangle clipBounds = grp.getClipBounds();
grp.setFont(TABLE_WEST_FONT);
grp.setColor(TABLE_WEST_FONT_COLOR);
for (int i = 0; i < blockArr.length; i++) {
toggleFlag = !toggleFlag;
// Get the y positions of this time block
int minY = blockArr[i].mStartY;
int maxY;
if ((i + 1) < blockArr.length) {
maxY = blockArr[i + 1].mStartY;
} else {
maxY = height;
}
if (!clipBounds.intersects(0, minY, width, maxY - minY)) {
// this piece is not visible at all
continue;
}
// Get the image of this time block