@OpenApiAll
public class ElementImageHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ElementImageHelper.ImageInformation
Structure, which contains information of image: content, format and location.
|
Constructor and Description |
---|
ElementImageHelper() |
Modifier and Type | Method and Description |
---|---|
static ElementImageHelper.ImageInformation |
getCustomImageInformation(Element element)
Gets image information by element if image is set.
|
static ElementImageHelper.ImageInformation |
getCustomImageInformation(Element element,
Stereotype stereotype)
Gets image information by element if image is set.
|
static Element |
getElementToSetImage(ModelElementProvider pElement)
Returns element to set image property
|
static ResizableIcon |
getIconFromCustomImageProperty(Element element)
Gets 'ResizableIcon', which is created from the image information.
|
static ResizableIcon |
getIconFromCustomImageProperty(ElementImageHelper.ImageInformation imageInformation)
A helper method to create resizable icon from image information.
|
static Stereotype |
getImageHolderStereotype(Project project)
Return image holder stereotype from a given project.
|
static void |
setCustomImageInformation(Element element,
ElementImageHelper.ImageInformation imageInformation)
Set image information to given element: stereotype 'CustomImageHolder' is applied on element
and image information are saved to the tags of this stereotype.
|
static void |
setCustomImageInformation(Element element,
Image image)
Set image information to given element: stereotype 'CustomImageHolder' is applied on element
and image information are saved to the tags of this stereotype.
|
@CheckForNull public static ElementImageHelper.ImageInformation getCustomImageInformation(Element element)
element
- element, which contains image property.@CheckForNull public static ElementImageHelper.ImageInformation getCustomImageInformation(Element element, Stereotype stereotype)
element
- element, which contains image property.public static void setCustomImageInformation(Element element, Image image)
element
- element, which contains image property.image
- information source used to set image.public static void setCustomImageInformation(Element element, @CheckForNull ElementImageHelper.ImageInformation imageInformation)
element
- element, which contains image property.imageInformation
- structure, which contains information of image: content, format and location.public static Stereotype getImageHolderStereotype(Project project)
project
- project@CheckForNull public static ResizableIcon getIconFromCustomImageProperty(@CheckForNull Element element)
element
- element, which contains image property.@CheckForNull public static ResizableIcon getIconFromCustomImageProperty(@CheckForNull ElementImageHelper.ImageInformation imageInformation)
imageInformation
- image info@CheckForNull public static Element getElementToSetImage(ModelElementProvider pElement)
pElement
- presentation element