public class EventsWatcher
extends java.lang.Object
implements ej.microui.util.EventHandler
Constructor and Description |
---|
EventsWatcher(ej.microui.event.EventGenerator eventGenerator)
Creates an events watcher.
|
Modifier and Type | Method and Description |
---|---|
void |
add(ej.microui.util.EventHandler eventHandler,
boolean watch)
Add an event handler.
|
boolean |
handleEvent(int event) |
void |
remove(ej.microui.util.EventHandler eventHandler,
boolean watch)
Removes an event handler.
|
public EventsWatcher(ej.microui.event.EventGenerator eventGenerator)
eventGenerator
- the eventGenerator to manage.public void add(ej.microui.util.EventHandler eventHandler, boolean watch) throws java.lang.SecurityException, java.lang.NullPointerException
eventHandler
- the event handler to add.watch
- true
if the given event handler watches the events, false
if it captures the
events.java.lang.NullPointerException
- if eventHandler is null
.java.lang.SecurityException
- if the EventsWatcher
can not be set as the EventHandler of the event generator.public void remove(ej.microui.util.EventHandler eventHandler, boolean watch)
eventHandler
- the event handler to remove.watch
- true
if the given event handler watches the events, false
if it captures the
events.public boolean handleEvent(int event)
handleEvent
in interface ej.microui.util.EventHandler