mapCellLastPercentDone.put(cell, new Integer(percentDone));
ImageLoader imageLoader = ImageLoader.getInstance();
Image imgEnd = imageLoader.getImage("dl_bar_end");
Image img0 = imageLoader.getImage("dl_bar_0");
Image img1 = imageLoader.getImage("dl_bar_1");
//draw begining and end
if (!imgEnd.isDisposed()) {
gcImage.drawImage(imgEnd, bounds.x , bounds.y + yOfs);
gcImage.drawImage(imgEnd, bounds.x + x1 + 1, bounds.y + yOfs);
}
// draw border
// Color fg = gcImage.getForeground();
// gcImage.setForeground(Colors.grey);
// gcImage.drawRectangle(bounds.x, bounds.y + yOfs, x1 + 1, y1 + 1);
// gcImage.setForeground(fg);
int limit = (x1 * percentDone) / 1000;
if (!img1.isDisposed() && limit > 0) {
Rectangle imgBounds = img1.getBounds();
gcImage.drawImage(img1, 0, 0, imgBounds.width, imgBounds.height,
bounds.x + 1, bounds.y + yOfs, limit, imgBounds.height);
}
if (percentDone < 1000 && !img0.isDisposed()) {
Rectangle imgBounds = img0.getBounds();
gcImage.drawImage(img0, 0, 0, imgBounds.width, imgBounds.height, bounds.x
+ limit + 1, bounds.y + yOfs, x1 - limit, imgBounds.height);
}
imageLoader.releaseImage("dl_bar_end");
imageLoader.releaseImage("dl_bar_0");
imageLoader.releaseImage("dl_bar_1");
// gcImage.setBackground(Colors.blues[Colors.BLUES_DARKEST]);
// gcImage.fillRectangle(bounds.x + 1, bounds.y + 1 + yOfs, limit, y1);
// if (limit < x1) {
// gcImage.setBackground(Colors.blues[Colors.BLUES_LIGHTEST]);