Entity specific icons
For a couple of repository entities there is a set of icons which can be obtained dynamically in PIM code.
Here is an example how to get an icon for a specific entity:
// this code provides a small image (16x16px) for the entity "Article"
String entityIdentifier = ArticleCoreConst.ENTITY_ARTICLE;
Image image = RepositoryUiUtils.getImage( entityIdentifier, ImageType.ICON_SMALL );
There are three several sizes of the entity images:
ImageTypes#ICON_SMALL - 16x16px
ImageTypes#ICON_MEDIUM - 32x32px
ImageTypes#ICON_LARGE - 48x48px
An additional image type - ImageTypes#DIALOG - can be used to get an appropriate image for the title area of an TitleAreaDialog. In this case the large variant of the corresponding image will be used and scaled to the size of the title area.
If there is no icon for the requested entity - the default icon will be returned (see also the table below).
All entity icon files are located in the plugin com.heiler.ppm.configuration.server -> folder conf/icons. At the moment there are following entity icons avaliable:
Entity |
Small |
Medium |
Large |
Article |
|
|
|
ArticleAssortment |
|
|
|
Assortment |
|
|
|
EntityReportQuery |
|
|
|
MasterCatalog |
|
|
|
MediaAsset |
|
|
|
PriceGroup |
|
|
|
Product |
|
|
|
Product2G |
|
|
|
ProductAssortment |
|
|
|
Revision |
|
|
|
Structure |
|
|
|
StructureGroup |
|
|
|
SupplierCatalog |
|
|
|
Task |
|
|
|
Unit |
|
|
|
User |
|
|
|
Variant |
|
|
|
default (as fallback) |
|
|
|