org.odlabs.wiquery.core.events
Class Event

java.lang.Object
  extended by org.odlabs.wiquery.core.events.Event
All Implemented Interfaces:
Serializable, ChainableStatement

public abstract class Event
extends Object
implements ChainableStatement, Serializable

$Id$

Executes the given JsScope statement when a given list of EventLabel happened.

Since:
0.5
Author:
Lionel Armanet
See Also:
Serialized Form

Field Summary
protected  EventLabel[] eventLabels
          The list of events triggering the JsScope.
 
Constructor Summary
Event(EventLabel... eventLabels)
          Creates a new event binding a JsScope to the given EventLabel.
 
Method Summary
abstract  JsScope callback()
          Returns an non null executable JsScope.
 String chainLabel()
           
 CharSequence[] statementArgs()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

eventLabels

protected EventLabel[] eventLabels
The list of events triggering the JsScope.

Constructor Detail

Event

public Event(EventLabel... eventLabels)
Creates a new event binding a JsScope to the given EventLabel.

Method Detail

chainLabel

public String chainLabel()
Specified by:
chainLabel in interface ChainableStatement
Returns:
the statement label (like each, css...)

statementArgs

public CharSequence[] statementArgs()
Specified by:
statementArgs in interface ChainableStatement
Returns:
the list of arguments passed to the statement.

callback

public abstract JsScope callback()
Returns an non null executable JsScope. This JsScope will be called back when the event triggers.



Copyright © 2012. All Rights Reserved.