public interface ResourceView extends Component, Component.HasCaption, HasContextHelp, HasHtmlCaption, HasHtmlDescription
UrlResource
, FileResource
, etc.Modifier and Type | Interface and Description |
---|---|
static interface |
ResourceView.HasMimeType
Marker interface to indicate that the implementing class supports MIME type setting.
|
static interface |
ResourceView.HasStreamSettings
Marker interface to indicate that the implementing class has stream settings (such as cache time, buffer size
or file name).
|
static class |
ResourceView.SourceChangeEvent
SourceChangeEvent is fired when a source is changed.
|
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
Subscription |
addSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
Adds a listener that will be notified when a source is changed.
|
<R extends Resource> |
createResource(java.lang.Class<R> type)
Creates resource implementation by its type.
|
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 |
removeSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
Deprecated.
Use
Subscription instead |
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. |
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
void setSource(Resource resource)
Resource
to the component.resource
- Resource instance<R extends Resource> R setSource(java.lang.Class<R> type)
type
and sets it to the component.R
- Resource
inheritortype
- resource class to be created<R extends Resource> R createResource(java.lang.Class<R> type)
R
- Resource
inheritortype
- resource class to be createdvoid setAlternateText(java.lang.String alternateText)
alternateText
- a short, human-readable description of this component's contentjava.lang.String getAlternateText()
Subscription addSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
@Deprecated void removeSourceChangeListener(java.util.function.Consumer<ResourceView.SourceChangeEvent> listener)
Subscription
insteadlistener
- a listener to remove