/** * Checks if the Meta key was down when the mouse event took place. * * @return true if Meta was pressed when the event occurred, false * otherwise */ public boolean isMetaKey() { return details.isMetaKey(); }
/** * Tests whether the user is using Chrome. * * @return true if the user is using Chrome, false if the user is not using * Chrome or if no information on the browser is present */ public boolean isChrome() { if (browserDetails == null) { return false; } return browserDetails.isChrome(); }
/** * Returns the mouse position (x coordinate) when the click took place. * The position is relative to the browser client area. * * @return The mouse cursor x position */ public int getClientX() { return details.getClientX(); }
/** * Returns the mouse position (y coordinate) when the click took place. * The position is relative to the browser client area. * * @return The mouse cursor y position */ public int getClientY() { return details.getClientY(); }
/** * Checks if the Ctrl key was down when the mouse event took place. * * @return true if Ctrl was pressed when the event occurred, false * otherwise */ public boolean isCtrlKey() { return details.isCtrlKey(); }
/** * Checks if the event is a double click event. * * @return true if the event is a double click event, false otherwise */ public boolean isDoubleClick() { return details.isDoubleClick(); }
/** * Returns the relative mouse position (y coordinate) when the click * took place. The position is relative to the clicked component. * * @return The mouse cursor y position relative to the clicked layout * component or -1 if no y coordinate available */ public int getRelativeY() { return details.getRelativeY(); }
/** * Returns the relative mouse position (x coordinate) when the click * took place. The position is relative to the clicked component. * * @return The mouse cursor x position relative to the clicked layout * component or -1 if no x coordinate available */ public int getRelativeX() { return details.getRelativeX(); }
/** * Tests if the browser is run on Android. * * @return true if run on Android false if the user is not using Android or * if no information on the browser is present */ public boolean isAndroid() { return browserDetails.isAndroid(); }
/** * Returns an identifier describing which mouse button the user pushed. * Compare with {@link MouseButton#LEFT},{@link MouseButton#MIDDLE}, * {@link MouseButton#RIGHT} to find out which button it is. * * @return one of {@link MouseButton#LEFT}, {@link MouseButton#MIDDLE}, * {@link MouseButton#RIGHT}. */ public MouseButton getButton() { return details.getButton(); }
/** * Tests whether the user is using Firefox. * * @return true if the user is using Firefox, false if the user is not using * Firefox or if no information on the browser is present */ public boolean isFirefox() { if (browserDetails == null) { return false; } return browserDetails.isFirefox(); }
/** * Tests if the browser is run in iOS. * * @return true if run in iOS false if the user is not using iOS or if no * information on the browser is present */ public boolean isIOS() { return browserDetails.isIOS(); }
/** * Tests if the browser is run on IPhone. * * @return true if run on IPhone false if the user is not using IPhone or if * no information on the browser is present * @since 7.3.3 */ public boolean isIPhone() { return browserDetails.isIPhone(); }
/** * Tests whether the user is using Opera. * * @return true if the user is using Opera, false if the user is not using * Opera or if no information on the browser is present */ public boolean isOpera() { if (browserDetails == null) { return false; } return browserDetails.isOpera(); }
/** * Tests whether the user is using Linux. * * @return true if the user is using Linux, false if the user is not using * Linux or if no information on the browser is present */ public boolean isLinux() { return browserDetails.isLinux(); }
/** * Tests whether the user is using Windows Phone. * * @return true if the user is using Windows Phone, false if the user is not * using Windows Phone or if no information on the browser is * present * @since 7.3.2 */ public boolean isWindowsPhone() { return browserDetails.isWindowsPhone(); }
/** * Tests if the browser is run on IPad. * * @return true if run on IPad false if the user is not using IPad or if no * information on the browser is present * @since 7.3.3 */ public boolean isIPad() { return browserDetails.isIPad(); }
/** * Returns a human readable string representing which button has been * pushed. This is meant for debug purposes only and the string returned * could change. Use {@link #getButton()} to check which button was * pressed. * * @since 6.3 * @return A string representation of which button was pushed. */ public String getButtonName() { return details.getButtonName(); }
/** * Tests whether the user's browser is Chrome Frame capable. * * @return true if the user can use Chrome Frame, false if the user can not * or if no information on the browser is present */ public boolean isChromeFrameCapable() { if (browserDetails == null) { return false; } return browserDetails.isChromeFrameCapable(); }
/** * Tests whether the user is using Windows. * * @return true if the user is using Windows, false if the user is not using * Windows or if no information on the browser is present */ public boolean isWindows() { return browserDetails.isWindows(); }