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.IconNested classes/interfaces inherited from interface com.iizix.prop.vs.IVSComponentState
IVSComponentState.StateField Summary
Fields inherited from class com.iizix.prop.ui.UIComp
EMPTY, REMOTE_FOCUS_EVENT, styles, vsFieldFields inherited from class com.iizix.prop.PropCnr
EMPTY_CLASSES, EMPTY_CNRS, EXTENDS_FRAMEWORK_ERROR_IDFields 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_2Fields 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_PRIVATEFields inherited from interface com.iizix.gyro.IMessageBox
ICON_ERROR, ICON_INFORMATION, ICON_MAP, ICON_NONE, ICON_QUESTION, ICON_WARNINGFields inherited from interface com.iizix.prop.ui.IUIComp
ERROR, INFORMATION, NONE, WARNINGConstructor Summary
ConstructorsMethod Summary
Modifier and TypeMethodDescriptionbooleanaddListener(IUIMediaListener listener) Adds a media listener for client media player events.clone()Creates a clone out of this property.booleanDecreases the playback rate by 0.1, default rate being 1.booleandecreasePlaybackRate(IUIMediaListener callback) Decreases the playback rate by 0.1, default rate being 1.booleanDecreases the players volume by a step of 10.booleandecreaseVolume(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 intGets the device type supported by this component: -1=mobile, 0=both, 1=desktop.booleanReturns if the component has implicit component horizontal fill.booleanReturns if the component has implicit component vertical fill.booleanIncreases the playback rate by 0.1, default rate being 1.booleanincreasePlaybackRate(IUIMediaListener callback) Increases the playback rate by 0.1, default rate being 1.booleanIncreases the players volume by a step of 10.booleanincreaseVolume(IUIMediaListener callback) Increases the players volume by a step of 10.booleanReturns if the component can show the context menu in mobile mode.booleanload()Requests the player to LOAD the media.booleanload(IUIMediaListener callback) Requests the player to LOAD the media.voidonRemoteEvent(RemoteEvent event) Called when a remote property event should be processed by this property.booleanpause()Sets the state of the player to PAUSE mode.booleanpause(IUIMediaListener callback) Sets the state of the player to PAUSE mode.booleanplay()Sets the state of the player to PLAY mode, i.e.booleanplay(IUIMediaListener callback) Sets the state of the player to PLAY mode, i.e.booleanremoveListener(IUIMediaListener listener) Removes a listener.booleanrequestMediaInfo(IUIMediaListener callback) Request remote media player information.booleanrewind(double seconds) Rewinds the players position backward a number of seconds.booleanrewind(double seconds, IUIMediaListener callback) Rewinds the players position backward a number of seconds.booleansetAssetReference(String ref) Sets a new asset to the media component.booleansetMuted(boolean on) Sets the player's muted mode.booleansetMuted(boolean on, IUIMediaListener callback) Sets the player's muted mode.booleansetPlaybackRate(double rate) Sets the playback rate factor, default being 1.booleansetPlaybackRate(double rate, IUIMediaListener callback) Sets the playback rate factor, default being 1.booleansetPosition(double position) Sets the players position in seconds.booleansetPosition(double position, IUIMediaListener callback) Sets the players position in seconds.booleansetVolume(int volume) Sets the players volume.booleansetVolume(int volume, IUIMediaListener callback) Sets the players volume.booleanskip(double seconds) Skips the players position forward a number of seconds.booleanskip(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, verifyComponentScopeMethods 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, virtualizeMethods 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, warningMethods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.iizix.IComponent
messageBoxMethods inherited from interface com.iizix.prop.ICustomDataProvider
getCustomData, putCustomData, putCustomDataIfAbsentMethods 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, warningMethods inherited from interface com.iizix.gyro.IMessageBox
messageBox, messageBox, messageBoxMethods 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, validateClassInstancesMethods inherited from interface com.iizix.prop.ui.IUIComp
getContainerFirstUIComponent, getContainerFirstUIComponentNull, getFirstUIComponent, getFirstUIComponentNull, getPanelUIComponent, getPanelUIComponentNull, getUIRefMethods 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 thesetPropertyAtomcall.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 theGPropitems. 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
nullfor none.
getAssetReference
Gets the current asset reference.- Returns:
- The asset reference, or
nullfor 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,
falsemeans 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,
falsemeans 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, ornullfor none.- Returns:
- Success flag,
falsemeans 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,
falsemeans this UI media component is already disposed.
pause
Sets the state of the player to PAUSE mode.- Parameters:
callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans 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,
falsemeans 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, ornullfor none.- Returns:
- Success flag,
falsemeans 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,
falsemeans this UI media component is already disposed.Note that the return value is
trueeven 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, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
trueeven 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,
falsemeans this UI media component is already disposed of.Note that the return value is
trueeven if the volume is the same as the current volume. - Throws:
IllegalArgumentException- Ifvolumeis 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, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
trueeven if the volume is the same as the current volume. - Throws:
IllegalArgumentException- Ifvolumeis not in the range of 0-100.
increaseVolume
public boolean increaseVolume()Increases the players volume by a step of 10.- Returns:
- Success flag,
falsemeans this UI media component is already disposed.Note that the return value is
trueeven if the volume is at its maximum.
increaseVolume
Increases the players volume by a step of 10.- Parameters:
callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
trueeven if the volume is at its maximum.
decreaseVolume
public boolean decreaseVolume()Decreases the players volume by a step of 10.- Returns:
- Success flag,
falsemeans this UI media component is already disposed.Note that the return value is
trueeven if the volume is at its minimum.
decreaseVolume
Decreases the players volume by a step of 10.- Parameters:
callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked.Note that the return value is
trueeven 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, sotruemay be returned even for very large positions after the end time of the media.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of. - Throws:
IllegalArgumentException- Ifpositionis 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, sotruemay be returned even for very large positions after the end time of the media.callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException- Ifpositionis 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, sotruemay be returned even for very large skips after the end time of the media.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of. - Throws:
IllegalArgumentException- Ifsecondsis 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, sotruemay be returned even for very large skips after the end time of the media.callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException- Ifsecondsis 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, sotruemay be returned even for very large rewinds and ends up at the beginning of the media.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of. - Throws:
IllegalArgumentException- Ifsecondsis 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, sotruemay be returned even for very large rewinds and ends up at the beginning of the media.callback- The callback listener, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException- Ifsecondsis 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,
falsemeans this UI media component is already disposed of. - Throws:
IllegalArgumentException- Ifrateis 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, ornullfor none.- Returns:
- Success flag,
falsemeans this UI media component is already disposed of and the callback would never be invoked. - Throws:
IllegalArgumentException- Ifrateis 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,
falsemeans 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, ornullfor none.- Returns:
- Success flag,
falsemeans 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,
falsemeans 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, ornullfor none.- Returns:
- Success flag,
falsemeans 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:
trueif the listener was added,falseotherwise (nothing changed).- Throws:
NullPointerException- If thelistenerisnull.
removeListener
Removes a listener.- Parameters:
listener- The listener to remove.- Returns:
trueiflisteneris successfully removed,falseotherwise, i.e. if not previous an added listener instance.
onRemoteEvent
Called when a remote property event should be processed by this property.- Specified by:
onRemoteEventin interfaceIGProp<GProp<?>[]>- Overrides:
onRemoteEventin 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:
getDeviceTypein interfaceIUIComp
isMobileContextMenuSupported
public boolean isMobileContextMenuSupported()Returns if the component can show the context menu in mobile mode.- Specified by:
isMobileContextMenuSupportedin interfaceIUIContextMenuOwner- Returns:
- Media does not support a mobile context menu.
hasImplicitAlignFillX
public boolean hasImplicitAlignFillX()Returns if the component has implicit component horizontal fill.- Overrides:
hasImplicitAlignFillXin 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:
hasImplicitAlignFillYin 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:
getApproximateSizein classUIComp- Returns:
- The size of the component: 0x0 (none).