public class MouseEvent extends UIEvent
Modifier and Type | Field and Description |
---|---|
static int |
BUTTON_LEFT
The code for left mouse button.
|
static int |
BUTTON_MIDDLE
The code for middle mouse button.
|
static int |
BUTTON_RIGHT
The code for right mouse button.
|
static String |
TYPE_CLICK
The click event type, triggered by "onclick" event handlers.
|
static String |
TYPE_CONTEXT_MENU
The context menu event type, triggered by "oncontextmenu" event handlers.
|
static String |
TYPE_DBL_CLICK
The dblclick event type, triggered by "ondblclick" event handlers.
|
static String |
TYPE_MOUSE_DOWN
The mouse down event type, triggered by "onmousedown" event handlers.
|
static String |
TYPE_MOUSE_MOVE
The mouse move event type, triggered by "onmousemove" event handlers.
|
static String |
TYPE_MOUSE_OUT
The mouse out event type, triggered by "onmouseout" event handlers.
|
static String |
TYPE_MOUSE_OVER
The mouse over event type, triggered by "onmouseover" event handlers.
|
static String |
TYPE_MOUSE_UP
The mouse up event type, triggered by "onmouseup" event handlers.
|
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE, TYPE_BEFORE_UNLOAD, TYPE_BLUR, TYPE_CHANGE, TYPE_DOM_DOCUMENT_LOADED, TYPE_FOCUS, TYPE_KEY_DOWN, TYPE_KEY_PRESS, TYPE_KEY_UP, TYPE_LOAD, TYPE_RESET, TYPE_SUBMIT, TYPE_UNLOAD
Constructor and Description |
---|
MouseEvent()
Used to build the prototype.
|
MouseEvent(DomNode domNode,
String type,
boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Creates a new event instance.
|
Modifier and Type | Method and Description |
---|---|
void |
copyPropertiesFrom(Event event)
Copies properties from another event to this event.
|
void |
jsxFunction_initMouseEvent(String type,
boolean bubbles,
boolean cancelable,
Object view,
int detail,
int screenX,
int screenY,
int clientX,
int clientY,
boolean ctrlKey,
boolean altKey,
boolean shiftKey,
boolean metaKey,
int button,
Object relatedTarget)
Implementation of the DOM Level 2 Event method for initializing the mouse event.
|
int |
jsxGet_button()
Gets the button code.
|
int |
jsxGet_clientX()
The horizontal coordinate at which the event occurred relative to the DOM implementation's client area.
|
int |
jsxGet_clientY()
The vertical coordinate at which the event occurred relative to the DOM implementation's client area.
|
boolean |
jsxGet_metaKey()
Returns whether or not the "meta" key was pressed during the event firing.
|
int |
jsxGet_pageX()
Returns the horizontal coordinate of the event relative to whole document..
|
int |
jsxGet_pageY()
Returns the vertical coordinate of the event relative to the whole document.
|
int |
jsxGet_screenX()
The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system.
|
int |
jsxGet_screenY()
The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system.
|
int |
jsxGet_which()
Special for FF (old stuff from Netscape time).
|
jsxFunction_initUIEvent, jsxGet_detail, jsxGet_view, setDetail
isPreventDefault, isPropagationStopped, jsxFunction_initEvent, jsxFunction_preventDefault, jsxFunction_stopPropagation, jsxGet_altKey, jsxGet_bubbles, jsxGet_cancelable, jsxGet_cancelBubble, jsxGet_ctrlKey, jsxGet_currentTarget, jsxGet_eventPhase, jsxGet_keyCode, jsxGet_returnValue, jsxGet_shiftKey, jsxGet_srcElement, jsxGet_target, jsxGet_timeStamp, jsxGet_type, jsxSet_cancelBubble, jsxSet_returnValue, jsxSet_srcElement, setAltKey, setCtrlKey, setCurrentTarget, setEventPhase, setEventType, setShiftKey, toString
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getIntArg, getLog, getObjectArg, getPrototype, getScriptableFor, getStartingScope, getStringArg, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, makeScriptableFor, setDomNode, setDomNode, setHtmlElement
associateValue, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, equivalentValues, get, getAllIds, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, has, has, hasInstance, hasProperty, hasProperty, isConst, isSealed, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype
public static final String TYPE_CLICK
public static final String TYPE_DBL_CLICK
public static final String TYPE_MOUSE_OVER
public static final String TYPE_MOUSE_MOVE
public static final String TYPE_MOUSE_OUT
public static final String TYPE_MOUSE_DOWN
public static final String TYPE_MOUSE_UP
public static final String TYPE_CONTEXT_MENU
public static final int BUTTON_LEFT
public static final int BUTTON_MIDDLE
public static final int BUTTON_RIGHT
public MouseEvent()
public MouseEvent(DomNode domNode, String type, boolean shiftKey, boolean ctrlKey, boolean altKey, int button)
domNode
- The DOM node that triggered the event.type
- The event type.shiftKey
- true if SHIFT is pressedctrlKey
- true if CTRL is pressedaltKey
- true if ALT is pressedbutton
- the button code, must be BUTTON_LEFT
, BUTTON_MIDDLE
or BUTTON_RIGHT
public void copyPropertiesFrom(Event event)
copyPropertiesFrom
in class UIEvent
event
- the event to copy the properties frompublic int jsxGet_clientX()
jsxGet_screenX()
)public int jsxGet_screenX()
public int jsxGet_pageX()
jsxGet_screenX()
)public int jsxGet_clientY()
jsxGet_screenY()
)public int jsxGet_screenY()
public int jsxGet_pageY()
jsxGet_screenY()
)public int jsxGet_button()
public boolean jsxGet_metaKey()
public int jsxGet_which()
public void jsxFunction_initMouseEvent(String type, boolean bubbles, boolean cancelable, Object view, int detail, int screenX, int screenY, int clientX, int clientY, boolean ctrlKey, boolean altKey, boolean shiftKey, boolean metaKey, int button, Object relatedTarget)
type
- the event typebubbles
- can the event bubblecancelable
- can the event be canceledview
- the view to use for this eventdetail
- the detail to set for the eventscreenX
- the initial value of screenXscreenY
- the initial value of screenYclientX
- the initial value of clientXclientY
- the initial value of clientYctrlKey
- is the control key pressedaltKey
- is the alt key pressedshiftKey
- is the shift key pressedmetaKey
- is the meta key pressedbutton
- what mouse button is pressedrelatedTarget
- is there a related target for the eventCopyright © 2002-2012 Gargoyle Software Inc.. All Rights Reserved.