Package com.storedobject.vaadin
Class Media
java.lang.Object
com.vaadin.flow.component.Component
com.storedobject.vaadin.Media
- All Implemented Interfaces:
- HasSize,- com.vaadin.flow.component.AttachNotifier,- com.vaadin.flow.component.DetachNotifier,- com.vaadin.flow.component.HasElement,- com.vaadin.flow.component.HasSize,- com.vaadin.flow.component.HasStyle,- Serializable
Base class for other media classes such as 
Audio, Video etc. Memory leak is prevented from all the
 StreamResource set as sources.- Author:
- Syam
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddSource(com.vaadin.flow.server.StreamResource... resources) Add sources.voidAdd a URI source.voidclear()Clear the current sources.protected voidonAttach(com.vaadin.flow.component.AttachEvent attachEvent) protected voidonDetach(com.vaadin.flow.component.DetachEvent detachEvent) voidsetSource(com.vaadin.flow.server.StreamResource... resources) Set sources.voidSet a URI source.voidshowControls(boolean on) Show controls.Methods inherited from class com.vaadin.flow.component.ComponentaddListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifieraddAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifieraddDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElementgetElementMethods inherited from interface com.vaadin.flow.component.HasSizegetHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyleaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
- 
Constructor Details- 
Mediapublic Media()Constructor.
- 
Mediapublic Media(com.vaadin.flow.server.StreamResource... resources) Consructor.- Parameters:
- resources- Sources to be set
 
- 
Media
 
- 
- 
Method Details- 
setSourcepublic void setSource(com.vaadin.flow.server.StreamResource... resources) Set sources.- Parameters:
- resources- Sources to be set
 
- 
addSourcepublic void addSource(com.vaadin.flow.server.StreamResource... resources) Add sources.- Parameters:
- resources- Sources to be added
 
- 
setSource
- 
addSource
- 
clearpublic void clear()Clear the current sources.
- 
onDetachprotected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent) - Overrides:
- onDetachin class- com.vaadin.flow.component.Component
 
- 
onAttachprotected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
- onAttachin class- com.vaadin.flow.component.Component
 
- 
showControlspublic void showControls(boolean on) Show controls.- Parameters:
- on- Whether to show or not
 
 
-