jq
Class Event

java.lang.Object
  extended by jq.Event

public class Event
extends java.lang.Object

A DOM event.


Method Summary
static Map filterMetaData(Map data)
          Returns only the properties that are meta data, such as ctrlKey, altKey, ctrlKey and which.
static void fire(DOMElement el, String evtnm)
          Fires a DOM element.
 Map keyData()
          Retrieve the mouse information of a DOM event.
 Map metaData()
          Retrieve the meta-information of a DOM event.
 Map mouseData()
          Retrieve the mouse information of a DOM event.
 void stop()
          Stops the event propagation.
static void stop(Event evt)
          Stops the event propagation of the specified event.
static Event zk(Event evt, Widget wgt)
          Converts a DOM event (Event) to a ZK event (Event).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

stop

public void stop()
Stops the event propagation.


mouseData

public Map mouseData()
Retrieve the mouse information of a DOM event. The properties of the returned object include pageX, pageY and the meta information

Returns:
Map a map of data.
See Also:
Event.data

keyData

public Map keyData()
Retrieve the mouse information of a DOM event. The properties of the returned object include pageX, pageY and the meta information (metaData()).

Returns:
Map a map of data.
See Also:
Event.data

metaData

public Map metaData()
Retrieve the meta-information of a DOM event. The properties of the returned object include altKey, shiftKey, ctrlKey, leftClick, rightClick and which.

Returns:
Map a map of data.
See Also:
Event.data

stop

public static void stop(Event evt)
Stops the event propagation of the specified event. It is usually used as the event listener, such as
jq(el).mousemove(jq.Event.stop)

Parameters:
evt - the event.

filterMetaData

public static Map filterMetaData(Map data)
Returns only the properties that are meta data, such as ctrlKey, altKey, ctrlKey and which.

For example, the following returns {ctrlKey:true}.

jq.event.filterMetaData({some:1,ctrlKey:true});

Parameters:
data - a map of data. It is usually the value returned by mouseData() or metaData().
Returns:
Map a map of data after filtered

zk

public static Event zk(Event evt,
                       Widget wgt)
Converts a DOM event (Event) to a ZK event (Event).

Parameters:
evt - the DOM event
wgt - the target widget. It is used if the widget can be resolved from the event (zk.Widget.$(evt))
Returns:
zk.Event the ZK event

fire

public static void fire(DOMElement el,
                        String evtnm)
Fires a DOM element.

Parameters:
el - the target element
evtnm - the name of the event


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo