Interface ITrack
-
- All Superinterfaces:
IComponent<ITrack>
,IHtmlBasedComponent<ITrack>
,IXulElement<ITrack>
public interface ITrack extends IXulElement<ITrack>
ImmutableTrack
componentIt lets you specify some timed text tracks like captions or subtitles for media components such as
IAudio
or Video ([EE]).- Author:
- jumperchen
- See Also:
Track
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ITrack.Builder
Builds instances of typeITrack
.static class
ITrack.Kind
Specifies the kind withwithKind(Kind)
static class
ITrack.Updater
Builds an updater of typeITrack
forUiAgent.smartUpdate(Locator, SmartUpdater)
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.String
getKind()
Returns what kind of track it is.java.lang.String
getLabel()
Returns a readable description of this track.java.lang.String
getSrc()
Returns the source address of this track.java.lang.String
getSrclang()
Returns the language of the source.default java.lang.String
getWidgetClass()
Returns the client widget class.default boolean
isAsDefault()
Returns if this track should be enabled by default.static ITrack
of(java.lang.String label)
Returns the instance with the given label.static ITrack
ofId(java.lang.String id)
Returns the instance with the given id.static ITrack
ofKind(ITrack.Kind kind)
Returns the instance with the given kind.static ITrack
ofSrc(java.lang.String src)
Returns the instance with the given src.ITrack
withAsDefault(boolean asDefault)
Returns a copy ofthis
immutable component with the specifiedasDefault
.ITrack
withKind(java.lang.String kind)
Returns a copy ofthis
immutable component with the specifiedkind
.default ITrack
withKind(ITrack.Kind kind)
Returns a copy ofthis
immutable component with the specifiedkind
.ITrack
withLabel(java.lang.String label)
Returns a copy ofthis
immutable component with the specifiedlabel
.ITrack
withSrc(java.lang.String src)
Returns a copy ofthis
immutable component with the specifiedsrclang
.ITrack
withSrclang(java.lang.String srclang)
Returns a copy ofthis
immutable 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:
getWidgetClass
in 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 ofthis
immutable 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
this
object
-
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 ofthis
immutable 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
this
object
-
withKind
default ITrack withKind(@Nullable ITrack.Kind kind)
Returns a copy ofthis
immutable 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
this
object
-
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 ofthis
immutable 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
this
object
-
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 ofthis
immutable 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 thecrossorigin
attribute is set.- Parameters:
src
- The source address of this track.Default:
null
.- Returns:
- A modified copy of the
this
object
-
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 ofthis
immutable 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
this
object
-
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
-
-