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 Summary
Constructors -
Method Summary
Modifier 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.Component
addListener, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasSize
getHeight, 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.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Constructor Details
-
Media
public Media()Constructor. -
Media
public Media(com.vaadin.flow.server.StreamResource... resources) Consructor.- Parameters:
resources- Sources to be set
-
Media
-
-
Method Details
-
setSource
public void setSource(com.vaadin.flow.server.StreamResource... resources) Set sources.- Parameters:
resources- Sources to be set
-
addSource
public void addSource(com.vaadin.flow.server.StreamResource... resources) Add sources.- Parameters:
resources- Sources to be added
-
setSource
-
addSource
-
clear
public void clear()Clear the current sources. -
onDetach
protected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent) - Overrides:
onDetachin classcom.vaadin.flow.component.Component
-
onAttach
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent) - Overrides:
onAttachin classcom.vaadin.flow.component.Component
-
showControls
public void showControls(boolean on) Show controls.- Parameters:
on- Whether to show or not
-