|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.vaadin.ui.AbstractComponent
com.vaadin.ui.AbstractMedia
public class AbstractMedia
Abstract base class for the HTML5 media components.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractComponent |
---|
AbstractComponent.ComponentErrorEvent, AbstractComponent.ComponentErrorHandler |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
Component.ErrorEvent, Component.ErrorListener, Component.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.terminal.Paintable |
---|
Paintable.RepaintRequestEvent, Paintable.RepaintRequestListener |
Field Summary |
---|
Fields inherited from interface com.vaadin.terminal.Sizeable |
---|
SIZE_UNDEFINED, UNIT_SYMBOLS, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Constructor Summary | |
---|---|
AbstractMedia()
|
Method Summary | |
---|---|
void |
addSource(Resource source)
Adds an alternative media file to the sources list. |
String |
getAltText()
|
List<Resource> |
getSources()
|
boolean |
isAutoplay()
|
boolean |
isHtmlContentAllowed()
|
boolean |
isMuted()
|
boolean |
isShowControls()
|
void |
paintContent(PaintTarget target)
Paints any needed component-specific things to the given UIDL stream. |
void |
pause()
Pauses the media. |
void |
play()
Starts playback of the media. |
void |
setAltText(String text)
Sets the alternative text to be displayed if the browser does not support HTML5. |
void |
setAutoplay(boolean autoplay)
Sets whether the media is to automatically start playback when enough data has been loaded. |
void |
setHtmlContentAllowed(boolean htmlContentAllowed)
Set whether the alternative text ( setAltText(String) ) is
rendered as HTML or not. |
void |
setMuted(boolean muted)
Set whether to mute the audio or not. |
void |
setShowControls(boolean showControls)
Sets whether or not the browser should show native media controls. |
void |
setSource(Resource source)
Sets a single media file as the source of the media component. |
void |
setSources(Resource... sources)
Set multiple sources at once. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractMedia()
Method Detail |
---|
public void setSource(Resource source)
source
- public void addSource(Resource source)
source
- public void setSources(Resource... sources)
sources
- public List<Resource> getSources()
public void setShowControls(boolean showControls)
showControls
- public boolean isShowControls()
public void setAltText(String text)
setHtmlContentAllowed(boolean)
is set to true. With HTML
rendering, this method can also be used to implement fallback to a
flash-based player, see the Mozilla Developer Network for details.
text
- public String getAltText()
public void setHtmlContentAllowed(boolean htmlContentAllowed)
setAltText(String)
) is
rendered as HTML or not.
htmlContentAllowed
- public boolean isHtmlContentAllowed()
setAltText(String)
) is to
be rendered as HTML.public void setAutoplay(boolean autoplay)
autoplay
- public boolean isAutoplay()
public void setMuted(boolean muted)
muted
- public boolean isMuted()
public void pause()
public void play()
public void paintContent(PaintTarget target) throws PaintException
AbstractComponent
AbstractComponent.paint(PaintTarget)
method handles all general
attributes common to all components, and it calls this method to paint
any component-specific attributes to the UIDL stream.
paintContent
in class AbstractComponent
target
- the target UIDL stream where the component should paint itself
to
PaintException
- if the paint operation failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |