|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.event.shared.HandlerManager
public class HandlerManager
Manager responsible for adding handlers to event sources and firing those handlers on passed in events.
Constructor Summary | |
---|---|
HandlerManager(java.lang.Object source)
Creates a handler manager with the given source. |
|
HandlerManager(java.lang.Object source,
boolean fireInReverseOrder)
Creates a handler manager with the given source, specifying the order in which handlers are fired. |
Method Summary | ||
---|---|---|
|
addHandler(GwtEvent.Type<H> type,
H handler)
Adds a handle. |
|
void |
fireEvent(GwtEvent<?> event)
Fires the given event to the handlers listening to the event's type. |
|
|
getHandler(GwtEvent.Type<H> type,
int index)
Gets the handler at the given index. |
|
int |
getHandlerCount(GwtEvent.Type<?> type)
Gets the number of handlers listening to the event type. |
|
boolean |
isEventHandled(GwtEvent.Type<?> e)
Does this handler manager handle the given event type? |
|
|
removeHandler(GwtEvent.Type<H> type,
H handler)
Removes the given handler from the specified event type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HandlerManager(java.lang.Object source)
source
- the event sourcepublic HandlerManager(java.lang.Object source, boolean fireInReverseOrder)
source
- the event sourcefireInReverseOrder
- true to fire handlers in reverse orderMethod Detail |
---|
public <H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, H handler)
H
- The type of handlertype
- the event type associated with this handlerhandler
- the handler
public void fireEvent(GwtEvent<?> event)
event
- the eventpublic <H extends EventHandler> H getHandler(GwtEvent.Type<H> type, int index)
H
- the event handler typeindex
- the indextype
- the handler's event type
public int getHandlerCount(GwtEvent.Type<?> type)
type
- the event type
public boolean isEventHandled(GwtEvent.Type<?> e)
e
- the event type
public <H extends EventHandler> void removeHandler(GwtEvent.Type<H> type, H handler)
HandlerRegistration.removeHandler()
instead.
H
- handler typetype
- the event typehandler
- the handler
|
GWT 2.0.3 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |