![]() ![]() That does not exist on the mouse and support for extended mouse buttons is enabled by Java See Also: Throws: IllegalArgumentException - if the buttons mask contains the mask for extra mouse buttonĪnd support for extended mouse buttons is disabled by Java IllegalArgumentException - if the buttons mask contains the mask for extra mouse button Should be used, but both those models should not be mixed. ![]() InputEvent.BUTTON2_DOWN_MASK, InputEvent.BUTTON3_DOWN_MASK instead.Įither extended _DOWN_MASK or old _MASK values However, it is recommended to use InputEvent.BUTTON1_DOWN_MASK, The following standard button masks are also accepted: Method to obtain the mask for any mouse button by its number. It is recommended to use the InputEvent.getMaskForButton(button) In the range from 1 to MouseInfo.getNumberOfButtons(). In that way, it is allowed to use the button masks corresponding to the buttons Then it is allowed to use the standard button masksĪnd masks for existing extended mouse buttons, if the mouse has more then three buttons. InputEvent.BUTTON1_DOWN_MASK, InputEvent.BUTTON2_DOWN_MASK, Then it is allowed to use only the following standard button masks: If support for extended mouse buttons is.Toolkit.areExtraMouseButtonsEnabled() value as follows: InputEvent.getMaskForButton(button) method. InputEvent.BUTTON2_DOWN_MASK, InputEvent.BUTTON3_DOWN_MASK ![]() It is allowed to use only a combination of valid values as a buttons parameter.Ī valid combination consists of InputEvent.BUTTON1_DOWN_MASK, Parameters: buttons - the Button mask a combination of one or more The mouse buttons shouldīe released using the mouseRelease(int) method. SecurityException - if createRobot permission is not granted See Also: IllegalArgumentException - if screen is not a screen GraphicsEnvironment.isHeadless() returns true. Throws: AWTException - if the platform configuration does not allow Parameters: screen - A screen GraphicsDevice indicating the coordinate If screen devices are reconfigured such that the coordinate system isĪffected, the behavior of existing Robot objects is undefined. use different coordinate systems to act as independent screens.share the same coordinate system to form a combined virtual screen.Note that depending on the platformĬonfiguration, multiple screens may either: To Robot method calls like mouseMove, getPixelColor andĬreateScreenCapture will be interpreted as being in the same coordinate Since: 1.3Ĭreates a Robot for the given screen device. Handle these error conditions gracefully. Will throw the exception if the XTEST 2.2 standard extension is not supportedĪpplications that use Robot for purposes other than self-testing should If the current platform configurationĭoes not allow input control, an AWTException will be thrown Note that some platforms require special privileges or extensions The mouse cursor instead of just generating mouse move events. For example, Robot.mouseMove will actually move Using the class to generate input events differs from postingĮvents to the AWT event queue or AWT components in that theĮvents are generated in the platform's native input The primary purpose of Robot is to facilitateĪutomated testing of Java platform implementations. Other applications where control of the mouse and keyboard This class is used to generate native system input eventsįor the purposes of test automation, self-running demos, and ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |