|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttwaver.event.HandlerSupport<E>
E
- 事件类型public class HandlerSupport<E extends Event>
事件处理器实现类
Constructor Summary | |
---|---|
HandlerSupport()
|
Method Summary | |
---|---|
boolean |
beforeEvent(E event)
事件发生前,返回false表示中断事件,用于操作前的检测 |
void |
onEvent(E event)
事件发生时回调 |
void |
setListener(IListener<E> listener)
设置监听器 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HandlerSupport()
Method Detail |
---|
public void setListener(IListener<E> listener)
IHandler
setListener
in interface IHandler<E extends Event>
listener
- 监听器public boolean beforeEvent(E event)
IListener
beforeEvent
in interface IListener<E extends Event>
event
- 事件
public void onEvent(E event)
IListener
onEvent
in interface IListener<E extends Event>
event
- 事件
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |