fi.hut.tml.xsmiles.mlfc.smil.basic
Class ElementTimeControlImpl

java.lang.Object
  extended byorg.apache.xerces.dom.NodeImpl
      extended byorg.apache.xerces.dom.ChildNode
          extended byorg.apache.xerces.dom.ParentNode
              extended byorg.apache.xerces.dom.ElementImpl
                  extended byorg.apache.xerces.dom.ElementNSImpl
                      extended byfi.hut.tml.xsmiles.dom.XSmilesElementImpl
                          extended byfi.hut.tml.xsmiles.dom.VisualElementImpl
                              extended byfi.hut.tml.xsmiles.mlfc.smil.basic.SMILElementImpl
                                  extended byfi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeControlImpl
All Implemented Interfaces:
java.lang.Cloneable, CSSStyleChangeListener, org.w3c.dom.Element, 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, StylableElement, org.w3c.dom.TypeInfo, VisualElement, XSmilesLayoutReference
Direct Known Subclasses:
ElementBasicTimeImpl

public class ElementTimeControlImpl
extends SMILElementImpl
implements ElementTimeControl, StylableElement

Blank Time Controls. Also, contains the code to initialize CSS styling. This init must only be done for elements under the body element, i.e. timed elements.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
XSmilesElementImpl.PseudoNodeList
 
Field Summary
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.SMILElementImpl
smilDoc
 
Fields inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
views
 
Fields inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
DESTROYED, elementStatus, INITIALIZED, INITIALIZING, setPseudoClasses, style, UNINITIALIZED, xblpropname
 
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
 
Method Summary
 boolean beginElement()
          Causes this element to begin the local timeline (subject to sync constraints).
 boolean beginElementAt(int offset)
          Causes this element to begin the local timeline (subject to sync constraints), at the passed offset from the current time when the method is called.
 void destroy()
          Destroy shadow elements.
 boolean endElement()
          Causes this element to end the local timeline (subject to sync constraints).
 boolean endElementAt(int offset)
          Causes this element to end the local timeline (subject to sync constraints) at the specified offset from the current time when the method is called.
 ShadowElementImpl getShadowElement(java.lang.Object v)
          Get the shadow element for real VisualComponentService element.
 java.lang.String getStyleAttrValue()
          CSS: Support the style attribute for CSS
 java.lang.String getStyleString(java.lang.String prop)
          CSS: Return the CSS style value.
 void init()
          CSS: Initialize this smil element.
 void pauseElement()
          Causes this element to pause the local timeline (subject to sync constraints).
 void resumeElement()
          Causes this element to resume a paused local timeline.
 void seekElement(int seekTo)
          Seeks this element to the specified point on the local timeline (subject to sync constraints).
 
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 fi.hut.tml.xsmiles.dom.StylableElement
getRuleNode, getStyle, hasStyle, isPseudoClass, setRuleNode, setStyle
 
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 fi.hut.tml.xsmiles.dom.VisualElement
getStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController
getPseudoClass, setPseudoClass
 

Method Detail

beginElement

public boolean beginElement()
                     throws org.w3c.dom.DOMException
Causes this element to begin the local timeline (subject to sync constraints). Will start the media immediately, resolving the time. This method implements the basic timing for media. This should be overridden in time containers to provide correct handling of the children.

Specified by:
beginElement in interface ElementTimeControl
Returns:
true if the method call was successful and the element was begun. false if the method call failed. Possible reasons for failure include: The element doesn't support the beginElement method (KP: ODD!). (the begin attribute is not set to "indefinite" ) The element is already active and can't be restart when it is active. (the restart attribute is set to "whenNotActive" ) The element is active or has been active and can't be restart. (the restart attribute is set to "never" ).
Throws:
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax to allow beginElement calls.

beginElementAt

public boolean beginElementAt(int offset)
                       throws org.w3c.dom.DOMException
Causes this element to begin the local timeline (subject to sync constraints), at the passed offset from the current time when the method is called. If the offset is >= 0, the semantics are equivalent to an event-base begin with the specified offset. If the offset is < 0, the semantics are equivalent to beginElement(), but the element active duration is evaluated as though the element had begun at the passed (negative) offset from the current time when the method is called.

Specified by:
beginElementAt in interface ElementTimeControl
Parameters:
offset - The offset in seconds at which to begin the element.
Returns:
true if the method call was successful and the element was begun. false if the method call failed. Possible reasons for failure include: The element doesn't support the beginElementAt method. (the begin attribute is not set to "indefinite" ) The element is already active and can't be restart when it is active. (the restart attribute is set to "whenNotActive" ) The element is active or has been active and can't be restart. (the restart attribute is set to "never" ).
Throws:
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax to allow beginElementAt calls.

endElement

public boolean endElement()
                   throws org.w3c.dom.DOMException
Causes this element to end the local timeline (subject to sync constraints).

Specified by:
endElement in interface ElementTimeControl
Returns:
true if the method call was successful and the element was ended. false if method call failed. Possible reasons for failure include: The element doesn't support the endElement method. (the end attribute is not set to "indefinite" ) The element is not active.
Throws:
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax to allow endElement calls.

endElementAt

public boolean endElementAt(int offset)
                     throws org.w3c.dom.DOMException
Causes this element to end the local timeline (subject to sync constraints) at the specified offset from the current time when the method is called.

Specified by:
endElementAt in interface ElementTimeControl
Parameters:
offset - The offset in seconds at which to end the element. Must be >= 0.
Returns:
true if the method call was successful and the element was ended. false if method call failed. Possible reasons for failure include: The element doesn't support the endElementAt method. (the end attribute is not set to "indefinite" ) The element is not active.
Throws:
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax to allow endElementAt calls.

pauseElement

public void pauseElement()
Causes this element to pause the local timeline (subject to sync constraints).

Specified by:
pauseElement in interface ElementTimeControl

resumeElement

public void resumeElement()
Causes this element to resume a paused local timeline.

Specified by:
resumeElement in interface ElementTimeControl

seekElement

public void seekElement(int seekTo)
Seeks this element to the specified point on the local timeline (subject to sync constraints). If this is a timeline, this must seek the entire timeline (i.e. propagate to all timeChildren).

Specified by:
seekElement in interface ElementTimeControl
Parameters:
seekTo - The desired position on the local timeline in milliseconds.

init

public void init()
CSS: Initialize this smil element. This does the CSS initialization.

Specified by:
init in interface SMILElement
Overrides:
init in class VisualElementImpl

destroy

public void destroy()
Destroy shadow elements.

Specified by:
destroy in interface SMILElement
Overrides:
destroy in class XSmilesElementImpl

getShadowElement

public ShadowElementImpl getShadowElement(java.lang.Object v)
Get the shadow element for real VisualComponentService element.


getStyleAttrValue

public java.lang.String getStyleAttrValue()
CSS: Support the style attribute for CSS

Specified by:
getStyleAttrValue in interface StylableElement
Overrides:
getStyleAttrValue in class XSmilesElementImpl

getStyleString

public java.lang.String getStyleString(java.lang.String prop)
CSS: Return the CSS style value.

Parameters:
prop - Property
Returns:
Property value


X-Smiles 1.2