use of org.pentaho.di.core.SwtUniversalImageBitmap in project pentaho-kettle by pentaho.
the class SwtSvgImageUtil method getMissingImage.
/**
* Get the image for when all other fallbacks have failed. This is an image
* drawn on the canvas, a square with a red X.
*
* @param display the device to render the image to
* @return the missing image
*/
public static SwtUniversalImage getMissingImage(Display display) {
Image img = new Image(display, ConstUI.ICON_SIZE, ConstUI.ICON_SIZE);
GC gc = new GC(img);
gc.setForeground(new Color(display, 0, 0, 0));
gc.drawRectangle(4, 4, ConstUI.ICON_SIZE - 8, ConstUI.ICON_SIZE - 8);
gc.setForeground(new Color(display, 255, 0, 0));
gc.drawLine(4, 4, ConstUI.ICON_SIZE - 4, ConstUI.ICON_SIZE - 4);
gc.drawLine(ConstUI.ICON_SIZE - 4, 4, 4, ConstUI.ICON_SIZE - 4);
gc.dispose();
return new SwtUniversalImageBitmap(img);
}
Aggregations