use of com.archimatetool.editor.ui.components.CompositeMultiImageDescriptor in project archi by archimatetool.
the class ImageFactory method getCompositeImageDescriptor.
/**
* Return a composite image consisting of many images
*
* @param imageNames
* @return
*/
public CompositeImageDescriptor getCompositeImageDescriptor(String[] imageNames) {
// Make a registry name, cached
// $NON-NLS-1$
String key_name = "@";
for (String name : imageNames) {
key_name += name;
}
ImageRegistry registry = fPlugin.getImageRegistry();
CompositeImageDescriptor cid = (CompositeImageDescriptor) registry.getDescriptor(key_name);
// Make it and cache it
if (cid == null) {
ImageDescriptor[] desc = new ImageDescriptor[imageNames.length];
for (int i = 0; i < imageNames.length; i++) {
desc[i] = getImageDescriptor(imageNames[i]);
}
cid = new CompositeMultiImageDescriptor(desc);
registry.put(key_name, cid);
}
return cid;
}
Aggregations