com.sencha.gxt.widget.core.client.event
Class XEvent

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.dom.client.NativeEvent
          extended by com.google.gwt.user.client.Event
              extended by com.sencha.gxt.widget.core.client.event.XEvent

public class XEvent
extends Event


Nested Class Summary
 
Nested classes/interfaces inherited from class com.google.gwt.user.client.Event
Event.NativePreviewEvent, Event.NativePreviewHandler
 
Field Summary
 
Fields inherited from class com.google.gwt.user.client.Event
FOCUSEVENTS, GESTUREEVENTS, KEYEVENTS, MOUSEEVENTS, ONBLUR, ONCHANGE, ONCLICK, ONCONTEXTMENU, ONDBLCLICK, ONERROR, ONFOCUS, ONGESTURECHANGE, ONGESTUREEND, ONGESTURESTART, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONLOSECAPTURE, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONMOUSEWHEEL, ONPASTE, ONSCROLL, ONTOUCHCANCEL, ONTOUCHEND, ONTOUCHMOVE, ONTOUCHSTART, TOUCHEVENTS, UNDEFINED
 
Fields inherited from class com.google.gwt.dom.client.NativeEvent
BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT
 
Method Summary
 boolean getCtrlOrMetaKey()
          Returns true if the control or meta key was depressed.
 XElement getEventTargetEl()
          Returns the event target element.
 XElement getTargetEl(java.lang.String selector, int maxDepth)
          Returns the matching parent using the specified selector.
 Point getXY()
          Returns the mouse location.
 boolean isNavKeyPress()
          Returns true if the key is a "navigation" key.
 boolean isNavKeyPress(int k)
          Returns true if the key is a "navigation" key.
 boolean isRightClick()
          Returns true if the event is a right click.
 boolean isSpecialKey()
          Returns true if the key is a "special" key.
 boolean isSpecialKey(int k)
          Returns true if the key is a "special" key.
 void stopEvent()
          Stops the event (stopPropagation and preventDefault).
 boolean within(Element element)
          Returns true if the target of this event equals or is a child of the given element.
 boolean within(Element element, boolean toElement)
          Returns true if the target of this event equals or is a child of the given element.
 
Methods inherited from class com.google.gwt.user.client.Event
addEventPreview, addNativePreviewHandler, as, cancelBubble, fireNativePreviewEvent, getCurrentEvent, getCurrentTarget, getEventListener, getEventsSunk, getFromElement, getRelatedTarget, getRepeat, getTarget, getToElement, getTypeInt, getTypeInt, releaseCapture, removeEventPreview, setCapture, setEventListener, sinkEvents
 
Methods inherited from class com.google.gwt.dom.client.NativeEvent
getAltKey, getButton, getChangedTouches, getCharCode, getClientX, getClientY, getCtrlKey, getCurrentEventTarget, getDataTransfer, getEventTarget, getKeyCode, getMetaKey, getMouseWheelVelocityY, getRelatedEventTarget, getRotation, getScale, getScreenX, getScreenY, getShiftKey, getString, getTargetTouches, getTouches, getType, preventDefault, stopPropagation
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getCtrlOrMetaKey

public final boolean getCtrlOrMetaKey()
Returns true if the control or meta key was depressed.

Returns:
true if control or meta

getEventTargetEl

public final XElement getEventTargetEl()
Returns the event target element.

Returns:
the target element

getTargetEl

public final XElement getTargetEl(java.lang.String selector,
                                  int maxDepth)
Returns the matching parent using the specified selector.

Parameters:
selector - the CSS selector
maxDepth - the maximum number of parents to search
Returns:
the matching element or null

getXY

public final Point getXY()
Returns the mouse location.

Returns:
the mouse location

isNavKeyPress

public final boolean isNavKeyPress()
Returns true if the key is a "navigation" key.

Returns:
the nav state

isNavKeyPress

public final boolean isNavKeyPress(int k)
Returns true if the key is a "navigation" key.

Parameters:
k - the key code
Returns:
the nav state

isRightClick

public final boolean isRightClick()
Returns true if the event is a right click.

Returns:
the right click state

isSpecialKey

public final boolean isSpecialKey()
Returns true if the key is a "special" key.

Returns:
the special state

isSpecialKey

public final boolean isSpecialKey(int k)
Returns true if the key is a "special" key.

Parameters:
k - the key code
Returns:
the special state

stopEvent

public final void stopEvent()
Stops the event (stopPropagation and preventDefault).


within

public final boolean within(Element element)
Returns true if the target of this event equals or is a child of the given element.

Parameters:
element - the element
Returns:
the within state

within

public final boolean within(Element element,
                            boolean toElement)
Returns true if the target of this event equals or is a child of the given element.

Parameters:
element - the element
toElement - true to use NativeEvent.getRelatedEventTarget()
Returns:
the within state


Copyright © 2012. All Rights Reserved.