|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectasquare.gwt.debug.client.DebugEventListener
public class DebugEventListener
A UI event monitor. Event descriptions are output via
Debug.println(String). Tracing is
enabled/disabled by pressing the enabler key twice sequentially. You can
specify which kinds of events you are interested in when you create the
monitor.
Popups and dialogs will block the listener if they are shown after it is
installed. Likewise, the listener will prevent with event filtering by popups
if initialized after the popup is shown. This is due to the design of
EventPreview.
DEFAULT_ENABLE_KEY,
DEFAULT_MASK,
EventPreview| Field Summary | |
|---|---|
static char |
DEFAULT_ENABLE_KEY
The default enabler key, which is 'e' |
static int |
DEFAULT_MASK
A mask matching all but onmousemove, onmouseover, onmouseout and onscroll |
static int |
MASK_ALL
A mask matching all events |
| Constructor Summary | |
|---|---|
DebugEventListener()
Create a new instance with the default key code and event mask. |
|
DebugEventListener(char enableKey)
Create a new instance with the specified enable key and the default event mask. |
|
DebugEventListener(char enableKey,
int eventMask,
String name)
Create a new instance with the specified enable key and event mask. |
|
DebugEventListener(int eventMask)
Create a new instance with the specified event mask and the default enable key. |
|
| Method Summary | |
|---|---|
protected void |
doDisabled()
Override to perform a custom action whenever this listener is enabled. |
protected void |
doEnabled()
Override to perform a custom action whenever this listener is disabled. |
protected void |
doEvent(Event event)
Override to perform a custom action for each event. |
void |
enable(boolean enable)
Enables/disables this listener. |
void |
eventDispatched(Event event)
Called by EventPreviewDispatcher when an event is previewed. |
char |
getEnableKey()
Get the key used to enable processing of events. |
int |
getEventMask()
Get the bitmask representing the events which this listener will process. |
void |
install()
Installs this listener so that it listens to dispatched events. |
void |
setEnabled(boolean enabled)
Sets this listener as enabled/disabled but does not perform the doEnabled()/doDisabled() action. |
void |
setEnableKey(char keyCode)
Set the key used to enable processing of events. |
void |
setEventMask(int mask)
Specifies the events which the listener will process when it is enabled. |
void |
uninstall()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MASK_ALL
public static final int DEFAULT_MASK
public static final char DEFAULT_ENABLE_KEY
'e'
| Constructor Detail |
|---|
public DebugEventListener()
public DebugEventListener(char enableKey)
enableKey - a key code, or -1 for the default ('e')public DebugEventListener(int eventMask)
eventMask - an event mask or -1 for the defaultEvent
public DebugEventListener(char enableKey,
int eventMask,
String name)
enableKey - a key code, or 0 for the default ('e')eventMask - an event mask or -1 for the defaultname - a name to identify this event listener instance in debug statementsEvent| Method Detail |
|---|
public void install()
enable(boolean).
public void uninstall()
public char getEnableKey()
public void setEnableKey(char keyCode)
keyCode - a unicode character code corresponding the keypublic int getEventMask()
Eventpublic void setEventMask(int mask)
0 to ignore all events.
Example:
setEventMask(Event.ONMOUSEDOWN | Event.ONCLICK)
mask - a bitmask of event typesEventpublic void enable(boolean enable)
doEvent(Event)
enable - public void setEnabled(boolean enabled)
doEnabled()/doDisabled() action.
enabled - public void eventDispatched(Event event)
EventPreviewDispatcher when an event is previewed.
event - protected void doEnabled()
protected void doDisabled()
protected void doEvent(Event event)
event -
|
GWT Tk 0.2.3 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||