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
Modifier and TypeInterfaceDescriptionstatic interface
Marker interface to indicate that the implementing class supports MIME type setting.static interface
Marker interface to indicate that the implementing class has stream settings (such as cache time, buffer size or file name).static class
SourceChangeEvent 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.Wrapper
Nested 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.void
setAlternateText
(String alternateText) Sets this component's alternate text that can be presented instead of the component's normal content for accessibility purposes.void
Sets the givenResource
to the component.<R extends Resource>
RCreates the resource with the giventype
and 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, withUnwrappedComposition
Methods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaption
Methods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescription
Methods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
Methods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtml
Methods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabled
-
Method Details
-
getSource
- Returns:
Resource
instance
-
setSource
@StudioElementsGroup(caption="Resource", xmlElement="resource", icon="io/jmix/ui/icon/element/resource.svg") void setSource(@Nullable Resource resource) Sets the givenResource
to the component.- Parameters:
resource
- Resource instance
-
setSource
Creates the resource with the giventype
and sets it to the component.- Type Parameters:
R
-Resource
inheritor- 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.
-