| java.lang.Object com.sun.perseus.model.TimeCondition com.sun.perseus.model.EventBaseCondition
All known Subclasses: com.sun.perseus.model.AccessKeyCondition, com.sun.perseus.model.RepeatCondition,
EventBaseCondition | public class EventBaseCondition extends TimeCondition implements EventListener,IDRef(Code) | | An EventBaseCondition generates a TimeInstance
everytime the associated event happens.
It is the responsibility of this class to register as an
EventListener . The TimeInstance created
by an EventBaseCondition are cleared on reset, i.e, when
the associated TimedElementSupport restarts.
version: $Id: EventBaseCondition.java,v 1.3 2006/06/29 10:47:31 ln156897 Exp $ |
Method Summary | |
public void | handleEvent(Event evt) Implementation of the EventListener interface.
When an event is received from the event base, this condition
should generate a new TimeInstance that will be added
to the associdated TimedElementSupport begin or end instance
list (depending on the isBegin setting). | public void | resolveTo(ElementNode ref) IDRef implementation. | protected String | toStringTrait() Converts this EventBaseCondition to a String trait. |
eventBase | ModelNode eventBase(Code) | | The event base, i.e., the element which generates events this
listeners listens to.
|
eventBaseId | String eventBaseId(Code) | | The id of the event base. If null, the event base is the timed
element of this condition.
|
eventType | String eventType(Code) | | The type of event this listener listens to.
|
lastEventTime | Time lastEventTime(Code) | | Keeps a reference to the last occurence of the event.
|
offset | long offset(Code) | | Offset from the event base
|
EventBaseCondition | public EventBaseCondition(TimedElementSupport timedElement, boolean isBegin, String eventBaseId, String eventType, long offset)(Code) | | Parameters: timedElement - the associated TimedElementSupport . Should not be null. Parameters: isBegin - defines whether this condition is for a begin list. Parameters: eventBaseId - the id of the element which generates events thislistener listens to. If null, this means the events are generated by the timedElement itself. Parameters: eventType - the type of event this listener listens to. Shouldnot be null. Parameters: offset - offset from the sync base. This means that time instancessynchronized on the syncBase begin or end time are offset by this amount. throws: IllegalArgumentException - if eventType is null or if the ModelNode associated with the timedElement is null. |
EventBaseCondition | protected EventBaseCondition(TimedElementSupport timedElement, boolean isBegin, String eventBaseId, ModelNode eventBase, String eventType, long offset)(Code) | | Parameters: timedElement - the associated TimedElementSupport . Should not be null. Parameters: isBegin - defines whether this condition is for a begin list. Parameters: eventBaseId - the id of the element which generates events thislistener listens to. If null, this means the events are generated by the timedElement itself. Parameters: eventBase - in case eventBaseId is null, this should be used as the source for generating events. If eventBaseId is null, thisshould not be null. Parameters: eventType - the type of event this listener listens to. Shouldnot be null. Parameters: offset - offset from the sync base. This means that time instancessynchronized on the syncBase begin or end time are offset by this amount. throws: IllegalArgumentException - if eventType is null or if eventBaseand eventBaseId are null. |
handleEvent | public void handleEvent(Event evt)(Code) | | Implementation of the EventListener interface.
When an event is received from the event base, this condition
should generate a new TimeInstance that will be added
to the associdated TimedElementSupport begin or end instance
list (depending on the isBegin setting). The condition
should also record the time of the new event as its
lastEventTime .
Note that a condition is sensitive to events according to the
SMIL Animation specification, section 3.6.4 specifying 'Event
Sensitivity' (or SMIL 2 Timing and Synchronization Module,
'Event Sensitivity').
Parameters: evt - the event that occured |
resolveTo | public void resolveTo(ElementNode ref)(Code) | | IDRef implementation.
Parameters: ref - the resolved reference (from eventBaseId). |
toStringTrait | protected String toStringTrait()(Code) | | Converts this EventBaseCondition to a String trait.
a string describing this TimeCondition |
|
|