Class UIMedia
- All Implemented Interfaces:
EventListener
,IMessageBox
,IComponent
,ICustomDataProvider
,IGProp<GProp<?>[]>
,IPropCnr
,IUIComp
,IUIContextMenuOwner
,IVSComponentListener
,IVSComponentState
,IVSFieldListener
,Cloneable
- Direct Known Subclasses:
EUIMedia
- Author:
- Christopher Mindus
Nested Class Summary
Nested classes/interfaces inherited from interface com.iizix.gyro.IMessageBox
IMessageBox.Icon
Nested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.State
Field Summary
Fields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsField
Fields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_ID
Fields inherited from class com.iizix.prop.GProp
GPDEBUG, PROP_ATTR_STRING_EDITOR_PROP, PROP_ATTR_STRING_ERRORED_NAME, PROP_ATTR_STRING_EXTENDS, PROP_ATTR_STRING_EXTENDS_FINAL, PROP_ATTR_STRING_EXTENDS_PRIVATE, PROP_ATTR_STRING_NULLABLE, PROP_ATTR_STRING_PRIVATE, PROP_ATTR_STRING_PRIVATE_CHANGE_EVENT, PROP_ATTR_STRING_READ_ONLY, PROP_USER_1, PROP_USER_2
Fields inherited from interface com.iizix.prop.IGProp
EQC_ERROR_IGNORE_ALL, EQC_ERROR_IGNORE_REFERENCES, EQC_IGNORE_ARRAY, EQC_IGNORE_VOLATILE_OR_EDITOR, EQC_INCLUDE_PRIVATE, EQC_SAVE_FILE, EXT_CONTAINER_EXTENDS, EXT_CONTAINER_EXTENDS_VALID, EXT_EXTENDED, EXT_FINAL, EXT_OVERRIDES, EXT_OVERRIDES_FINAL_ERR, EXT_PRIVATE
Fields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNING
Fields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, WARNING
Constructor Summary
Method Summary
Modifier and TypeMethodDescriptionboolean
addListener
(IUIMediaListener listener) Adds a media listener for client media player events.clone()
Creates a clone out of this property.boolean
Decreases the playback rate by 0.1, default rate being 1.boolean
decreasePlaybackRate
(IUIMediaListener callback) Decreases the playback rate by 0.1, default rate being 1.boolean
Decreases the players volume by a step of 10.boolean
decreaseVolume
(IUIMediaListener callback) Decreases the players volume by a step of 10.Returns the size of the component in pixels.Gets the current asset reference.Gets the current asset string.final int
Gets the device type supported by this component: -1=mobile, 0=both, 1=desktop.boolean
Returns if the component has implicit component horizontal fill.boolean
Returns if the component has implicit component vertical fill.boolean
Increases the playback rate by 0.1, default rate being 1.boolean
increasePlaybackRate
(IUIMediaListener callback) Increases the playback rate by 0.1, default rate being 1.boolean
Increases the players volume by a step of 10.boolean
increaseVolume
(IUIMediaListener callback) Increases the players volume by a step of 10.boolean
Returns if the component can show the context menu in mobile mode.boolean
load()
Requests the player to LOAD the media.boolean
load
(IUIMediaListener callback) Requests the player to LOAD the media.void
onRemoteEvent
(RemoteEvent event) Called when a remote property event should be processed by this property.boolean
pause()
Sets the state of the player to PAUSE mode.boolean
pause
(IUIMediaListener callback) Sets the state of the player to PAUSE mode.boolean
play()
Sets the state of the player to PLAY mode, i.e.boolean
play
(IUIMediaListener callback) Sets the state of the player to PLAY mode, i.e.boolean
removeListener
(IUIMediaListener listener) Removes a listener.boolean
requestMediaInfo
(IUIMediaListener callback) Request remote media player information.boolean
rewind
(double seconds) Rewinds the players position backward a number of seconds.boolean
rewind
(double seconds, IUIMediaListener callback) Rewinds the players position backward a number of seconds.boolean
setAssetReference
(String ref) Sets a new asset to the media component.boolean
setMuted
(boolean on) Sets the player's muted mode.boolean
setMuted
(boolean on, IUIMediaListener callback) Sets the player's muted mode.boolean
setPlaybackRate
(double rate) Sets the playback rate factor, default being 1.boolean
setPlaybackRate
(double rate, IUIMediaListener callback) Sets the playback rate factor, default being 1.boolean
setPosition
(double position) Sets the players position in seconds.boolean
setPosition
(double position, IUIMediaListener callback) Sets the players position in seconds.boolean
setVolume
(int volume) Sets the players volume.boolean
setVolume
(int volume, IUIMediaListener callback) Sets the players volume.boolean
skip
(double seconds) Skips the players position forward a number of seconds.boolean
skip
(double seconds, IUIMediaListener callback) Skips the players position forward a number of seconds.Methods inherited from class com.iizix.prop.ui.UIComp
add, addMappings, assignFontInfoResolver, canAcceptUIContainerFocus, canAlignX, canAlignY, canFillX, canFillY, canRequestFocus, canRequestFocus, clearErrorMessage, couldRequestFocusIfVirtualized, createStyles, createTitleProp, disconnectVSField, doUpdateVSFieldFromUIComponent, enterVSProcessing, exitVSProcessing, fireSelection, fireSelection, forbiddenGetCustomDataMap, getBadge, getBestVSFieldValueType, getComponentID, getComponentMappings, getCSSClassNames, getErrorMessage, getErrorMessage, getErrorMessageEx, getErrorMessageString, getErrorMessageString, getErrorMessageStringEx, getFirstContainerVSStateFocus, getFixHeight, getFixWidth, getFontInfo, getForcedAlignX, getForcedAlignY, getKStringText, getLayout, getLayoutMgr, getLayoutMgr, getMappedVSComponent, getMessage, getMessageText, getPixelHeight, getPixelWidth, getPredefinedProps, getSize, getStyles, getStyles, getText, getTitle, getTitleKS, getTitlePKS, getTooltip, getTooltipText, getTrigger, getUIPanel, getUIParent, getValue, getValue, getVirtualSpace, getVSField, getVSStateFocus, hasExplicitHeight, hasExplicitWidth, hasFocus, hasImplicitHeight, hasImplicitWidth, hasSelectionChanged, initPropCnr, invokeOnUICreateTree, isEnabled, isMobile, isReadOnly, isRTL, isVisible, isVSFieldDisconnected, mustHaveExplicitHeight, mustHaveExplicitWidth, mustHaveHeight, mustHaveWidth, onBroken, onComponentSelectedInParent, onEventSelf, onFocusGained, onNotifySelectionChanged, onParentStateChanged, onPrepare, onPrepare, onPropDispose, onResolved, onSelectionChanged, onStateChanged, onValueChanged, processVSComponentSelection, reconnectVSField, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusEx, requestFocusEx, requestFocusEx, requestFocusEx, resetComponentID, setBadge, setBadge, setComponentToVSField, setCSSClassNames, setCSSClassNames2, setEnabled, setEnabled, setErrorMessage, setErrorMessage, setErrorMessage, setErrorMessage, setHTMLText, setLayoutMgr, setMessage, setMessage, setReadOnly, setReadOnly, setText, setText, setTitle, setTitle, setTitle, setTooltip, setTooltip, setUIContainerFocus, setVisible, setVisible, setVSFieldMessageToComponent, setVSFieldToComponent, verify, verifyComponentScope
Methods inherited from class com.iizix.prop.PropCnr
__transferChildProps, addPredefinedProps, addProp, addProp, addProp2, addProp2, appendPropValue, completeVirtualize, containsProp, containsProp, convertLoadedProp, createCopyOfAtom, createUniqueAtom, createUniqueAtom, createUniqueAtom, createVSReference, doPropEqualsArrayValues, enablePropCommunication, enablePropHashMap, equalsTree, equalsTree, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsContainer, getExtendsError, getExtendsName, getExtendsOverride, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropBaseReference, getPropCnr, getPropCount, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue0, getRetargetedVerifyContainer, getString, getString, getString, getString, getValueClasses, getVSReference, hasSendData, initializeElement, initializeExtendsFramework, initializeProp, initializeValue, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsPropertyValid, isExtendsRoot, isPropAddRemoveAllowed, isPropCommunicating, isPropExtended, list, list, logPropNotFound, maybeAddProp, onInsertProp, onPropRemoved, onPropTreeInitialized, onReferenceEvent, onVirtualContainerCreated, onVirtualizationCompleted, paramString, prepare, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, replaceProps, requestFocus, requestFocusEx, resolveReferences, resolveRuntimeReferences, setBool, setBool, setBool, setBool, setCreateRequiredProp, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, shouldCreateProps, shouldSerializeToXML, toElementString, toNativeValue0, usePropHashMap, usesPropIndex, validateChildPropInValue, validateClassInstances, validatePropType, validatePropValue, verifyInternalUseOnly, verifyTree, virtualize
Methods inherited from class com.iizix.prop.GProp
addPropError, addPropListener, appendProp, convertPropError, dispose, equals, equals, equalsErrors, equalsObj, equalsPropValue, equalValues, finalize, fine, fine, finer, finer, finest, finest, fromElementString, getAliasName, getAppSessionGyro, getAppWorker, getAtomPath, getAttribute, getChildReferencePropName, getClientSessionGyro, getClientWorker, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropName, getFullPropNameDebug, getFullPropNameDebug, getListeners, getModuleFolder, getModuleFolder, getParent, getParent, getProjectName, getPropAtom, getPropError, getPropError, getPropErroredName, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromPath, getPropFromReference, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropReferenceTarget, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getPropValueObject, getReferencePropName, getReferencePropNameNoAssert, getRelativePropName, getRootFromName, getRootName, getRootParent, getRootParentNoAssert, getTreeLock, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropForEditor, isPropNullable, isPropPrivate, isPropPrivateAtCreation, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropRootLoading, isPropRootTreeModificationsAllowed, isPropUSER, isPropValueTreeLockNeeded, isPropVirtualized, isPropVirtualizing, isPropVolatile, isPropVolatileOrEditorOnly, isProxied, isSibling, list, list, list, mapAliasToReference, mapAliasToReference, mapReferenceToAlias, mapReferenceToAlias, mapReferenceToProjectRelative, modifyPropValue, moveProp, moveProp, moveProp, onEvent, onPropInvalidateCache, onPropParentChanged, onPropValueSet, paramString, paramValue, post, post, removePropError, removePropListener, removePropUSER, renameProp, renameProp2, resetChangedTree, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPrivateCreateRequiredProp, setPropError, setPropErroredName, setPropExtended, setPropExtendsFinal, setPropExtendsPrivate, setPropForEditor, setPropNullable, setPropPrivate, setPropReadOnly, setPropUSER, setPropValue, setPropValue, setPropValue, setPropValueIncognito, setPropVolatile, severe, severe, severe, shouldSerializeToXML, throwIfReadOnly, toNativeValue, toString, toString, triggerRemoteEvent, triggerRemoteEvent, validateProp, warning, warning, warning
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.iizix.IComponent
messageBox
Methods inherited from interface com.iizix.prop.ICustomDataProvider
getCustomData, putCustomData, putCustomDataIfAbsent
Methods inherited from interface com.iizix.prop.IGProp
addPropError, addPropListener, dispose, equals, fine, fine, finer, finer, finest, finest, fromElementString, getAppSessionGyro, getAtomPath, getClientSessionGyro, getConstraints, getEnvironment, getErroredPropItems, getErroredProps, getErrorsProp, getExtendsRootContainer, getFullPropName, getFullPropNameDebug, getModuleFolder, getModuleFolder, getParent, getParent, getPropAtom, getPropBaseReference, getPropError, getPropError, getPropErrorSeverity, getPropExtendsFlags, getPropFromPath, getPropFromReference, getPropIndex, getPropName, getPropPath, getPropPath, getPropRootPropMgr, getPropTreeErrorSeverity, getPropValue, getPropValue, getReferencePropName, getRelativePropName, getRootParent, getTreeLock, getValueClasses, getVSReference, hasChanged, hasCircularReferencesError, hasPrivateChangeEventProp, hasPropError, hasPropTreeError, info, info, initializeGElement, initializeGProp, isDisposed, isPropChildOf, isPropClientCreated, isPropCommunicating, isPropCreateRequired, isPropExtended, isPropExtendsFinal, isPropExtendsPrivate, isPropExtendsPrivateInRoot, isPropExtendsPrivateInRoot, isPropFile, isPropFolder, isPropNullable, isPropPrivate, isPropReadOnly, isPropReferenceTreeValid, isPropRoot, isPropVirtualized, isSibling, list, list, list, list, list, mapAliasToReference, mapReferenceToAlias, mapReferenceToProjectRelative, moveProp, moveProp, moveProp, onEvent, onEventSelf, onPropTreeInitialized, removePropError, removePropListener, renameProp, resolveRuntimeReferences, setChanged, setConstraints, setConstraints, setParent, setPrivateChangeEventProp, setPropError, setPropExtendsFinal, setPropExtendsPrivate, setPropNullable, setPropPrivate, setPropReadOnly, setPropValue, setPropValue, severe, severe, severe, toElementString, toNativeValue, triggerRemoteEvent, triggerRemoteEvent, validateProp, validatePropType, validatePropValue, verify, warning, warning, warning
Methods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox, messageBox
Methods inherited from interface com.iizix.prop.IPropCnr
addProp, addProp, addProp2, addProp2, canRequestFocus, canRequestFocus, canRequestFocus, containsProp, containsProp, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, couldRequestFocusIfVirtualized, createCopyOfAtom, createUniqueAtom, createUniqueAtom, enablePropCommunication, enablePropHashMap, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getAllProps, getBool, getBool, getBool, getBool, getChildPropError, getChildPropError, getChildPropErrorSeverity, getChildPropErrorSeverity, getErrorsProp, getExtendsError, getExtendsName, getExtendsPossibleClasses, getFirstProp, getFirstProp, getFocusEngine, getInt, getInt, getInt, getInt, getLong, getLong, getLong, getLong, getNumber, getNumber, getNumber, getNumber, getPossibleChildren, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getProp, getPropCnr, getPropCount, getPropIndex, getPropIndex, getPropIndexes, getProps, getProps, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getPropValue, getString, getString, getString, getString, hasFocus, initializeExtendsFramework, insertProp, insertProp2, isChild, isExtendsOverriden, isExtendsRoot, isPropAddRemoveAllowed, isPropExtended, removeAllProps, removeAllProps2, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, removeProp2, reorderProps, requestFocus, requestFocusEx, setBool, setBool, setBool, setBool, setExtendsName, setExtendsOverride, setInt, setInt, setInt, setLong, setLong, setLong, setLong, setNumber, setNumber, setNumber, setNumber, setProp, setProp, setProp, setProp2, setProp2, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setPropValue, setString, setString, setString, setString, usePropHashMap, usesPropIndex, validateClassInstances
Methods inherited from interface com.iizix.prop.ui.IUIComp
getContainerFirstUIComponent, getContainerFirstUIComponentNull, getFirstUIComponent, getFirstUIComponentNull, getPanelUIComponent, getPanelUIComponentNull, getUIRef
Methods inherited from interface com.iizix.prop.ui.IUIContextMenuOwner
getContainedContextMenu, getContextMenu, getReferencedContextMenu, isContextMenuSupported, onBroken, onResolved
Constructor Details
UIMedia
public UIMedia()Creates the component without a name. The name must be set in all cases using thesetPropertyAtom
call.UIMedia
Creates the component with the specified name. All system-reserved names for components begins with "$".- Parameters:
propertyAtom
- the name of the component, unique within it's parent.
UIMedia
Creates the component with the specified name, initialized to contain theGProp
items. All system-reserved names for components begins with "$".- Parameters:
propertyAtom
- The name of the component, unique within it's parent.newValue
- The array of all properties the component should have.- Throws:
PropException
- when at least one of the properties to initialize the label component with is invalid.
Method Details
getAssetReferenceString
Gets the current asset string.- Returns:
- The asset reference as a string, or
null
for none.
getAssetReference
Gets the current asset reference.- Returns:
- The asset reference, or
null
for none.
setAssetReference
Sets a new asset to the media component.- Parameters:
ref
- The media asset reference.- Returns:
- true For success, false for no change.
- Throws:
PropException
- For property errors.
requestMediaInfo
Request remote media player information.- Parameters:
callback
- The callback to invoke with the information reply. Note that this is an asynchronous callback. It will not be invoked if the media player is destroyed somehow due to change of panel, client session disposal, etc.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked. - Throws:
NullPointerException
- If the callback isnull
.
play
public boolean play()Sets the state of the player to PLAY mode, i.e. to start playing the media the first time, or resume from a pause.- Returns:
- Success flag,
false
means this UI media component is already disposed.
play
Sets the state of the player to PLAY mode, i.e. to start playing the media the first time, or resume from a pause.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.
pause
public boolean pause()Sets the state of the player to PAUSE mode.- Returns:
- Success flag,
false
means this UI media component is already disposed.
pause
Sets the state of the player to PAUSE mode.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.
load
public boolean load()Requests the player to LOAD the media. Calling this method will revert the player much like to its initial state, i.e. PLAY or PAUSE will be stopped and media is reset to the beginning.- Returns:
- Success flag,
false
means this UI media component is already disposed.
load
Requests the player to LOAD the media. Calling this method will revert the player much like to its initial state, i.e. PLAY or PAUSE will be stopped and media is reset to the beginning.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.
setMuted
public boolean setMuted(boolean on) Sets the player's muted mode.- Parameters:
on
- The muted state.- Returns:
- Success flag,
false
means this UI media component is already disposed.Note that the return value is
true
even if the muted state already is in the requested state.
setMuted
Sets the player's muted mode.- Parameters:
on
- The muted state.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
true
even if the muted state already is in the requested state.
setVolume
public boolean setVolume(int volume) Sets the players volume.- Parameters:
volume
- The volume value 0-100, where 100 is full volume.- Returns:
- Success flag,
false
means this UI media component is already disposed of.Note that the return value is
true
even if the volume is the same as the current volume. - Throws:
IllegalArgumentException
- Ifvolume
is not in the range of 0-100.
setVolume
Sets the players volume.- Parameters:
volume
- The volume value 0-100, where 100 is full volume.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
true
even if the volume is the same as the current volume. - Throws:
IllegalArgumentException
- Ifvolume
is not in the range of 0-100.
increaseVolume
public boolean increaseVolume()Increases the players volume by a step of 10.- Returns:
- Success flag,
false
means this UI media component is already disposed.Note that the return value is
true
even if the volume is at its maximum.
increaseVolume
Increases the players volume by a step of 10.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
true
even if the volume is at its maximum.
decreaseVolume
public boolean decreaseVolume()Decreases the players volume by a step of 10.- Returns:
- Success flag,
false
means this UI media component is already disposed.Note that the return value is
true
even if the volume is at its minimum.
decreaseVolume
Decreases the players volume by a step of 10.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
true
even if the volume is at its minimum.
setPosition
public boolean setPosition(double position) Sets the players position in seconds.- Parameters:
position
- The time position in seconds of the player. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large positions after the end time of the media.- Returns:
- Success flag,
false
means this UI media component is already disposed of. - Throws:
IllegalArgumentException
- Ifposition
is negative.
setPosition
Sets the players position in seconds.- Parameters:
position
- The time position in seconds of the player. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large positions after the end time of the media.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException
- Ifposition
is negative.
skip
public boolean skip(double seconds) Skips the players position forward a number of seconds.- Parameters:
seconds
- The number of seconds to skip forward. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large skips after the end time of the media.- Returns:
- Success flag,
false
means this UI media component is already disposed of. - Throws:
IllegalArgumentException
- Ifseconds
is range is not between 1 and 500.
skip
Skips the players position forward a number of seconds.- Parameters:
seconds
- The number of seconds to skip forward. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large skips after the end time of the media.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException
- Ifseconds
is range is not between 1 and 500.
rewind
public boolean rewind(double seconds) Rewinds the players position backward a number of seconds.- Parameters:
seconds
- The number of seconds to rewind backward. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large rewinds and ends up at the beginning of the media.- Returns:
- Success flag,
false
means this UI media component is already disposed of. - Throws:
IllegalArgumentException
- Ifseconds
is range is not between 1 and 500.
rewind
Rewinds the players position backward a number of seconds.- Parameters:
seconds
- The number of seconds to rewind backward. Note that the duration of the media limits the position that can be set, but will not generate an invalid request, sotrue
may be returned even for very large rewinds and ends up at the beginning of the media.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException
- Ifseconds
is range is not between 1 and 500.
setPlaybackRate
public boolean setPlaybackRate(double rate) Sets the playback rate factor, default being 1.- Parameters:
rate
- The playback rate factor in the range of 0 to 100.- Returns:
- Success flag,
false
means this UI media component is already disposed of. - Throws:
IllegalArgumentException
- Ifrate
is range is not between 0 and 100.
setPlaybackRate
Sets the playback rate factor, default being 1.- Parameters:
rate
- The playback rate factor in the range of 0 to 100.callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException
- Ifrate
is range is not between 0 and 100.
increasePlaybackRate
public boolean increasePlaybackRate()Increases the playback rate by 0.1, default rate being 1.- Returns:
- Success flag,
false
means this UI media component is already disposed of.
increasePlaybackRate
Increases the playback rate by 0.1, default rate being 1.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.
decreasePlaybackRate
public boolean decreasePlaybackRate()Decreases the playback rate by 0.1, default rate being 1.- Returns:
- Success flag,
false
means this UI media component is already disposed of.
decreasePlaybackRate
Decreases the playback rate by 0.1, default rate being 1.- Parameters:
callback
- The callback listener, ornull
for none.- Returns:
- Success flag,
false
means this UI media component is already disposed of and the callback would never be invoked.
addListener
Adds a media listener for client media player events.- Parameters:
listener
- The listener to add.- Returns:
true
if the listener was added,false
otherwise (nothing changed).- Throws:
NullPointerException
- If thelistener
isnull
.
removeListener
Removes a listener.- Parameters:
listener
- The listener to remove.- Returns:
true
iflistener
is successfully removed,false
otherwise, i.e. if not previous an added listener instance.
onRemoteEvent
Called when a remote property event should be processed by this property.- Specified by:
onRemoteEvent
in interfaceIGProp<GProp<?>[]>
- Overrides:
onRemoteEvent
in classUIComp
- Parameters:
event
- The remote event.
getDeviceType
public final int getDeviceType()Gets the device type supported by this component: -1=mobile, 0=both, 1=desktop.- Specified by:
getDeviceType
in interfaceIUIComp
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupported
in interfaceIUIContextMenuOwner
- Returns:
- Media does not support a mobile context menu.
hasImplicitAlignFillX
public boolean hasImplicitAlignFillX()Returns if the component has implicit component horizontal fill.- Overrides:
hasImplicitAlignFillX
in classUIComp
- Returns:
- Always true: true means component will always fill the space in X.
hasImplicitAlignFillY
public boolean hasImplicitAlignFillY()Returns if the component has implicit component vertical fill.- Overrides:
hasImplicitAlignFillY
in classUIComp
- Returns:
- Always: true means component will always fill the space in Y.
clone
Creates a clone out of this property. The cloning is overridden by the subclasses in order to handle cloning of its class variables appropriately.Cloning is used for "virtualization" of a property tree in the server. Client property classes will therefore throw
CloneNotSupportedException
.Once a tree has been cloned, the change-flag is reset, and the create-flag is set. All listeners are also removed! The new cloned property is an orphan, i.e. has no parent set. All children properties are also (deep) cloned.
Note that the cloning process is done WITHOUT thread synchronization for performance reasons, thus no modifications should be done to the tree!
getApproximateSize
Returns the size of the component in pixels. The size is a calculation and does not exactly reflect the real size that may be different due to additional styles not taken into account by this method. The size is calculated from the font of the component and default or defined values (such as character length or number of lines for text area).- Specified by:
getApproximateSize
in classUIComp
- Returns:
- The size of the component: 0x0 (none).