JavaFX: Bringing Rich Experiences To All the Screens Of Your Life

expand all

Profile: desktop, common

Overview

The mouse (pointer's) location is available relative to several coordinate systems: x,y - relative to the origin of the MouseEvent's node, sceneX,sceneY - relative to to the origin of the Scene that contains the node, screenX,screenY - relative to origin of the screen that contains the mouse pointer, dragX, dragY - if the MouseEvent is part of a press-drag-release gesture, then relative to the location of the press event, otherwise 0.

Profile: common

Variable Summary

accessnametypeCan ReadCan InitCan WriteDefault Valuedescription
public-readaltDownBoolean

Whether or not the Alt modifier is down on this event.

public-readbuttonMouseButton

Which, if any, of the mouse buttons has changed state.

public-readclickCountInteger

Number of mouse clicks associated with this event.

public-readcontrolDownBoolean

Whether or not the Control modifier is down on this event.

public-readdragAnchorXNumber

x position of the event that initiated the most recent press event if the MouseEvent is part of a press-drag-release gesture, otherwise the value is 0.

public-readdragAnchorYNumber

y position of the event that initiated the most recent press event only if the MouseEvent is part of a press-drag-release gesture, otherwise the value is 0.

public-readdragXNumber

x offset of the event relative to the most recent press event if the MouseEvent is part of a press-drag-release gesture, otherwise the value is 0.

public-readdragYNumber

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 the value is 0.

public-readmetaDownBoolean

Whether or not the Meta modifier is down on this event.

public-readmiddleButtonDownBoolean

true if middle button (button 2) is currently pressed.

true if middle button (button 2) is currently pressed. Note that this is different from the button variable in that the button variable indicates which button press was responsible for this event while this variable indicates whether the primary button is depressed.

Profile: common

 
public-initnodeNode

The Node on which this event has occurred.

public-readpopupTriggerBoolean

Whether or not this mouse event is the popup menu trigger event for the platform.

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, popupTrigger should be checked in both onMousePressed and mouseReleased for proper cross-platform functionality.

Profile: common

 
public-readprimaryButtonDownBoolean

true if primary button (button 1, usually the left) is currently pressed.

true if primary button (button 1, usually the left) is currently pressed. Note that this is different from the button variable in that the button variable indicates which button press was responsible for this event while this variable indicates whether the primary button is depressed.

Profile: common

 
public-readsceneXNumber

Horizontal x position of the event relative to the origin of the Scene that contains the MouseEvent's node.

Horizontal x position of the event relative to the origin of the Scene that contains the MouseEvent's node. If the node is not in a Scene, then the value is relative to the boundsInParent of the root-most parent of the MouseEvent's node.

Profile: common

 
public-readsceneYNumber

Vertical y position of the event relative to the origin of the Scene that contains the MouseEvent's node.

Vertical y position of the event relative to the origin of the Scene that contains the MouseEvent's node. If the node is not in a Scene, then the value is relative to the boundsInParent of the root-most parent of the MouseEvent's node.

Profile: common

 
public-readscreenXNumber

Absolute horizontal x position of the event.

public-readscreenYNumber

Absolute vertical y position of the event.

public-readsecondaryButtonDownBoolean

true if secondary button (button 3, usually the right) is currently pressed.

true if secondary button (button 3, usually the right) is currently pressed. Note that this is different from the button variable in that the button variable indicates which button press was responsible for this event while this variable indicates whether the primary button is depressed.

Profile: common

 
public-readshiftDownBoolean

Whether or not the Shift modifier is down on this event.

public-readsourceNode

Visually top-most Node in the node subtree under the mouse.

Visually top-most Node in the node subtree under the mouse.

In case the node is a leaf node source is the same as the node. In case node is an instance of Parent source is the visually top-most Node in the node subtree under the mouse.

 
public-readwheelRotationNumber

Number of clicks the mouse wheel was rotated.

public-readxNumber

Horizontal x position of the event relative to the origin of the MouseEvent's node.

public-readyNumber

Vertical y position of the event relative to the origin of the MouseEvent's node.

Inherited Variables

Script Function Summary

Function Summary

public toString() : java.lang.String
Returns
String
 

Inherited Functions




Spec-Zone.ru - all specs in one place