public class EventHandler
extends java.lang.Object
implements java.lang.Comparable, java.io.Serializable
| Constructor and Description |
|---|
EventHandler(Event event,
java.lang.String className)
Creates an event handler with the given event type and implementing class
name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object o)
Compare the sequence number of two event handlers.
|
PageEditorListener |
getClassInstance()
Returns an instance of the event listener that is configured to handle
this event.
|
java.lang.String |
getClassName()
Returns the class name of this event handler's implementation.
|
Event |
getEvent()
Returns the event with which this event hander is associated.
|
int |
getSequence()
Returns the sequence number of this event handler.
|
void |
setSequence(int sequence)
Set the sequence number of this event handler.
|
public EventHandler(Event event, java.lang.String className)
event - Event for which to invoke this handler.className - name of the class that implements the event handler.java.lang.NullPointerException - If either event or
className is null.public Event getEvent()
Event object with which this handler is associated.public java.lang.String getClassName()
public int getSequence()
public void setSequence(int sequence)
sequence - sequence number of this event handlerpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparableo - another EventHandler objectjava.lang.ClassCastException - if o is not a EventHandlerpublic PageEditorListener getClassInstance() throws java.lang.Exception
PageEditorListner that is
registered to handle this event.java.lang.Exception - If the class name given by className
specified while creating this event handler cannot be located,
initialised or instantiated. Exception is also thrown if the
class does not implement PageEditorListener
interface.