Spec-Zone .ru
спецификации, руководства, описания, API

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

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 conditional mouse

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.

public-readnodeNode

Source of the event.

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

Profile: common conditional mouse

 
public-readprimaryButtonDownBoolean

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

public-readsceneXNumber

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

public-readsceneYNumber

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

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.

public-readshiftDownBoolean

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

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

Function Summary

public copy(node: Node, evt: MouseEvent) : MouseEvent

Creates a copy of the given mouse event, substituting the given node for the one in the original event.

Creates a copy of the given mouse event, substituting the given node for the one in the original event. This function will also adjust the location properties (x, y, screenX, screenY, etc) such that the event is in values relative to the new node.

Parameters
node
evt
Returns
MouseEvent
 
public mouseEvent(node: Node, awtMouseEvent: java.awt.event.MouseEvent, dragAnchorXY: Point2D) : MouseEvent

(DragAnchor is specified relative to the node's bounds?? Or is it scene bounds??

(DragAnchor is specified relative to the node's bounds?? Or is it scene bounds??

Parameters
node
awtMouseEvent
dragAnchorXY
Returns
MouseEvent
 
public toString() : java.lang.String
Returns
String
 

Inherited Functions