|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSystem.Event<T>
T
- The EventArgs instance or subclass to use with this event.public class Event<T extends EventArgs>
Base class for all events in JavaXNA.
Constructor Summary | |
---|---|
Event()
Creates a new instance of this Object. |
Method Summary | |
---|---|
void |
addHandler(EventHandler<T> handler)
Adds a handler for this event |
java.util.List<EventHandler<T>> |
getHandlers()
Gets a list of handlers that are attached to this event. |
void |
raise(java.lang.Object sender,
T e)
Raises the event. |
void |
removeHandler(EventHandler<T> handler)
Removes the specified handler for this event |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Event()
Method Detail |
---|
public java.util.List<EventHandler<T>> getHandlers()
public void addHandler(EventHandler<T> handler)
handler
- The handler to add to this event.public void removeHandler(EventHandler<T> handler)
handler
-
InvalidOperationException
- Thrown when no event handlers have previously been assigned.public void raise(java.lang.Object sender, T e)
sender
- The Object that raised the event.e
- An instance of System.EventArgs that provides information about the event.
InvalidOperationException
- Thrown when the event is raised with no event handlers assigned.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |