* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * Copyright (c) 2011, 2020, Oracle and/or its affiliates. #New mouseevent screenx screeny how to#The following code shows how to use JavaFX MouseEvent NamedArg("eventType") EventType eventType, NamedArg("x") double x, NamedArg("y") double y, NamedArg("screenX") double screenX, NamedArg("screenY") double screenY, NamedArg("button") MouseButton button, NamedArg("clickCount") int clickCount, NamedArg("shiftDown") boolean shiftDown, NamedArg("controlDown") boolean controlDown, NamedArg("altDown") boolean altDown, NamedArg("metaDown") boolean metaDown, NamedArg("primaryButtonDown") boolean primaryButtonDown, NamedArg("middleButtonDown") boolean middleButtonDown, NamedArg("secondaryButtonDown") boolean secondaryButtonDown, NamedArg("backButtonDown") boolean backButtonDown, NamedArg("forwardButtonDown") boolean forwardButtonDown, NamedArg("synthesized") boolean synthesized, NamedArg("popupTrigger") boolean popupTrigger, NamedArg("stillSincePress") boolean stillSincePress, NamedArg("pickResult") PickResult pickResult) Can be null, in this case a 2D pick result without any further values is constructed based on the scene coordinates boolean stillSincePress - see #isStillSincePress().boolean popupTrigger - whether this event denotes a popup trigger for current platform.boolean synthesized - if this event was synthesized.boolean forwardButtonDown - true if forward button was pressed.boolean backButtonDown - true if back button was pressed.boolean secondaryButtonDown - true if secondary button was pressed.boolean middleButtonDown - true if middle button was pressed.boolean primaryButtonDown - true if primary button was pressed.boolean metaDown - true if meta modifier was pressed.boolean altDown - true if alt modifier was pressed.boolean controlDown - true if control modifier was pressed.boolean shiftDown - true if shift modifier was pressed.int clickCount - number of click counts.MouseButton button - the mouse button used.double screenY - The y coordinate relative to screen.double screenX - The x coordinate relative to screen.double y - The y with respect to the scene.double x - The x with respect to the scene.EventType eventType - The type of the event.The method MouseEvent() has the following parameter: The method MouseEvent() from MouseEvent is declared as:Ĭopy public "eventType") EventType eventType, "x") double "y") double y, "screenX") double screenX, "screenY") double "button") MouseButton button, "clickCount") int "shiftDown") boolean shiftDown, "controlDown") boolean "altDown") boolean altDown, "metaDown") boolean "primaryButtonDown") boolean "middleButtonDown") boolean "secondaryButtonDown") boolean "backButtonDown") boolean "forwardButtonDown") boolean forwardButtonDown, "synthesized") boolean "popupTrigger") boolean popupTrigger, "stillSincePress") boolean "pickResult") PickResult pickResult) The method MouseEvent() is a constructor. JavaFX MouseEvent NamedArg("eventType") EventType eventType, NamedArg("x") double x, NamedArg("y") double y, NamedArg("screenX") double screenX, NamedArg("screenY") double screenY, NamedArg("button") MouseButton button, NamedArg("clickCount") int clickCount, NamedArg("shiftDown") boolean shiftDown, NamedArg("controlDown") boolean controlDown, NamedArg("altDown") boolean altDown, NamedArg("metaDown") boolean metaDown, NamedArg("primaryButtonDown") boolean primaryButtonDown, NamedArg("middleButtonDown") boolean middleButtonDown, NamedArg("secondaryButtonDown") boolean secondaryButtonDown, NamedArg("backButtonDown") boolean backButtonDown, NamedArg("forwardButtonDown") boolean forwardButtonDown, NamedArg("synthesized") boolean synthesized, NamedArg("popupTrigger") boolean popupTrigger, NamedArg("stillSincePress") boolean stillSincePress, NamedArg("pickResult") PickResult pickResult) Constructs new MouseEvent event with null source and target. JavaFX MouseEvent MouseEvent(EventType eventType, double x, double y, double screenX, double screenY, MouseButton button, int clickCount, boolean shiftDown, boolean controlDown, boolean altDown, boolean metaDown, boolean primaryButtonDown, Previous Next
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |