Class AbstractResourceView<T extends com.vaadin.ui.AbstractEmbedded>

java.lang.Object
io.jmix.ui.component.impl.AbstractComponent<T>
io.jmix.ui.component.impl.AbstractResourceView<T>
All Implemented Interfaces:
AttachNotifier, Component, Component.BelongToFrame, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.Wrapper, HasContextHelp, HasDebugId, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer, ResourceView
Direct Known Subclasses:
BrowserFrameImpl, ImageImpl

public abstract class AbstractResourceView<T extends com.vaadin.ui.AbstractEmbedded> extends AbstractComponent<T> implements ResourceView
  • Field Details

    • resource

      protected Resource resource
    • resourceUpdateHandler

      protected Runnable resourceUpdateHandler
  • Constructor Details

    • AbstractResourceView

      protected AbstractResourceView()
  • Method Details

    • getSource

      @Nullable public Resource getSource()
      Specified by:
      getSource in interface ResourceView
      Returns:
      Resource instance
    • setSource

      public void setSource(@Nullable Resource resource)
      Description copied from interface: ResourceView
      Sets the given Resource to the component.
      Specified by:
      setSource in interface ResourceView
      Parameters:
      resource - Resource instance
    • updateValue

      protected void updateValue(@Nullable Resource value)
    • setSource

      public <R extends Resource> R setSource(Class<R> type)
      Description copied from interface: ResourceView
      Creates the resource with the given type and sets it to the component.
      Specified by:
      setSource in interface ResourceView
      Type Parameters:
      R - Resource inheritor
      Parameters:
      type - resource class to be created
      Returns:
      new resource instance
    • setAlternateText

      public void setAlternateText(@Nullable String alternateText)
      Description copied from interface: ResourceView
      Sets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.
      Specified by:
      setAlternateText in interface ResourceView
      Parameters:
      alternateText - a short, human-readable description of this component's content
    • getAlternateText

      @Nullable public String getAlternateText()
      Description copied from interface: ResourceView
      Gets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.
      Specified by:
      getAlternateText in interface ResourceView
      Returns:
      alternate text
    • addSourceChangeListener

      public Subscription addSourceChangeListener(Consumer<ResourceView.SourceChangeEvent> listener)
      Description copied from interface: ResourceView
      Adds a listener that will be notified when a source is changed.
      Specified by:
      addSourceChangeListener in interface ResourceView