Package io.jmix.ui.component
Interface ResourceView
- All Superinterfaces:
Component,Component.HasCaption,Component.HasDescription,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer
- All Known Subinterfaces:
BrowserFrame,Image<T>
- All Known Implementing Classes:
AbstractResourceView,BrowserFrameImpl,ImageImpl
public interface ResourceView
extends Component, Component.HasCaption, HasContextHelp, HasHtmlCaption, HasHtmlDescription, HasHtmlSanitizer
A class that implements this interface is intended for viewing different resources, e.g.
UrlResource, FileResource, etc.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceMarker interface to indicate that the implementing class supports MIME type setting.static interfaceMarker interface to indicate that the implementing class has stream settings (such as cache time, buffer size or file name).static classSourceChangeEvent is fired when a source is changed.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.ContextHelpIconClickEvent -
Field Summary
Fields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that will be notified when a source is changed.Gets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.voidsetAlternateText(String alternateText) Sets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.voidSets the givenResourceto the component.<R extends Resource>
RCreates the resource with the giventypeand sets it to the component.Methods 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, setHtmlSanitizerEnabled
-
Method Details
-
getSource
- Returns:
Resourceinstance
-
setSource
@StudioElementsGroup(caption="Resource", xmlElement="resource", icon="io/jmix/ui/icon/element/resource.svg") void setSource(@Nullable Resource resource) Sets the givenResourceto the component.- Parameters:
resource- Resource instance
-
setSource
Creates the resource with the giventypeand sets it to the component.- Type Parameters:
R-Resourceinheritor- Parameters:
type- resource class to be created- Returns:
- new resource instance
-
setAlternateText
Sets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.- Parameters:
alternateText- a short, human-readable description of this component's content
-
getAlternateText
Gets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.- Returns:
- alternate text
-
addSourceChangeListener
Adds a listener that will be notified when a source is changed.
-