|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozilla.javascript.ScriptableObject
com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
com.gargoylesoftware.htmlunit.javascript.host.Event
com.gargoylesoftware.htmlunit.javascript.host.MouseEvent
public class MouseEvent
JavaScript object representing a Mouse Event. For general information on which properties and functions should be supported, see DOM Level 2 Events.
Field Summary | |
---|---|
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 java.lang.String |
TYPE_CLICK
The click event type, triggered by "onclick" event handlers. |
static java.lang.String |
TYPE_CONTEXT_MENU
The context menu event type, triggered by "oncontextmenu" event handlers. |
static java.lang.String |
TYPE_DBL_CLICK
The dblclick event type, triggered by "ondblclick" event handlers. |
static java.lang.String |
TYPE_MOUSE_DOWN
The mouse down event type, triggered by "onmousedown" event handlers. |
static java.lang.String |
TYPE_MOUSE_MOVE
The mouse move event type, triggered by "onmousemove" event handlers. |
static java.lang.String |
TYPE_MOUSE_OUT
The mouse out event type, triggered by "onmouseout" event handlers. |
static java.lang.String |
TYPE_MOUSE_OVER
The mouse over event type, triggered by "onmouseover" event handlers. |
static java.lang.String |
TYPE_MOUSE_UP
The mouse up event type, triggered by "onmouseup" event handlers. |
Fields inherited from class com.gargoylesoftware.htmlunit.javascript.host.Event |
---|
TYPE_BLUR, TYPE_CHANGE, TYPE_FOCUS, TYPE_KEY_DOWN, TYPE_LOAD, TYPE_RESET, TYPE_SUBMIT |
Fields inherited from class org.mozilla.javascript.ScriptableObject |
---|
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST |
Fields inherited from interface org.mozilla.javascript.Scriptable |
---|
NOT_FOUND |
Constructor Summary | |
---|---|
MouseEvent()
Used to build the prototype. |
|
MouseEvent(DomNode domNode,
java.lang.String type,
boolean shiftKey,
boolean ctrlKey,
boolean altKey,
int button)
Creates a new event instance. |
Method Summary | |
---|---|
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. |
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). |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.host.Event |
---|
isPropagationStopped, jsxFunction_stopPropagation, jsxGet_altKey, jsxGet_cancelBubble, jsxGet_ctrlKey, jsxGet_currentTarget, jsxGet_keyCode, jsxGet_shiftKey, jsxGet_srcElement, jsxGet_target, jsxGet_type, jsxSet_cancelBubble, jsxSet_srcElement, setCurrentTarget, setEventType, toString |
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable |
---|
get, getBooleanArg, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getHtmlElementOrDie, getHtmlElementOrNull, getIntArg, getObjectArg, getStringArg, makeScriptableFor, setDomNode, setHtmlElement |
Methods inherited from class org.mozilla.javascript.ScriptableObject |
---|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, 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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int BUTTON_LEFT
public static final int BUTTON_MIDDLE
public static final int BUTTON_RIGHT
public static final java.lang.String TYPE_CLICK
public static final java.lang.String TYPE_CONTEXT_MENU
public static final java.lang.String TYPE_DBL_CLICK
public static final java.lang.String TYPE_MOUSE_DOWN
public static final java.lang.String TYPE_MOUSE_MOVE
public static final java.lang.String TYPE_MOUSE_OUT
public static final java.lang.String TYPE_MOUSE_OVER
public static final java.lang.String TYPE_MOUSE_UP
Constructor Detail |
---|
public MouseEvent()
public MouseEvent(DomNode domNode, java.lang.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
Method Detail |
---|
public int jsxGet_button()
public int jsxGet_clientX()
jsxGet_screenX()
)public int jsxGet_clientY()
jsxGet_screenY()
)public int jsxGet_pageX()
jsxGet_screenX()
)public int jsxGet_pageY()
jsxGet_screenY()
)public int jsxGet_screenX()
public int jsxGet_screenY()
public int jsxGet_which()
|
|||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |