use of org.talend.commons.ui.runtime.image.IImage in project tdi-studio-se by Talend.
the class StatusBar method setValues.
public void setValues(STATUS status, String text) {
Image image = null;
//$NON-NLS-1$
String content = "";
if (status != STATUS.EMPTY) {
// if (status != STATUS.INFO) {
//$NON-NLS-1$
content = " : " + text;
IImage iimage = status.getImage();
if (iimage == null) {
image = null;
} else {
image = org.talend.commons.ui.runtime.image.ImageProvider.getImage(org.talend.commons.ui.runtime.image.ImageProvider.getImageDesc(iimage));
}
// } else {
// content = text;
// }
}
statusBarLabel.setText(content);
statusBarImage.setImage(image);
setSize(computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
use of org.talend.commons.ui.runtime.image.IImage in project tdi-studio-se by Talend.
the class StatusManagerSettingPage method getItemsImage.
private Image getItemsImage(IImage iImage) {
if (iImage == null) {
iImage = EImage.DEFAULT_IMAGE;
}
Image image = cacheItemImages.get(iImage);
if (image == null) {
Image oImage = ImageProvider.getImage(iImage);
ImageData imageData = oImage.getImageData();
// enlarge image
final int larger = 4;
ImageData newData = imageData.scaledTo(imageData.width + larger, imageData.height + larger);
image = new Image(oImage.getDevice(), newData);
cacheItemImages.put(iImage, image);
}
return image;
}
Aggregations