Class JmixImage<V>

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.HtmlComponent
com.vaadin.flow.component.HtmlContainer
com.vaadin.flow.component.html.Image
io.jmix.flowui.component.image.JmixImage<V>
Type Parameters:
V - type of value, e.g. FileRef, byte array
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.ClickNotifier<com.vaadin.flow.component.html.Image>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasComponents, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasText, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.shared.HasThemeVariant<JmixImageVariant>, SupportsValueSource<V>, Serializable, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class JmixImage<V> extends com.vaadin.flow.component.html.Image implements SupportsValueSource<V>, com.vaadin.flow.component.shared.HasThemeVariant<JmixImageVariant>, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
Component supports data binding with entity properties.
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasText

    com.vaadin.flow.component.HasText.WhiteSpace
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.springframework.context.ApplicationContext
     
     
    protected ValueSource<V>
     
    protected com.vaadin.flow.shared.Registration
     
    protected com.vaadin.flow.shared.Registration
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected void
     
    protected void
     
    protected Object
     
    protected String
     
     
    protected void
     
    protected void
     
    void
    setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
     
    void
     
    protected void
     
    protected void
     

    Methods inherited from class com.vaadin.flow.component.html.Image

    getAlt, getSrc, setAlt, setSrc, setSrc

    Methods inherited from class com.vaadin.flow.component.HtmlComponent

    getTitle, setTitle

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.ClickNotifier

    addClickListener, addClickShortcut

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.HasAriaLabel

    getAriaLabel, setAriaLabel

    Methods inherited from interface com.vaadin.flow.component.HasComponents

    add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasEnabled

    isEnabled, setEnabled

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasText

    getText, getWhiteSpace, setText, setWhiteSpace

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.shared.HasThemeVariant

    addThemeVariants, removeThemeVariants
  • Field Details

    • applicationContext

      protected org.springframework.context.ApplicationContext applicationContext
    • fileStorageLocator

      protected FileStorageLocator fileStorageLocator
    • valueSource

      protected ValueSource<V> valueSource
    • valueSourceValueChangeRegistration

      protected com.vaadin.flow.shared.Registration valueSourceValueChangeRegistration
    • valueSourceStateChangeRegistration

      protected com.vaadin.flow.shared.Registration valueSourceStateChangeRegistration
  • Constructor Details

    • JmixImage

      public JmixImage()
  • Method Details

    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • autowireDependencies

      protected void autowireDependencies()
    • getValueSource

      @Nullable public ValueSource<V> getValueSource()
      Specified by:
      getValueSource in interface SupportsValueSource<V>
    • setValueSource

      public void setValueSource(@Nullable ValueSource<V> valueSource)
      Specified by:
      setValueSource in interface SupportsValueSource<V>
    • bind

      protected void bind()
    • unbind

      protected void unbind()
    • onValueSourceValueChange

      protected void onValueSourceValueChange(ValueSource.ValueChangeEvent<V> event)
    • onValueSourceStateChange

      protected void onValueSourceStateChange(DataUnit.StateChangeEvent event)
    • updateSource

      protected void updateSource()
    • createResource

      protected Object createResource(@Nullable V value)
    • generateFileName

      protected String generateFileName()