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
Modifier and TypeInterfaceDescriptionstatic class
AImage.ClickEvent
is fired when the user clicks on anImage
.static enum
Defines 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.Wrapper
Nested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEvent
Nested classes/interfaces inherited from interface io.jmix.ui.component.ResourceView
ResourceView.HasMimeType, ResourceView.HasStreamSettings, ResourceView.SourceChangeEvent
-
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Method Summary
Modifier and TypeMethodDescriptionaddClickListener
(Consumer<Image.ClickEvent> listener) void
removeClickListener
(Consumer<Image.ClickEvent> listener) Deprecated.default void
reset()
Resets the component source and disposes of the corresponding resource.void
setScaleMode
(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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
Methods inherited from interface io.jmix.ui.component.data.HasValueSource
getValueSource, setValueSource
Methods 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.UseSubscription
instead- Parameters:
listener
- a listener to remove
-
Subscription
instead