|
Re: How to use a custom icons? [message #1735014 is a reply to message #1734135] |
Tue, 14 June 2016 16:19 |
|
Hi Ralph, try this:
String imageId = customTaskDescriptor.getImageId("inbox.png", CustomTaskImageProvider.IconSize.LARGE);
if (!registered) {
String filename = "/icons/large/inbox.png";
URL url = getClass().getClassLoader().getResource(filename);
ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
CustomTaskImageProvider.registerImage(imageId, descriptor);
registered = true;
}
Image img = Graphiti.getGaService().createImage(ga, imageId);
img.setProportional(false);
img.setWidth(24);
img.setHeight(24);
img.setStretchH(true);
img.setStretchV(true);
Graphiti.getGaService().setLocation(img, 50, 25);
|
|
|
|
Powered by
FUDForum. Page generated in 0.02907 seconds