Package io.jmix.ui.component.impl
Class ImageImpl<T>
- All Implemented Interfaces:
AttachNotifier
,Component
,Component.BelongToFrame
,Component.HasCaption
,Component.HasDescription
,Component.HasIcon
,Component.HasXmlDescriptor
,Component.Wrapper
,HasValueSource<T>
,HasContextHelp
,HasDebugId
,HasHtmlCaption
,HasHtmlDescription
,HasHtmlSanitizer
,Image<T>
,ResourceView
,org.springframework.beans.factory.InitializingBean
public class ImageImpl<T>
extends AbstractResourceView<JmixImage>
implements Image<T>, org.springframework.beans.factory.InitializingBean
-
Nested Class Summary
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.Image
Image.ClickEvent, Image.ScaleMode
Nested classes/interfaces inherited from interface io.jmix.ui.component.ResourceView
ResourceView.HasMimeType, ResourceView.HasStreamSettings, ResourceView.SourceChangeEvent
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected Subscription
protected Image.ScaleMode
protected Subscription
protected ValueSource<T>
protected com.vaadin.event.MouseEvents.ClickListener
Fields inherited from class io.jmix.ui.component.impl.AbstractResourceView
resource, resourceUpdateHandler
Fields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddClickListener
(Consumer<Image.ClickEvent> listener) void
protected void
protected JmixImage
protected Resource
createImageResource
(Object resourceObject) protected void
initComponent
(JmixImage component) void
removeClickListener
(Consumer<Image.ClickEvent> listener) void
setScaleMode
(Image.ScaleMode scaleMode) Applies the given scale mode to the image.void
setValueSource
(ValueSource<T> valueSource) Sets value source for component.protected void
protected void
Methods inherited from class io.jmix.ui.component.impl.AbstractResourceView
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource, updateValue
Methods inherited from class io.jmix.ui.component.impl.AbstractComponent
addAttachListener, addDetachListener, addStyleName, assignDebugId, attached, detached, getAlignment, getCaption, getComponent, getComposition, getContextHelpIconClickHandler, getContextHelpText, getDebugId, getDescription, getEventHub, getFrame, getHeight, getHeightSizeUnit, getHtmlSanitizer, getIcon, getIconName, getIconResource, getId, getParent, getStyleName, getUiComponentProperties, getUiProperties, getWidth, getWidthSizeUnit, getXmlDescriptor, hasSubscriptions, hasValidationError, isAttached, isCaptionAsHtml, isContextHelpTextHtmlEnabled, isDescriptionAsHtml, isEnabled, isEnabledRecursive, isHtmlSanitizerEnabled, isResponsive, isVisible, isVisibleRecursive, onContextHelpIconClick, publish, removeStyleName, sanitize, setAlignment, setApplicationContext, setCaption, setCaptionAsHtml, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled, setDebugId, setDescription, setDescriptionAsHtml, setEnabled, setFrame, setHeight, setHtmlSanitizerEnabled, setIcon, setIconFromSet, setId, setParent, setResponsive, setStyleName, setValidationError, setVisible, setWidth, setXmlDescriptor, unsubscribe, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedComposition
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.ResourceView
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource
-
Field Details
-
IMAGE_STYLENAME
- See Also:
-
valueSource
-
valueChangeSubscription
-
instanceChangeSubscription
-
scaleMode
-
vClickListener
protected com.vaadin.event.MouseEvents.ClickListener vClickListener
-
-
Constructor Details
-
ImageImpl
public ImageImpl()
-
-
Method Details
-
createComponent
-
afterPropertiesSet
public void afterPropertiesSet()- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
-
setValueSource
Description copied from interface:HasValueSource
Sets value source for component.- Specified by:
setValueSource
in interfaceHasValueSource<T>
- Parameters:
valueSource
- value source
-
unbindValueSourceEvents
protected void unbindValueSourceEvents() -
bindValueSourceEvents
protected void bindValueSourceEvents() -
getValueSource
- Specified by:
getValueSource
in interfaceHasValueSource<T>
- Returns:
- currently bound value source
-
updateComponent
protected void updateComponent() -
createImageResource
-
getScaleMode
- Specified by:
getScaleMode
in interfaceImage<T>
- Returns:
- image scale mode
-
setScaleMode
Description copied from interface:Image
Applies the given scale mode to the image.- Specified by:
setScaleMode
in interfaceImage<T>
- Parameters:
scaleMode
- scale mode
-
addClickListener
- Specified by:
addClickListener
in interfaceImage<T>
-
removeClickListener
- Specified by:
removeClickListener
in interfaceImage<T>
- Parameters:
listener
- a listener to remove
-