public class ImageImpl<T> extends AbstractResourceView<JmixImage> implements Image<T>, org.springframework.beans.factory.InitializingBean
Image.ClickEvent, Image.ScaleMode
ResourceView.HasMimeType, ResourceView.HasStreamSettings, ResourceView.SourceChangeEvent
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String |
IMAGE_STYLENAME |
protected io.jmix.core.common.event.Subscription |
instanceChangeSubscription |
protected Image.ScaleMode |
scaleMode |
protected io.jmix.core.common.event.Subscription |
valueChangeSubscription |
protected ValueSource<T> |
valueSource |
protected com.vaadin.event.MouseEvents.ClickListener |
vClickListener |
resource, resourceUpdateHandler
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Constructor and Description |
---|
ImageImpl() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addClickListener(java.util.function.Consumer<Image.ClickEvent> listener) |
void |
afterPropertiesSet() |
protected void |
bindValueSourceEvents() |
protected JmixImage |
createComponent() |
protected Resource |
createImageResource(java.lang.Object resourceObject) |
Image.ScaleMode |
getScaleMode() |
ValueSource<T> |
getValueSource() |
protected void |
initComponent(JmixImage component) |
void |
removeClickListener(java.util.function.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 |
unbindValueSourceEvents() |
protected void |
updateComponent() |
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource, updateValue
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addSourceChangeListener, getAlternateText, getSource, setAlternateText, setSource, setSource
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
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
protected static final java.lang.String IMAGE_STYLENAME
protected ValueSource<T> valueSource
protected io.jmix.core.common.event.Subscription valueChangeSubscription
protected io.jmix.core.common.event.Subscription instanceChangeSubscription
protected Image.ScaleMode scaleMode
protected com.vaadin.event.MouseEvents.ClickListener vClickListener
protected JmixImage createComponent()
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
protected void initComponent(JmixImage component)
public void setValueSource(@Nullable ValueSource<T> valueSource)
HasValueSource
setValueSource
in interface HasValueSource<T>
valueSource
- value sourceprotected void unbindValueSourceEvents()
protected void bindValueSourceEvents()
@Nullable public ValueSource<T> getValueSource()
getValueSource
in interface HasValueSource<T>
protected void updateComponent()
@Nullable protected Resource createImageResource(@Nullable java.lang.Object resourceObject)
public Image.ScaleMode getScaleMode()
getScaleMode
in interface Image<T>
public void setScaleMode(Image.ScaleMode scaleMode)
Image
setScaleMode
in interface Image<T>
scaleMode
- scale modepublic io.jmix.core.common.event.Subscription addClickListener(java.util.function.Consumer<Image.ClickEvent> listener)
addClickListener
in interface Image<T>
public void removeClickListener(java.util.function.Consumer<Image.ClickEvent> listener)
removeClickListener
in interface Image<T>
listener
- a listener to remove