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.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.Image
Image.ClickEvent, Image.ScaleModeNested classes/interfaces inherited from interface io.jmix.ui.component.ResourceView
ResourceView.HasMimeType, ResourceView.HasStreamSettings, ResourceView.SourceChangeEvent -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected Subscriptionprotected Image.ScaleModeprotected Subscriptionprotected ValueSource<T>protected com.vaadin.event.MouseEvents.ClickListenerFields inherited from class io.jmix.ui.component.impl.AbstractResourceView
resource, resourceUpdateHandlerFields inherited from class io.jmix.ui.component.impl.AbstractComponent
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parentFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddClickListener(Consumer<Image.ClickEvent> listener) voidprotected voidprotected JmixImageprotected ResourcecreateImageResource(Object resourceObject) protected voidinitComponent(JmixImage component) voidremoveClickListener(Consumer<Image.ClickEvent> listener) voidsetScaleMode(Image.ScaleMode scaleMode) Applies the given scale mode to the image.voidsetValueSource(ValueSource<T> valueSource) Sets value source for component.protected voidprotected voidMethods inherited from class io.jmix.ui.component.impl.AbstractResourceView
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource, updateValueMethods 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, withUnwrappedCompositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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.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:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
initComponent
-
setValueSource
Description copied from interface:HasValueSourceSets value source for component.- Specified by:
setValueSourcein interfaceHasValueSource<T>- Parameters:
valueSource- value source
-
unbindValueSourceEvents
protected void unbindValueSourceEvents() -
bindValueSourceEvents
protected void bindValueSourceEvents() -
getValueSource
- Specified by:
getValueSourcein interfaceHasValueSource<T>- Returns:
- currently bound value source
-
updateComponent
protected void updateComponent() -
createImageResource
-
getScaleMode
- Specified by:
getScaleModein interfaceImage<T>- Returns:
- image scale mode
-
setScaleMode
Description copied from interface:ImageApplies the given scale mode to the image.- Specified by:
setScaleModein interfaceImage<T>- Parameters:
scaleMode- scale mode
-
addClickListener
- Specified by:
addClickListenerin interfaceImage<T>
-
removeClickListener
- Specified by:
removeClickListenerin interfaceImage<T>- Parameters:
listener- a listener to remove
-