fi.hut.tml.xsmiles.mlfc.smil.basic
Class SMILSwitchElementImpl
java.lang.Object
org.apache.xerces.dom.NodeImpl
org.apache.xerces.dom.ChildNode
org.apache.xerces.dom.ParentNode
org.apache.xerces.dom.ElementImpl
org.apache.xerces.dom.ElementNSImpl
fi.hut.tml.xsmiles.dom.XSmilesElementImpl
fi.hut.tml.xsmiles.dom.VisualElementImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.SMILElementImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeControlImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.ElementBasicTimeImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeContainerImpl
fi.hut.tml.xsmiles.mlfc.smil.basic.SMILSwitchElementImpl
- All Implemented Interfaces:
- java.lang.Cloneable, CSSStyleChangeListener, org.w3c.dom.Element, ElementTime, ElementTimeContainer, ElementTimeControl, org.w3c.dom.events.EventListener, org.w3c.dom.events.EventTarget, InitializableElement, org.w3c.dom.Node, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, SMILElement, SMILSwitchElement, StylableElement, org.w3c.dom.TypeInfo, VisualElement, XElementBasicTime, XSmilesLayoutReference
- public class SMILSwitchElementImpl
- extends ElementTimeContainerImpl
- implements SMILSwitchElement
Defines a block of content control. See the switch element definition.
This class is extended from ElementTimeContainer, and therefore can be run inside the body
element or any other time container. This will search for starting child element
in startup(), a bit like ParTimeContainer in activate(), but starts only one child. Also,
this finishes immediately the child has finished.
- See Also:
- Serialized Form
| Fields inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.ElementBasicTimeImpl |
accActiveDuration, activateTime, activeDuration, beginTime, clipBeginTime, currentIntervalBegin, currentIntervalEnd, elementForceStartTime, manualRepeat, previousIntervalBegin, previousIntervalEnd, repeatIteration, repeatTime, startupTime, state, STATE_AFTERPLAY, STATE_DESTROYED, STATE_IDLE, STATE_PLAY, STATE_PREFETCHED, STATE_UNINIT, STATE_WAIT, TIMER_ACTIVATE, TIMER_DEACTIVATE, TIMER_SIMPLEDUR, zero |
| Fields inherited from class org.apache.xerces.dom.ElementNSImpl |
localName, namespaceURI |
| Fields inherited from class org.apache.xerces.dom.ElementImpl |
attributes, name |
| Fields inherited from class org.apache.xerces.dom.ParentNode |
firstChild, fNodeListCache, ownerDocument |
| Fields inherited from class org.apache.xerces.dom.ChildNode |
nextSibling, previousSibling |
| Fields inherited from class org.apache.xerces.dom.NodeImpl |
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED |
| Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
| Fields inherited from interface org.w3c.dom.smil20.ElementTime |
FILLDEFAULT_AUTO, FILLDEFAULT_FREEZE, FILLDEFAULT_HOLD, FILLDEFAULT_INHERIT, FILLDEFAULT_REMOVE, FILLDEFAULT_TRANSITION, RESTARTDEFAULT_ALWAYS, RESTARTDEFAULT_INHERIT, RESTARTDEFAULT_NEVER, RESTARTDEFAULT_WHEN_NOT_ACTIVE, SYNCBEHAVIOR_CAN_SLIP, SYNCBEHAVIOR_DEFAULT, SYNCBEHAVIOR_INDEPENDENT, SYNCBEHAVIOR_LOCKED, SYNCBEHAVIORDEFAULT_CAN_SLIP, SYNCBEHAVIORDEFAULT_INDEPENDENT, SYNCBEHAVIORDEFAULT_INHERIT, SYNCBEHAVIORDEFAULT_LOCKED |
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeContainerImpl |
getAbstractAttr, getActiveChildrenAt, getAuthor, getCopyright, getFill, getRegion, setAbstractAttr, setAuthor, setCopyright, setFill, setRegion |
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeImpl |
getFillDefault, getRestartDefault, getSyncBehavior, getSyncBehaviorDefault, getSyncTolerance, getSyncToleranceDefault, setFillDefault, setRestartDefault, setSyncBehavior, setSyncBehaviorDefault, setSyncTolerance, setSyncToleranceDefault |
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.ElementBasicTimeImpl |
ACAdd, activate, addIntervalBeginListener, addIntervalEndListener, addNewIntervalListener, addTime, beginElement, beginElementAt, childEnded, closedown, computeSimpleDuration, deactivate, defaultBegin, destroy, display, endElement, endElementAt, freeze, getBeginList, getCurrentIntervalBegin, getCurrentIntervalEnd, getCurrentParentTime, getEndList, getState, getTimeChildren, getTimeInBodyTime, getTimeInParentTime, hasStarted, immediateIntervalEnd, init, isActive, isChildStartable, isResolved, isStartable, mediaEnded, notifyBeginListeners, notifyEndListeners, notifyNewIntervalListeners, reevaluateIntervalBegin, reevaluateIntervalEnd, remove, removeFreeze, repeat, repeatRemoveFreeze, resolveSeekTime, restartelement, restartelementparent, setCurrentIntervalBegin, setCurrentIntervalEnd, setDur, setForceStartTime, simpleDurEnded, startup, timeContainerHasEnded |
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.SMILElementImpl |
dispatch, getAlt, getClassName, getId, getLongdesc, getOwnerDoc, getSMILDoc, getTitle, setAlt, setClassName, setId, setLongdesc, setTitle |
| Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl |
addView, belongsToTree, getViews, handleEvent, insertBefore, isCurrentlyVisible, isFocusPoint, isPseudoClass, isVisibleByCSSProperties, notifyPseudoRemoved, removeAllViews, removeAttribute, removeChild, replaceChild, setAttribute, setStatus, styleChanged, updateViews |
| Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
addBinding, addUndistributedChild, clone, clonePseudoElements, cloneSubtree, debugNode, debugNode, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, getText, getText, getUndistributedChildNodes, getXblImplementations, hasBinding, hasStyle, initFinalFlattenedTree, initStyle, isInitedForReset, removeBinding, removeUndistributedChild, replaceNode, resetFinalFlattenedTree, resolveURI, searchElementWithId, searchElementWithId, setApplyBindingSheets, setAuthorSheets, setPseudoClass, setRuleNode, setStyle, updateStyle |
| Methods inherited from class org.apache.xerces.dom.ElementNSImpl |
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues |
| Methods inherited from class org.apache.xerces.dom.ElementImpl |
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData |
| Methods inherited from class org.apache.xerces.dom.ParentNode |
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren |
| Methods inherited from class org.apache.xerces.dom.ChildNode |
getNextSibling, getParentNode, getPreviousSibling |
| Methods inherited from class org.apache.xerces.dom.NodeImpl |
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, dispatchEvent, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toString |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.smil20.SMILElement |
destroy, getAlt, getClassName, getId, getLongdesc, getTitle, init, setAlt, setClassName, setId, setLongdesc, setTitle |
| Methods inherited from interface org.w3c.dom.Element |
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS |
| Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
| Methods inherited from interface org.w3c.dom.smil20.ElementTime |
getFillDefault, getRestartDefault, getSyncBehavior, getSyncBehaviorDefault, getSyncTolerance, getSyncToleranceDefault, setFillDefault, setRestartDefault, setSyncBehavior, setSyncBehaviorDefault, setSyncTolerance, setSyncToleranceDefault |
| Methods inherited from interface org.w3c.dom.smil20.XElementBasicTime |
activate, closedown, deactivate, destroy, freeze, getCurrentIntervalBegin, getTimeInBodyTime, hasStarted, isActive, setDur, startup |
RESTART_ALWAYS
public static final short RESTART_ALWAYS
- See Also:
- Constant Field Values
RESTART_NEVER
public static final short RESTART_NEVER
- See Also:
- Constant Field Values
RESTART_WHEN_NOT_ACTIVE
public static final short RESTART_WHEN_NOT_ACTIVE
- See Also:
- Constant Field Values
SMILSwitchElementImpl
public SMILSwitchElementImpl(org.apache.xerces.dom.DocumentImpl owner,
SMILDocumentImpl smil,
java.lang.String ns)
- Constructor with owner doc
initHead
public SMILLayoutElement initHead(SMILHeadElementImpl head)
- This element can be in or . This method handles the initialization
in case of . will be handled by the usual timing: startup(), activate()...
Initialize the head element and its children. Calls init() only for the first layout element.
prefetch
public void prefetch()
- PREFETCH - prefetching the media.
This will prefetch ONLY selected elements. (otherwise switch wouldn't make sense)
- Specified by:
prefetch in interface XElementBasicTime- Overrides:
prefetch in class ElementBasicTimeImpl
startChildren
public void startChildren()
- Overrides:
startChildren in class ElementBasicTimeImpl
closeChildren
public void closeChildren()
- Overrides:
closeChildren in class ElementBasicTimeImpl
getSelectedElement
public org.w3c.dom.Element getSelectedElement()
- Returns the selected element at runtime.
null if the
selected element is not yet available.
- Specified by:
getSelectedElement in interface SMILSwitchElement
- Returns:
- The selected
Element for this switch
element.
getBegin
public java.lang.String getBegin()
- The desired value (as a list of times) of the begin instant of this
node.
- Specified by:
getBegin in interface XElementBasicTime- Overrides:
getBegin in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setBegin
public void setBegin(TimeList begin)
throws org.w3c.dom.DOMException
- Specified by:
setBegin in interface XElementBasicTime- Overrides:
setBegin in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getEnd
public java.lang.String getEnd()
- The list of active ends for this node.
- Specified by:
getEnd in interface XElementBasicTime- Overrides:
getEnd in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setEnd
public void setEnd(TimeList end)
throws org.w3c.dom.DOMException
- Specified by:
setEnd in interface XElementBasicTime- Overrides:
setEnd in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getDur
public Time getDur()
- The desired simple duration value of this node in seconds.
- Specified by:
getDur in interface XElementBasicTime- Overrides:
getDur in class ElementBasicTimeImpl
- Returns:
- String (eg. 2s, media or indefinite)
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setDur
public void setDur(MyFloat dur)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
getRestart
public short getRestart()
- A code representing the value of the restart attribute, as defined
above. Default value is
RESTART_ALWAYS .
- Specified by:
getRestart in interface XElementBasicTime- Overrides:
getRestart in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setRestart
public void setRestart(short restart)
throws org.w3c.dom.DOMException
- Specified by:
setRestart in interface XElementBasicTime- Overrides:
setRestart in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getRepeatDur
public Time getRepeatDur()
- The repeatDur causes the element to play repeatedly (loop) for the
specified duration in milliseconds. Negative means "indefinite".
- Specified by:
getRepeatDur in interface XElementBasicTime- Overrides:
getRepeatDur in class ElementBasicTimeImpl
- Returns:
- Time object, which can have a value, be indefinite or null. Null means unspecified.
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setRepeatDur
public void setRepeatDur(MyFloat repeatDur)
throws org.w3c.dom.DOMException
- Specified by:
setRepeatDur in interface XElementBasicTime- Overrides:
setRepeatDur in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getRepeat
public MyFloat getRepeat()
- The repeat causes the element to play repeatedly (loop) for the
specified duration in milliseconds.
- Specified by:
getRepeat in interface XElementBasicTime- Overrides:
getRepeat in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setRepeat
public void setRepeat(MyFloat repeatDur)
throws org.w3c.dom.DOMException
- Specified by:
setRepeat in interface XElementBasicTime- Overrides:
setRepeat in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getRepeatCount
public java.lang.String getRepeatCount()
- Not available in switch.
- Specified by:
getRepeatCount in interface XElementBasicTime- Overrides:
getRepeatCount in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setRepeatCount
public void setRepeatCount(java.lang.String repeatCount)
throws org.w3c.dom.DOMException
- Specified by:
setRepeatCount in interface XElementBasicTime- Overrides:
setRepeatCount in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getMin
public Time getMin()
- The minimum play time for this element in milliseconds. Negative means "indefinite".
- Specified by:
getMin in interface XElementBasicTime- Overrides:
getMin in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setMin
public void setMin(Time min)
throws org.w3c.dom.DOMException
- Specified by:
setMin in interface XElementBasicTime- Overrides:
setMin in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
getMax
public Time getMax()
- The minimum play time for this element in milliseconds. Negative means "indefinite".
- Specified by:
getMax in interface XElementBasicTime- Overrides:
getMax in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
setMax
public void setMax(Time max)
throws org.w3c.dom.DOMException
- Specified by:
setMax in interface XElementBasicTime- Overrides:
setMax in class ElementBasicTimeImpl
- Throws:
org.w3c.dom.DOMException
X-Smiles 1.2