Package g3.project.elements
Class PlayableElement
- java.lang.Object
-
- nu.xom.Node
-
- nu.xom.ParentNode
-
- nu.xom.Element
-
- g3.project.elements.VisualElement
-
- g3.project.elements.PlayableElement
-
- All Implemented Interfaces:
Includable,Scriptable
public final class PlayableElement extends VisualElement implements Includable
- Author:
- Group 3
-
-
Field Summary
-
Fields inherited from interface g3.project.elements.Includable
INCLUDE_ATTR
-
-
Constructor Summary
Constructors Constructor Description PlayableElement(java.lang.String name)Constructor.PlayableElement(java.lang.String name, java.lang.String uri)Constructor.PlayableElement(nu.xom.Element element)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete(DocIO resIO)Delete the element and sub-elements.java.lang.BooleangetAutoplay()Should the player start automatically?java.lang.BooleangetDisplayPlayer()Should a player be displayed?java.lang.BooleangetLoop()Should play looped?java.lang.DoublegetSeekOffset()Get the seek offset for the player (in seconds).java.util.Optional<java.lang.String>getSourceLoc()Return the source path or URL.voidsetAutoplay(java.lang.Boolean auto)Set auto-play.voidsetDisplayPlayer(java.lang.Boolean disp)Set display of player.voidsetLoop(java.lang.Boolean loop)Set if play should loop.voidsetSeekOffset(java.lang.Double offset)Set the Seek offset (in seconds).-
Methods inherited from class g3.project.elements.VisualElement
addScriptFile, derefAttribute, getAllProps, getAlpha, getByID, getDelaySecs, getDurationSecs, getEvalRequired, getFillColour, getID, getOrigin, getPage, getParentElementScriptingBindings, getParentScriptable, getRealType, getScriptEl, getScriptingBindings, getSize, getStateVariable, getStroke, getVisibility, getVisualProps, getZInd, hasUpdated, makeAttrWithNS, putStateVariable, setAlpha, setDelaySecs, setDurationSecs, setEvalRequired, setFillColour, setID, setOriginXY, setOriginXY, setProps, setSize, setSize, setVisibility, setZInd
-
Methods inherited from class nu.xom.Element
addAttribute, addNamespaceDeclaration, appendChild, copy, getAttribute, getAttribute, getAttribute, getAttributeCount, getAttributeValue, getAttributeValue, getBaseURI, getChildElements, getChildElements, getChildElements, getFirstChildElement, getFirstChildElement, getLocalName, getNamespaceDeclarationCount, getNamespacePrefix, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getQualifiedName, getValue, insertChild, removeAttribute, removeChildren, removeNamespaceDeclaration, setBaseURI, setLocalName, setNamespacePrefix, setNamespaceURI, shallowCopy, toString, toXML
-
Methods inherited from class nu.xom.ParentNode
appendChild, getChild, getChildCount, indexOf, insertChild, removeChild, removeChild, replaceChild
-
-
-
-
Constructor Detail
-
PlayableElement
public PlayableElement(java.lang.String name)
Constructor.- Parameters:
name- Element name.
-
PlayableElement
public PlayableElement(java.lang.String name, java.lang.String uri)Constructor.- Parameters:
name- Element name.uri- Element URI.
-
PlayableElement
public PlayableElement(nu.xom.Element element)
Constructor- Parameters:
element- Element.
-
-
Method Detail
-
delete
public void delete(DocIO resIO)
Description copied from class:VisualElementDelete the element and sub-elements.- Specified by:
deletein classVisualElement- Parameters:
resIO- Resource handler to remove resources on delete.
-
getAutoplay
public java.lang.Boolean getAutoplay()
Should the player start automatically?- Returns:
- Auto-play.
-
setAutoplay
public void setAutoplay(java.lang.Boolean auto)
Set auto-play.- Parameters:
auto- Auto-play.
-
getDisplayPlayer
public java.lang.Boolean getDisplayPlayer()
Should a player be displayed?- Returns:
- display player.
-
setDisplayPlayer
public void setDisplayPlayer(java.lang.Boolean disp)
Set display of player.- Parameters:
disp- player display.
-
getSeekOffset
public java.lang.Double getSeekOffset()
Get the seek offset for the player (in seconds).- Returns:
- Seek offset.
-
setSeekOffset
public void setSeekOffset(java.lang.Double offset)
Set the Seek offset (in seconds).- Parameters:
offset- seek offset.
-
getLoop
public java.lang.Boolean getLoop()
Should play looped?- Returns:
- loop.
-
setLoop
public void setLoop(java.lang.Boolean loop)
Set if play should loop.- Parameters:
loop- loop play.
-
getSourceLoc
public java.util.Optional<java.lang.String> getSourceLoc()
Description copied from interface:IncludableReturn the source path or URL.- Specified by:
getSourceLocin interfaceIncludable- Returns:
- Location string.
-
-