Package io.jmix.ui.component
Interface Image<T>
- All Superinterfaces:
Component,Component.HasCaption,Component.HasDescription,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasValueSource<T>,ResourceView
- All Known Implementing Classes:
ImageImpl
@StudioComponent(caption="Image",
category="Components",
xmlElement="image",
icon="io/jmix/ui/icon/component/image.svg",
canvasIconSize=LARGE,
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/image.html")
public interface Image<T>
extends ResourceView, HasValueSource<T>
The Image component is intended for displaying graphic content.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classAImage.ClickEventis fired when the user clicks on anImage.static enumDefines image scale mode.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.ResourceView
ResourceView.HasMimeType, ResourceView.HasStreamSettings, ResourceView.SourceChangeEvent -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionaddClickListener(Consumer<Image.ClickEvent> listener) voidremoveClickListener(Consumer<Image.ClickEvent> listener) Deprecated.default voidreset()Resets the component source and disposes of the corresponding resource.voidsetScaleMode(Image.ScaleMode scaleMode) Applies the given scale mode to the image.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSourceMethods inherited from interface io.jmix.ui.component.ResourceView
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
reset
default void reset()Resets the component source and disposes of the corresponding resource. -
getScaleMode
Image.ScaleMode getScaleMode()- Returns:
- image scale mode
-
setScaleMode
@StudioProperty(type=ENUMERATION, defaultValue="NONE", options={"NONE","FILL","CONTAIN","COVER","SCALE_DOWN"}) void setScaleMode(Image.ScaleMode scaleMode) Applies the given scale mode to the image.- Parameters:
scaleMode- scale mode
-
addClickListener
-
removeClickListener
Deprecated.UseSubscriptioninstead- Parameters:
listener- a listener to remove
-
Subscriptioninstead