int percentDone = getPerThouDone(od);
mapCellLastPercentDone.put(cell, new Integer(percentDone));
ImageLoader imageLoader = ImageLoader.getInstance();
Image imgEnd = imageLoader.getImage("tc_bar_end");
Image img0 = imageLoader.getImage("tc_bar_0");
Image img1 = imageLoader.getImage("tc_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);
}
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("tc_bar_end");
imageLoader.releaseImage("tc_bar_0");
imageLoader.releaseImage("tc_bar_1");
if(textColor == null) {
textColor = ColorCache.getColor(gcImage.getDevice(), "#006600" );
}