use of org.netxms.client.LibraryImage in project netxms by netxms.
the class ImageSelector method setImageGuid.
/**
* Set image GUID
*
* @param imageGuid image GUID
* @param redoLayout if set to true, control will update it's layout
*/
public void setImageGuid(UUID imageGuid, boolean redoLayout) {
this.imageGuid = imageGuid;
if (imageGuid.equals(NXCommon.EMPTY_GUID)) {
setText(Messages.get().ImageSelector_Default);
setImage(null);
} else {
LibraryImage image = ImageProvider.getInstance(getDisplay()).getLibraryImageObject(imageGuid);
if (image != null) {
setText(image.getName());
setImage(ImageProvider.getInstance(getDisplay()).getImage(imageGuid));
} else {
// $NON-NLS-1$
setText("<?>" + imageGuid.toString());
setImage(null);
}
}
if (redoLayout)
getParent().layout();
}
Aggregations