public abstract class AbstractResourceView<T extends com.vaadin.ui.AbstractEmbedded> extends AbstractComponent<T> implements ResourceView
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 Resource |
resource |
protected java.lang.Runnable |
resourceUpdateHandler |
alignment, applicationContext, component, contextHelpIconClickHandler, contextHelpIconClickListener, descriptionAsHtml, element, frame, htmlSanitizerEnabled, icon, ICON_STYLE, id, parent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE
Modifier | Constructor and Description |
---|---|
protected |
AbstractResourceView() |
Modifier and Type | Method and Description |
---|---|
io.jmix.core.common.event.Subscription |
addSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
Adds a listener that will be notified when a source is changed.
|
java.lang.String |
getAlternateText()
Gets this component's alternate text that can be presented instead of the component's normal content for
accessibility purposes.
|
Resource |
getSource() |
void |
setAlternateText(java.lang.String alternateText)
Sets this component's alternate text that can be presented instead of the component's normal content for
accessibility purposes.
|
<R extends Resource> |
setSource(java.lang.Class<R> type)
Creates the resource with the given
type and sets it to the component. |
void |
setSource(Resource resource)
Sets the given
Resource to the component. |
protected void |
updateValue(Resource value) |
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
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 Resource resource
protected java.lang.Runnable resourceUpdateHandler
@Nullable public Resource getSource()
getSource
in interface ResourceView
Resource
instancepublic void setSource(@Nullable Resource resource)
ResourceView
Resource
to the component.setSource
in interface ResourceView
resource
- Resource instanceprotected void updateValue(@Nullable Resource value)
public <R extends Resource> R setSource(java.lang.Class<R> type)
ResourceView
type
and sets it to the component.setSource
in interface ResourceView
R
- Resource
inheritortype
- resource class to be createdpublic void setAlternateText(@Nullable java.lang.String alternateText)
ResourceView
setAlternateText
in interface ResourceView
alternateText
- a short, human-readable description of this component's content@Nullable public java.lang.String getAlternateText()
ResourceView
getAlternateText
in interface ResourceView
public io.jmix.core.common.event.Subscription addSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
ResourceView
addSourceChangeListener
in interface ResourceView