|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.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
This interface defines the set of basic timing attributes that are common to all timed elements.
| Nested Class Summary |
| Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl |
XSmilesElementImpl.PseudoNodeList |
| Field Summary | |
protected long |
accActiveDuration
|
protected long |
activateTime
|
protected Time |
activeDuration
|
protected long |
beginTime
|
protected Time |
clipBeginTime
|
protected Time |
currentIntervalBegin
|
protected Time |
currentIntervalEnd
|
protected long |
elementForceStartTime
|
protected float |
manualRepeat
|
protected Time |
previousIntervalBegin
|
protected Time |
previousIntervalEnd
|
protected int |
repeatIteration
|
protected long |
repeatTime
|
protected long |
startupTime
|
protected int |
state
|
protected static int |
STATE_AFTERPLAY
|
protected static int |
STATE_DESTROYED
|
protected static int |
STATE_IDLE
|
protected static int |
STATE_PLAY
|
protected static int |
STATE_PREFETCHED
|
protected static int |
STATE_UNINIT
|
protected static int |
STATE_WAIT
|
protected static int |
TIMER_ACTIVATE
|
protected static int |
TIMER_DEACTIVATE
|
protected static int |
TIMER_SIMPLEDUR
|
protected static MyFloat |
zero
|
| 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.smil20.XElementBasicTime |
RESTART_ALWAYS, RESTART_NEVER, RESTART_WHEN_NOT_ACTIVE |
| 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 |
| Constructor Summary | |
protected |
ElementBasicTimeImpl(org.apache.xerces.dom.DocumentImpl owner,
SMILDocumentImpl smil,
java.lang.String ns,
java.lang.String name)
|
| Method Summary | |
Time |
ACAdd(Time m1,
Time m2)
Addition/Substraction for active duration computation. |
void |
activate()
ACTIVE DURATION START - playing an interval. |
void |
addIntervalBeginListener(Time time,
ElementBasicTimeImpl dependent)
Add a new begin interval changed listener. |
void |
addIntervalEndListener(Time time,
ElementBasicTimeImpl dependent)
Add a new end interval changed listener. |
void |
addNewIntervalListener(Time time,
ElementBasicTimeImpl dependent)
Add a new interval created listener. |
void |
addTime(boolean begin,
TimeImpl time)
Add a time to begin/end instance list |
boolean |
beginElement()
Causes this element to begin the local timeline. |
boolean |
beginElementAt(int offset)
Causes this element to begin the local timeline. |
void |
childEnded(long childDuration)
This is called from the child to tell that it has ended. |
void |
closeChildren()
|
void |
closedown()
This closes this element. |
protected Time |
computeSimpleDuration()
Define the simple duration. |
void |
deactivate()
ACTIVE DURATION END / END OF INTERVAL / POST ACTIVE This is called to deactivate the element - after the active duration end has been reached. |
protected java.lang.String |
defaultBegin()
Default begin value For media, par and seq this is 0s, for excl this is indefinite. |
void |
destroy()
Close down this element immediately, if the presentation is playing. |
void |
display()
Simple display for inherited 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). |
void |
freeze()
Freeze the element - can be called if the parent ends its Simple Duration Pass through the call to all children |
java.lang.String |
getBegin()
The desired value (as a list of times) of the begin instant of this node. |
TimeListImpl |
getBeginList()
Get a begin time list |
Time |
getCurrentIntervalBegin()
Get the current interval begin time. |
Time |
getCurrentIntervalEnd()
Get the current interval end time. |
int |
getCurrentParentTime()
Returns the current time in the parent time space. |
Time |
getDur()
The desired simple duration value of this node in seconds. |
java.lang.String |
getEnd()
The list of active ends for this node. |
TimeListImpl |
getEndList()
Get an end time list |
java.lang.String |
getFill()
Dummy getFill() method - this returns always null. |
Time |
getMax()
The minimum play time for this element in milliseconds. |
Time |
getMin()
The minimum play time for this element in milliseconds. |
MyFloat |
getRepeat()
The repeat causes the element to play repeatedly (loop) for the specified duration in milliseconds. |
java.lang.String |
getRepeatCount()
The repeatCount attribute causes the element to play repeatedly (loop) for the specified number of times. |
Time |
getRepeatDur()
The repeatDur causes the element to play repeatedly (loop) for the specified duration in seconds. |
short |
getRestart()
A code representing the value of the restart attribute, as defined above. |
int |
getState()
|
org.w3c.dom.NodeList |
getTimeChildren()
A NodeList that contains all timed childrens of this node. |
long |
getTimeInBodyTime(long t)
Returns time in body time space, |
Time |
getTimeInParentTime(Time t)
|
boolean |
hasStarted()
Checks if this element has ever started. |
protected void |
immediateIntervalEnd(TimeImpl endtime)
Ends current interval immediately notifying dependent elements. |
void |
init()
Initialize this element. |
boolean |
isActive()
Checks if this element is playing. |
boolean |
isChildStartable(ElementBasicTimeImpl child)
Checks if this child is startable - i.e. |
boolean |
isResolved()
Checks whether this element still has begin values in the future. |
boolean |
isStartable()
Checks if this is startable - i.e. |
void |
mediaEnded()
Callback method - called when the media has ended. |
void |
notifyBeginListeners(Time newBeginTime)
Notify all begin interval changed listeners. |
void |
notifyEndListeners(Time newEndTime)
Notify all end interval changed listeners. |
void |
notifyNewIntervalListeners()
Notify all new interval listeners about the new interval. |
void |
prefetch()
PREFETCH - prefetching the media This prefetches the element for playing. |
void |
reevaluateIntervalBegin(TimeImpl newBegin)
Re-evaluates the current interval begin time. |
void |
reevaluateIntervalEnd(TimeImpl newEnd)
Re-evaluates the current interval end time. |
void |
remove()
Remove the element - can be called if the parent ends its Simple Duration Pass through the call to all children |
boolean |
removeFreeze()
|
void |
repeat(long time)
Repeat the element - if simpleDur ended or childEnded or mediaEnded. |
void |
repeatRemoveFreeze(long timeDur)
|
void |
resolveSeekTime(ElementBasicTimeImpl child)
HACK to resolve seek times for links. |
void |
restartelement()
|
void |
restartelementparent()
|
void |
setBegin(TimeList begin)
|
void |
setCurrentIntervalBegin(Time b)
Set the current interval begin time. |
void |
setCurrentIntervalEnd(Time e)
Set the current interval end time. |
void |
setDur(java.lang.String dur)
|
void |
setEnd(TimeList end)
|
void |
setForceStartTime(long t)
Set the element activation time. |
void |
setMax(Time max)
|
void |
setMin(Time min)
|
void |
setRepeat(MyFloat repeatDur)
|
void |
setRepeatCount(java.lang.String repeatCount)
|
void |
setRepeatDur(MyFloat repeatDur)
|
void |
setRestart(short restart)
|
void |
simpleDurEnded()
This is called when simple duration for this element is ended. |
void |
startChildren()
|
void |
startup()
STARTUP - getting the first interval. |
boolean |
timeContainerHasEnded()
|
| Methods inherited from class fi.hut.tml.xsmiles.mlfc.smil.basic.ElementTimeControlImpl |
getShadowElement, getStyleAttrValue, getStyleString, pauseElement, resumeElement, seekElement |
| 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 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.ElementTimeControl |
pauseElement, resumeElement, seekElement |
| 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 |
| Field Detail |
protected static final MyFloat zero
protected Time currentIntervalBegin
protected Time currentIntervalEnd
protected Time previousIntervalBegin
protected Time previousIntervalEnd
protected int state
protected Time clipBeginTime
protected float manualRepeat
protected int repeatIteration
protected long beginTime
protected long repeatTime
protected long accActiveDuration
protected Time activeDuration
protected long startupTime
protected long activateTime
protected long elementForceStartTime
protected static final int STATE_UNINIT
protected static final int STATE_IDLE
protected static final int STATE_WAIT
protected static final int STATE_PLAY
protected static final int STATE_AFTERPLAY
protected static final int STATE_PREFETCHED
protected static final int STATE_DESTROYED
protected static final int TIMER_ACTIVATE
protected static final int TIMER_DEACTIVATE
protected static final int TIMER_SIMPLEDUR
| Constructor Detail |
protected ElementBasicTimeImpl(org.apache.xerces.dom.DocumentImpl owner,
SMILDocumentImpl smil,
java.lang.String ns,
java.lang.String name)
| Method Detail |
public void init()
init in interface SMILElementinit in class ElementTimeControlImplpublic void destroy()
destroy in interface XElementBasicTimedestroy in class ElementTimeControlImplpublic void prefetch()
prefetch in interface XElementBasicTimepublic void restartelementparent()
public void restartelement()
public void resolveSeekTime(ElementBasicTimeImpl child)
public void startup()
startup in interface XElementBasicTimepublic boolean isStartable()
public boolean isChildStartable(ElementBasicTimeImpl child)
public void startChildren()
public void closeChildren()
public void activate()
activate in interface XElementBasicTimepublic void display()
public void simpleDurEnded()
public void childEnded(long childDuration)
childDuration - Duration of the child elementpublic boolean timeContainerHasEnded()
public void mediaEnded()
public void repeatRemoveFreeze(long timeDur)
timeDur - childDur / mediaDur
public boolean removeFreeze()
public void repeat(long time)
public void remove()
public void freeze()
freeze in interface XElementBasicTimepublic void deactivate()
deactivate in interface XElementBasicTimepublic void closedown()
closedown in interface XElementBasicTimepublic void setForceStartTime(long t)
t - System timepublic long getTimeInBodyTime(long t)
getTimeInBodyTime in interface XElementBasicTimet - Time to convert, in millisecs
public Time getTimeInParentTime(Time t)
public org.w3c.dom.NodeList getTimeChildren()
Nodelist is empty. An iterator
is more appropriate here than a node list but it requires Traversal
module support.
Required method by SMIL-DOM. However, returns false answer.
public Time getCurrentIntervalBegin()
getCurrentIntervalBegin in interface XElementBasicTimepublic void setCurrentIntervalBegin(Time b)
b - New current interval begin time, in future or past, or unresolved or nullpublic Time getCurrentIntervalEnd()
public void setCurrentIntervalEnd(Time e)
public int getState()
public boolean isActive()
isActive in interface XElementBasicTimepublic boolean hasStarted()
hasStarted in interface XElementBasicTimepublic boolean isResolved()
public TimeListImpl getBeginList()
public TimeListImpl getEndList()
public void addTime(boolean begin,
TimeImpl time)
public void reevaluateIntervalBegin(TimeImpl newBegin)
If current interval is waiting to play, the element recalculates the begin and end times. If current interval is playing and a new begin instance time was added, then 1. if restart="never" then nothing will be done. 2. if restart="whenNotActive" then nothing will be done. 3. if restart="always" and the new instance time is between start and end times, then the element will restart and set a new interval
protected void immediateIntervalEnd(TimeImpl endtime)
endtime - This is the end time - sent by event or media end.
Current Interval End will be endtime-10ms, to let
possibly added event time to start.public void reevaluateIntervalEnd(TimeImpl newEnd)
newEnd - Proposed new currentIntervalEnd
public void addIntervalBeginListener(Time time,
ElementBasicTimeImpl dependent)
time - Time object, which has the syncbase clock valuedependent - The dependent element, which will be notified of changespublic void notifyBeginListeners(Time newBeginTime)
newBeginTime - The new current interval begin time in this base element.
public void addIntervalEndListener(Time time,
ElementBasicTimeImpl dependent)
time - Time object, which has the syncbase clock valuedependent - The dependent element, which will be notified of changespublic void notifyEndListeners(Time newEndTime)
newEndTime - The new current interval end time in this base element.
public void addNewIntervalListener(Time time,
ElementBasicTimeImpl dependent)
time - Time object, which has the syncbase clock valuedependent - The dependent element, which will be notified of changespublic void notifyNewIntervalListeners()
public int getCurrentParentTime()
public Time ACAdd(Time m1,
Time m2)
protected Time computeSimpleDuration()
protected java.lang.String defaultBegin()
public boolean beginElement()
throws org.w3c.dom.DOMException
beginElement in interface ElementTimeControlbeginElement in class ElementTimeControlImpltrue if the method call was successful and the
element was begun. false if the method call failed, the element
cannot be restarted.
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax
to allow beginElement calls.
public boolean beginElementAt(int offset)
throws org.w3c.dom.DOMException
beginElementAt in interface ElementTimeControlbeginElementAt in class ElementTimeControlImploffset - Time in seconds
true if the method call was successful and the
element was begun. false if the method call failed, the element
cannot be restarted.
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax
to allow beginElement calls.
public boolean endElement()
throws org.w3c.dom.DOMException
endElement in interface ElementTimeControlendElement in class ElementTimeControlImpltrue if the method call was successful and the
element was ended. false if method call failed (the
element is not active).
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax
to allow endElement calls.
public boolean endElementAt(int offset)
throws org.w3c.dom.DOMException
endElementAt in interface ElementTimeControlendElementAt in class ElementTimeControlImploffset - Time in seconds
true if the method call was successful and the
element was ended. false if method call failed (the
element is not active).
org.w3c.dom.DOMException - SYNTAX_ERR: The element was not defined with the appropriate syntax
to allow endElement calls.public java.lang.String getBegin()
getBegin in interface XElementBasicTimeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
public void setBegin(TimeList begin)
throws org.w3c.dom.DOMException
setBegin in interface XElementBasicTimeorg.w3c.dom.DOMExceptionpublic java.lang.String getEnd()
getEnd in interface XElementBasicTimeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
public void setEnd(TimeList end)
throws org.w3c.dom.DOMException
setEnd in interface XElementBasicTimeorg.w3c.dom.DOMExceptionpublic Time getDur()
getDur in interface XElementBasicTimeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
public void setDur(java.lang.String dur)
throws org.w3c.dom.DOMException
setDur in interface XElementBasicTimeorg.w3c.dom.DOMExceptionpublic short getRestart()
RESTART_ALWAYS .
getRestart in interface XElementBasicTimeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly.
public void setRestart(short restart)
throws org.w3c.dom.DOMException
setRestart in interface XElementBasicTimeo