fi.hut.tml.xsmiles.mlfc.timesheet
Class TimedElementImpl.Schedule

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.timesheet.TimedElementImpl.Schedule
Enclosing class:
TimedElementImpl

protected class TimedElementImpl.Schedule
extends java.lang.Object

Inner class that holds all the information for this element's start or stop scheduling


Constructor Summary
protected TimedElementImpl.Schedule()
           
 
Method Summary
 void addEvent(org.w3c.dom.events.EventTarget target, java.lang.String event, long ticks)
          Sets a new dom event the TimedElement should listen to
 long getEventTime(org.w3c.dom.events.EventTarget target, java.lang.String event)
          Returns the offset of a certain event
 long getScheduledTime()
          Get the time element's scheduled time
 boolean isIndefinite()
          Is the time attribute set indefinite
 boolean isScheduled()
          Is element scheduled to start on some fixed time, ie.
 void setIndefinite(boolean value)
          Sets the time attribute as definite or indefinite
 void setScheduledTime(long ticks)
          Set the fixed time for this schedule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimedElementImpl.Schedule

protected TimedElementImpl.Schedule()
Method Detail

addEvent

public void addEvent(org.w3c.dom.events.EventTarget target,
                     java.lang.String event,
                     long ticks)
Sets a new dom event the TimedElement should listen to

Parameters:
target - the target element to listen to
event - the event that should be listened
ticks - the offset of how long after the event is captured, the TimedElement should react

getEventTime

public long getEventTime(org.w3c.dom.events.EventTarget target,
                         java.lang.String event)
Returns the offset of a certain event

Parameters:
target - the target element of the event
event - the event
Returns:
the offset of how long after the event is captured, the TimedElement should react

setIndefinite

public void setIndefinite(boolean value)
Sets the time attribute as definite or indefinite

Parameters:
value - true to set indefinite, false

isIndefinite

public boolean isIndefinite()
Is the time attribute set indefinite

Returns:
true if attribute is indefinite

isScheduled

public boolean isScheduled()
Is element scheduled to start on some fixed time, ie. element's schedule doesn't depend only on some dom event

Returns:
true if the element is scheduled

setScheduledTime

public void setScheduledTime(long ticks)
Set the fixed time for this schedule

Parameters:
ticks - the time in ticks
Throws:
java.lang.RuntimeException - if the element is already schedule, thus preventing a double schedule

getScheduledTime

public long getScheduledTime()
Get the time element's scheduled time

Returns:
the time in ticks


X-Smiles 1.2