Defining the Adapter Icon
You can define custom icons for existing and custom adapters. They are loaded from the X4 Repository and displayed within the process diagram instead of the standard adapter icon.
You can either define icons for individual adapters or for the different adapter types.
Default Icons
For default icons, annotations are available that can be annotated to the adapter class.
Adapter type | Symbol | Annotation |
---|---|---|
Converter | @ConverterIcon | |
Transfer | @TransferAdapterIcon | |
Connector | @ConnectorIcon |
If no annotation is specified, the function adapter icon is used.
Providing the Icon
The adapter symbol is provided using the annotation @AdapterIcon
, which can be written to the adapter class.
Icon sizes of 16x16, 24x24, 32x32 and 48x48 can be defined. At least one size can be specified, and all other sizes are then calculated from the largest image size. The specified value must be a classpath to the image resource in src/main/resources
.
Example: The directory src/main/resources/HelloWorld/icons
contains the image icon_16.png
which is to be used as adapter icon. The corresponding path is /HelloWorld/icons/icon_16.png
.