Creating Overlay Icons - Table Viewer
Sometimes in table viewer icon decoration is not possible. We can create overlay icons and return them in class ITableLabelProvider method's - public Image getColumnImage(Object element, int columnIndex) will be enough
ImageDescriptor desc = Activator.getImageDescriptor(....); // It take String (Image Path)
if (desc != null) {
DecorationOverlayIcon decoratedImage = new DecorationOverlayIcon(image,
desc, IDecoration.BOTTOM_LEFT);
if (decoratedImage != null) {
return decoratedImage.createImage();
}
}
Comments
Post a Comment