Interface ITrack
-
- All Superinterfaces:
IComponent<ITrack>,IHtmlBasedComponent<ITrack>,IXulElement<ITrack>
public interface ITrack extends IXulElement<ITrack>
ImmutableTrackcomponentIt lets you specify some timed text tracks like captions or subtitles for media components such as
IAudioor Video ([EE]).- Author:
- jumperchen
- See Also:
Track
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classITrack.BuilderBuilds instances of typeITrack.static classITrack.KindSpecifies the kind withwithKind(Kind)static classITrack.UpdaterBuilds an updater of typeITrackforUiAgent.smartUpdate(Locator, SmartUpdater).
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.StringgetKind()Returns what kind of track it is.java.lang.StringgetLabel()Returns a readable description of this track.java.lang.StringgetSrc()Returns the source address of this track.java.lang.StringgetSrclang()Returns the language of the source.default java.lang.StringgetWidgetClass()Returns the client widget class.default booleanisAsDefault()Returns if this track should be enabled by default.static ITrackof(java.lang.String label)Returns the instance with the given label.static ITrackofId(java.lang.String id)Returns the instance with the given id.static ITrackofKind(ITrack.Kind kind)Returns the instance with the given kind.static ITrackofSrc(java.lang.String src)Returns the instance with the given src.ITrackwithAsDefault(boolean asDefault)Returns a copy ofthisimmutable component with the specifiedasDefault.ITrackwithKind(java.lang.String kind)Returns a copy ofthisimmutable component with the specifiedkind.default ITrackwithKind(ITrack.Kind kind)Returns a copy ofthisimmutable component with the specifiedkind.ITrackwithLabel(java.lang.String label)Returns a copy ofthisimmutable component with the specifiedlabel.ITrackwithSrc(java.lang.String src)Returns a copy ofthisimmutable component with the specifiedsrclang.ITrackwithSrclang(java.lang.String srclang)Returns a copy ofthisimmutable component with the specifiedsrclang.-
Methods inherited from interface org.zkoss.stateless.sul.IComponent
getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides
-
Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent
getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex
-
Methods inherited from interface org.zkoss.stateless.sul.IXulElement
getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip
-
-
-
-
Field Detail
-
DEFAULT
static final ITrack DEFAULT
Constant for default attributes of this immutable component.
-
-
Method Detail
-
getWidgetClass
default java.lang.String getWidgetClass()
Returns the client widget class.Default:
"zul.med.Track"- Specified by:
getWidgetClassin interfaceIComponent<ITrack>
-
isAsDefault
default boolean isAsDefault()
Returns if this track should be enabled by default.Default:
false.
-
withAsDefault
ITrack withAsDefault(boolean asDefault)
Returns a copy ofthisimmutable component with the specifiedasDefault.Sets if this track should be enabled by default.
- Parameters:
asDefault- Whether this track should be enabled by default.Default:
false.- Returns:
- A modified copy of the
thisobject
-
getKind
@Nullable java.lang.String getKind()
Returns what kind of track it is.Default:
null.
-
withKind
ITrack withKind(@Nullable java.lang.String kind)
Returns a copy ofthisimmutable component with the specifiedkind.Sets what kind of track it is. The following keywords are accepted:
- subtitles
- captions
- descriptions
- chapters
- metadata
- Parameters:
kind- What kind of track it is.Default:
null.- Returns:
- A modified copy of the
thisobject
-
withKind
default ITrack withKind(@Nullable ITrack.Kind kind)
Returns a copy ofthisimmutable component with the specifiedkind.Sets what kind of track it is. The following keywords are accepted:
- subtitles
- captions
- descriptions
- chapters
- metadata
- Parameters:
kind- What kind of track it is.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getLabel
@Nullable java.lang.String getLabel()
Returns a readable description of this track.Default:
null.
-
withLabel
ITrack withLabel(@Nullable java.lang.String label)
Returns a copy ofthisimmutable component with the specifiedlabel.Sets a readable description of this track.
- Parameters:
label- A readable description of this track.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getSrc
@Nullable java.lang.String getSrc()
Returns the source address of this track.Default:
null.
-
withSrc
ITrack withSrc(@Nullable java.lang.String src)
Returns a copy ofthisimmutable component with the specifiedsrclang.Sets the source address of this track. Must be a valid URL. This attribute must be specified. The URL must have the same origin as the parent
<audio>or<video>, unless thecrossoriginattribute is set.- Parameters:
src- The source address of this track.Default:
null.- Returns:
- A modified copy of the
thisobject
-
getSrclang
@Nullable java.lang.String getSrclang()
Returns the language of the source.Default:
null.- Returns:
- the language of the source.
-
withSrclang
ITrack withSrclang(@Nullable java.lang.String srclang)
Returns a copy ofthisimmutable component with the specifiedsrclang.Sets the language of the source.
- Parameters:
srclang- The language of the source.Default:
null.- Returns:
- A modified copy of the
thisobject
-
of
static ITrack of(java.lang.String label)
Returns the instance with the given label.- Parameters:
label- The label of the component.
-
ofSrc
static ITrack ofSrc(java.lang.String src)
Returns the instance with the given src.- Parameters:
src- The src of the component.
-
ofKind
static ITrack ofKind(ITrack.Kind kind)
Returns the instance with the given kind.- Parameters:
kind- What kind of track it is.
-
ofId
static ITrack ofId(java.lang.String id)
Returns the instance with the given id.- Parameters:
id- The id to identify this component
-
-