Overview
The mouse (pointer's) location is available relative to several
coordinate systems: getX(),getY() - relative to the origin of the
MouseEvent's node, getStageX(),getStageY() - relative to to the
origin of the Stage
that contains the node,
getScreenX(),getScreenY() - relative to origin of the screen that
contains the mouse pointer, getDragX(), getDragY() - if the
MouseEvent is part of a press-drag-release gesture, then relative
to the location of the press event, otherwise 0.
Profile: common conditional mouse
Attribute Summary
name | type | description |
---|---|---|
Public | ||
node | Node |
More: [+]
Profile: common conditional mouse |
Protected |
Inherited Attributes
Function Summary
- public static createMouseEvent(node: Node, awtMouseEvent: java.awt.event.MouseEvent, dragAnchorXY: java.awt.Point) : MouseEvent
-
More: [+]
-
Parameters
- node
- awtMouseEvent
- dragAnchorXY
-
Returns
- MouseEvent
- public getButton() : Integer
-
Returns which, if any, of the mouse buttons has changed state.
More: [+]Returns which, if any, of the mouse buttons has changed state.
-
Returns
- Integer
Profile: common conditional mouse
- public getClickCount() : Integer
-
Returns the number of mouse clicks associated with this event.
More: [+]Returns the number of mouse clicks associated with this event.
-
Returns
- Integer
Profile: common conditional mouse
- public getDragX() : Number
-
Returns the x offset of the event relative to the most recent press event if the
More: [+]MouseEvent
is part of a press-drag-release gesture, otherwise returns0
.Returns the x offset of the event relative to the most recent press event if the
MouseEvent
is part of a press-drag-release gesture, otherwise returns0
.-
Returns
- Number
Profile: common conditional mouse
- public getDragY() : Number
-
Returns the y offset of the event relative to the most recent press event only if the
More: [+]MouseEvent
is part of a press-drag-release gesture, otherwise returns0
.Returns the y offset of the event relative to the most recent press event only if the
MouseEvent
is part of a press-drag-release gesture, otherwise returns0
.-
Returns
- Number
Profile: common conditional mouse
- public getScreenX() : Number
-
Returns the absolute horizontal x position of the event.
More: [+]Returns the absolute horizontal x position of the event.
-
Returns
- Number
Profile: common conditional mouse
- public getScreenY() : Number
-
Returns the absolute vertical y position of the event.
More: [+]Returns the absolute vertical y position of the event.
-
Returns
- Number
Profile: common conditional mouse
- public getStageX() : Number
-
Returns the horizontal x position of the event relative to the origin of the
More: [+]Stage
that contains the MouseEvent's node.Returns the horizontal x position of the event relative to the origin of the
Stage
that contains the MouseEvent's node.-
Returns
- Number
Profile: common conditional mouse
- public getStageY() : Number
-
Returns the vertical y position of the event relative to the origin of the
More: [+]Stage
that contains the MouseEvent's node.Returns the vertical y position of the event relative to the origin of the
Stage
that contains the MouseEvent's node.-
Returns
- Number
Profile: common conditional mouse
- public getWheelRotation() : Number
-
Returns the number of clicks the mouse wheel was rotated.
More: [+]Returns the number of clicks the mouse wheel was rotated.
-
Returns
- Number
- public getX() : Number
-
Returns the horizontal x position of the event relative to the origin of the MouseEvent's node.
More: [+]Returns the horizontal x position of the event relative to the origin of the MouseEvent's node.
-
Returns
- Number
Profile: common conditional mouse
- public getY() : Number
-
Returns the vertical y position of the event relative to the origin of the MouseEvent's node.
More: [+]Returns the vertical y position of the event relative to the origin of the MouseEvent's node.
-
Returns
- Number
Profile: common conditional mouse
- public isAltDown() : Boolean
-
Returns whether or not the Alt modifier is down on this event.
More: [+]Returns whether or not the Alt modifier is down on this event.
-
Returns
- Boolean
Profile: common conditional mouse
- public isControlDown() : Boolean
-
Returns whether or not the Control modifier is down on this event.
More: [+]Returns whether or not the Control modifier is down on this event.
-
Returns
- Boolean
Profile: common conditional mouse
- public isMetaDown() : Boolean
-
Returns whether or not the Meta modifier is down on this event.
More: [+]Returns whether or not the Meta modifier is down on this event.
-
Returns
- Boolean
Profile: common conditional mouse
- public isPopupTrigger() : Boolean
-
Returns whether or not this mouse event is the popup menu trigger event for the platform.
More: [+]Returns whether or not this mouse event is the popup menu trigger event for the platform.
Note: Popup menus are triggered differently on different systems. Therefore,
isPopupTrigger
should be checked in bothonMousePressed
andmouseReleased
for proper cross-platform functionality.-
Returns
- Boolean
Profile: common conditional mouse
- public isShiftDown() : Boolean
-
Returns whether or not the Shift modifier is down on this event.
More: [+]Returns whether or not the Shift modifier is down on this event.
-
Returns
- Boolean
Profile: common conditional mouse