|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectfi.hut.tml.xsmiles.mlfc.smil.basic.TimeImpl
The Time interface is a datatype that represents times within
the timegraph. A Time has a type, key values to describe the
time, and a boolean to indicate whether the values are currently
unresolved. Still need to address the wallclock values.
| Field Summary | |
static short |
SMIL_TIME_ACCESSKEY
|
static short |
SMIL_TIME_EVENT_BASED
|
static short |
SMIL_TIME_INDEFINITE
|
static short |
SMIL_TIME_MEDIA_MARKER
|
static short |
SMIL_TIME_OFFSET
|
static short |
SMIL_TIME_REPEAT
|
static short |
SMIL_TIME_SYNC_BASED
|
static short |
SMIL_TIME_WALLCLOCK
|
| Constructor Summary | |
TimeImpl()
Contructor to define blank time, defaults to indefinite. |
|
TimeImpl(int timeInt)
Contructor to define the time. |
|
TimeImpl(long time,
long offset,
short tt,
ElementBasicTimeImpl base,
ElementBasicTimeImpl dependent,
boolean baseBegin,
boolean beginList,
boolean resolved,
boolean indefinite)
Contructor to define the time and type. |
|
TimeImpl(MyFloat timeFloat)
Contructor to define the time. |
|
TimeImpl(java.lang.String timeString)
Contructor to define the time. |
|
TimeImpl(java.lang.String timeString,
SMILDocumentImpl doc,
ElementBasicTimeImpl e,
boolean beginList)
Contructor to define the time. |
|
| Method Summary | |
boolean |
getBaseBegin()
If true , indicates that a sync-based time is relative to
the begin of the baseElement. |
org.w3c.dom.Element |
getBaseElement()
The base element for a sync-based or event-based time. |
java.lang.String |
getEvent()
The name of the event for an event-based time. |
java.lang.String |
getMarker()
The name of the marker from the media element, for media marker times. |
MyFloat |
getOffset()
The clock value in seconds relative to the syncbase or eventbase. |
boolean |
getResolved()
A boolean indicating whether the current Time has been
fully resolved to the document schedule. |
MyFloat |
getResolvedOffset()
The clock value in seconds relative to the parent time container begin. |
java.lang.String |
getString()
For debugging purposes |
short |
getTimeType()
A code representing the type of the underlying object, as defined above. |
long |
getTimeValue()
Returns the time value. |
void |
handleEvent(org.w3c.dom.events.Event evt)
EventBase event received - restart / end element This method handles the event, when it is received THIS SHOULD BE IN ELEMENT- TO SECURE CORRECT click-click BEHAVIOUR! (in case of exception & wrong event order) |
void |
intervalBeginChanged(TimeImpl begin)
|
void |
intervalCreated(TimeImpl begin,
TimeImpl end)
|
void |
intervalEndChanged(TimeImpl end)
|
boolean |
isEqualTo(Time time)
Is time equal to this. |
boolean |
isGreaterThan(Time time)
Is time greater than this. |
boolean |
isInBeginList()
Returns true if this Time is part of begin time list. |
boolean |
isIndefinite()
|
boolean |
isNegative()
Checks if the time is negative. |
void |
lock()
Lock this time - changes cannot be made after this call. |
void |
setBaseBegin(boolean baseBegin)
|
void |
setBaseElement(org.w3c.dom.Element baseElement)
|
void |
setEvent(java.lang.String event)
|
void |
setMarker(java.lang.String marker)
|
void |
setOffset(MyFloat offset)
|
void |
setTimeValue(Time t)
Forces this Time object to have the same time value offset as t. |
void |
unlock()
Unlock this time - changes can be made after this call. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final short SMIL_TIME_INDEFINITE
public static final short SMIL_TIME_OFFSET
public static final short SMIL_TIME_SYNC_BASED
public static final short SMIL_TIME_EVENT_BASED
public static final short SMIL_TIME_WALLCLOCK
public static final short SMIL_TIME_MEDIA_MARKER
public static final short SMIL_TIME_REPEAT
public static final short SMIL_TIME_ACCESSKEY
| Constructor Detail |
public TimeImpl()
public TimeImpl(MyFloat timeFloat)
timeFloat - Time float, which will be parsed.
public TimeImpl(long time,
long offset,
short tt,
ElementBasicTimeImpl base,
ElementBasicTimeImpl dependent,
boolean baseBegin,
boolean beginList,
boolean resolved,
boolean indefinite)
time - Time long, which will be parsed.tt - TimeTypebase - Base element, will have intervalchangedListenerbaseBegin - true if based on begin attributepublic TimeImpl(int timeInt)
public TimeImpl(java.lang.String timeString)
timeString - Time string, which will be parsed.
public TimeImpl(java.lang.String timeString,
SMILDocumentImpl doc,
ElementBasicTimeImpl e,
boolean beginList)
timeString - Time string, which will be parsed.doc - SMILDocumentImpl, to handle syncbase clock valuese - Element, which will receive time changes from syncbase elementbeginList - true if this Time is part of beginList, otherwise false| Method Detail |
public void lock()
public void unlock()
public void setTimeValue(Time t)
setTimeValue in interface Timet - Time Objectpublic long getTimeValue()
getTimeValue in interface Timepublic boolean isInBeginList()
isInBeginList in interface Timepublic boolean getResolved()
Time has been
fully resolved to the document schedule. Note that for this to be
true, the current Time must be defined (not indefinite),
the syncbase and all Time 's that the syncbase depends on
must be defined (not indefinite), and the begin Time of
all ascendent time containers of this element and all Time
elements that this depends upon must be defined (not indefinite).
Time is based upon an event, this
Time will only be resolved once the specified event has
happened, subject to the constraints of the time container.
getResolved in interface Timepublic MyFloat getResolvedOffset()
getResolvedOffset in interface Timepublic short getTimeType()
getTimeType in interface Timepublic MyFloat getOffset()
0 .
getOffset in interface Timeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this
readonly attribute.
public void setOffset(MyFloat offset)
throws org.w3c.dom.DOMException
setOffset in interface Timeorg.w3c.dom.DOMExceptionpublic org.w3c.dom.Element getBaseElement()
getBaseElement in interface Timeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this
readonly attribute.
public void setBaseElement(org.w3c.dom.Element baseElement)
throws org.w3c.dom.DOMException
setBaseElement in interface Timeorg.w3c.dom.DOMExceptionpublic boolean getBaseBegin()
true , indicates that a sync-based time is relative to
the begin of the baseElement. If false , indicates that a
sync-based time is relative to the active end of the baseElement.
getBaseBegin in interface Timeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this
readonly attribute.
public void setBaseBegin(boolean baseBegin)
throws org.w3c.dom.DOMException
setBaseBegin in interface Timeorg.w3c.dom.DOMExceptionpublic java.lang.String getEvent()
null .
getEvent in interface Timeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this
readonly attribute.
public void setEvent(java.lang.String event)
throws org.w3c.dom.DOMException
setEvent in interface Timeorg.w3c.dom.DOMExceptionpublic java.lang.String getMarker()
null .
getMarker in interface Timeorg.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this
readonly attribute.
public void setMarker(java.lang.String marker)
throws org.w3c.dom.DOMException
setMarker in interface Timeorg.w3c.dom.DOMExceptionpublic java.lang.String getString()
getString in interface Timepublic boolean isGreaterThan(Time time)
isGreaterThan in interface Timetime - Time value
public boolean isEqualTo(Time time)
isEqualTo in interface Timetime - Time value
public boolean isNegative()
isNegative in interface Timepublic boolean isIndefinite()
isIndefinite in interface Time
public void intervalCreated(TimeImpl begin,
TimeImpl end)
public void handleEvent(org.w3c.dom.events.Event evt)
handleEvent in interface org.w3c.dom.events.EventListenerpublic void intervalBeginChanged(TimeImpl begin)
public void intervalEndChanged(TimeImpl end)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||