fi.hut.tml.xsmiles.mlfc.xbl2
Class XBLHandler

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.xbl2.XBLHandler

public class XBLHandler
extends java.lang.Object

This class is used for message passing between handler elements in xbl trees and ScriptHandler.

Author:
Juho Rutila, Juho Vuohelainen, Mikko Vestola

Constructor Summary
XBLHandler()
           
 
Method Summary
 boolean filter(org.w3c.dom.events.Event e)
          This method filters the given event.
 XSmilesElementImpl getElement()
           
 java.lang.String getEvent()
           
 org.w3c.dom.events.EventListener getEventListener()
           
 HandlerElementImpl getHandlerElement()
           
 java.lang.String getScript()
           
 void removeEventListener()
          Removes the event listener that was set for the element with the method setEventListener().
 void setElement(XSmilesElementImpl e)
           
 void setEvent(java.lang.String e)
           
 void setEventListener(org.w3c.dom.events.EventListener listener)
          Sets an EventListener for listening events on this.element.
 void setHandlerElementImpl(HandlerElementImpl h)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XBLHandler

public XBLHandler()
Method Detail

setHandlerElementImpl

public void setHandlerElementImpl(HandlerElementImpl h)

getScript

public java.lang.String getScript()

setEvent

public void setEvent(java.lang.String e)

getEvent

public java.lang.String getEvent()

setElement

public void setElement(XSmilesElementImpl e)

getElement

public XSmilesElementImpl getElement()

getEventListener

public org.w3c.dom.events.EventListener getEventListener()

getHandlerElement

public HandlerElementImpl getHandlerElement()

setEventListener

public void setEventListener(org.w3c.dom.events.EventListener listener)
Sets an EventListener for listening events on this.element. This is to be called by ScriptHandler but is included in XBLHandler in order to keep all information about scripts in one place.

Parameters:
listener - EventListener to listen to events in this.element

removeEventListener

public void removeEventListener()
Removes the event listener that was set for the element with the method setEventListener().

See Also:
setEventListener(EventListener)

filter

public boolean filter(org.w3c.dom.events.Event e)
This method filters the given event. It checks various parameters of the event (like click-count, button etc.) and based on that, it returns boolean value representing that should the script of this XBLHandler be executed (so was the event that kind of event that should fire the script of this XBLHandler).

Parameters:
e - Event that this XBLHandler listens for.
Returns:
True, if the script should be executed. False, if the script must not be executed.


X-Smiles 1.2