Package io.jmix.ui.component
Class Image.ClickEvent
java.lang.Object
java.util.EventObject
io.jmix.ui.component.Image.ClickEvent
- All Implemented Interfaces:
Serializable
A
Image.ClickEvent is fired when the user clicks on an Image.- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns an identifier describing which mouse button the user pushed.intReturns the mouse position (x coordinate) when the click took place.intReturns the mouse position (y coordinate) when the click took place.intReturns the relative mouse position (x coordinate) when the click took place.intReturns the relative mouse position (y coordinate) when the click took place.booleanisAltKey()Checks if the Alt key was down when the mouse event took place.booleanChecks if the Ctrl key was down when the mouse event took place.booleanChecks if the event is a double click event.booleanChecks if the Meta key was down when the mouse event took place.booleanChecks if the Shift key was down when the mouse event took place.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
ClickEvent
-
-
Method Details
-
getSource
- Overrides:
getSourcein classEventObject
-
getButton
Returns an identifier describing which mouse button the user pushed. Compare withMouseEventDetails.MouseButton.LEFT,MouseEventDetails.MouseButton.MIDDLE,MouseEventDetails.MouseButton.RIGHTto find out which button it is. -
getClientX
public int getClientX()Returns the mouse position (x coordinate) when the click took place. The position is relative to the browser client area.- Returns:
- The mouse cursor x position
-
getClientY
public int getClientY()Returns the mouse position (y coordinate) when the click took place. The position is relative to the browser client area.- Returns:
- The mouse cursor y position
-
getRelativeX
public int getRelativeX()Returns the relative mouse position (x coordinate) when the click took place. The position is relative to the clicked component.- Returns:
- The mouse cursor x position relative to the clicked layout component or -1 if no x coordinate available
-
getRelativeY
public int getRelativeY()Returns the relative mouse position (y coordinate) when the click took place. The position is relative to the clicked component.- Returns:
- The mouse cursor y position relative to the clicked layout component or -1 if no y coordinate available
-
isDoubleClick
public boolean isDoubleClick()Checks if the event is a double click event.- Returns:
trueif the event is a double click event,falseotherwise
-
isAltKey
public boolean isAltKey()Checks if the Alt key was down when the mouse event took place.- Returns:
trueif Alt was down when the event occurred,falseotherwise
-
isCtrlKey
public boolean isCtrlKey()Checks if the Ctrl key was down when the mouse event took place.- Returns:
trueif Ctrl was pressed when the event occurred,falseotherwise
-
isMetaKey
public boolean isMetaKey()Checks if the Meta key was down when the mouse event took place.- Returns:
trueif Meta was pressed when the event occurred,falseotherwise
-
isShiftKey
public boolean isShiftKey()Checks if the Shift key was down when the mouse event took place.- Returns:
trueif Shift was pressed when the event occurred,falseotherwise
-