public interface ResourceView extends Component, Component.HasCaption
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.
|
static interface |
ResourceView.SourceChangeListener
Listener that will be notified when a source is changed.
|
Component.ActionOwner, Component.ActionsHolder, Component.Alignment, Component.BelongToFrame, Component.Buffered, Component.ChildEditableController, Component.Collapsable, Component.Container, Component.ContextHelpIconClickEvent, Component.Disposable, Component.Editable, Component.EditableChangeEvent, Component.EditableChangeListener, Component.EditableChangeNotifier, Component.ExpandedStateChangeEvent, Component.ExpandedStateChangeListener, Component.Focusable, Component.HasBorder, Component.HasButtonsPanel, Component.HasCaption, Component.HasContextHelp, Component.HasFormatter, Component.HasIcon, Component.HasInputPrompt, Component.HasNamedComponents, Component.HasOptionsStyleProvider, Component.HasPresentations, Component.HasRowsCount, Component.HasSettings, Component.HasValue, Component.HasXmlDescriptor, Component.LayoutClickEvent, Component.LayoutClickListener, Component.LayoutClickNotifier, Component.Margin, Component.MouseEventDetails, Component.OptionsStyleProvider, Component.OrderedContainer, Component.OuterMargin, Component.SecuredActionsHolder, Component.ShortcutAction, Component.ShortcutNotifier, Component.ShortcutTriggeredEvent, Component.Spacing, Component.UiPermissionAware, Component.Validatable, Component.ValueChangeEvent, Component.ValueChangeListener, Component.Wrapper
AUTO_SIZE, AUTO_SIZE_PX, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addSourceChangeListener(ResourceView.SourceChangeListener 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(ResourceView.SourceChangeListener listener)
Removes a listener that will be notified when a source is changed.
|
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, getDebugId, getHeight, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthUnits, isEnabled, isEnabledItself, isResponsive, isVisible, isVisibleItself, removeStyleName, requestFocus, setAlignment, setDebugId, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getCaption, getDescription, setCaption, setDescription
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()
void addSourceChangeListener(ResourceView.SourceChangeListener listener)
void removeSourceChangeListener(ResourceView.SourceChangeListener listener)