public static class Image.ClickEvent
extends java.util.EventObject
Image.ClickEvent is fired when the user clicks on an Image.| Constructor and Description |
|---|
ClickEvent(Image source,
MouseEventDetails details) |
| Modifier and Type | Method and Description |
|---|---|
MouseEventDetails.MouseButton |
getButton()
Returns an identifier describing which mouse button the user pushed.
|
int |
getClientX()
Returns the mouse position (x coordinate) when the click took place.
|
int |
getClientY()
Returns the mouse position (y coordinate) when the click took place.
|
int |
getRelativeX()
Returns the relative mouse position (x coordinate) when the click
took place.
|
int |
getRelativeY()
Returns the relative mouse position (y coordinate) when the click
took place.
|
Image |
getSource() |
boolean |
isAltKey()
Checks if the Alt key was down when the mouse event took place.
|
boolean |
isCtrlKey()
Checks if the Ctrl key was down when the mouse event took place.
|
boolean |
isDoubleClick()
Checks if the event is a double click event.
|
boolean |
isMetaKey()
Checks if the Meta key was down when the mouse event took place.
|
boolean |
isShiftKey()
Checks if the Shift key was down when the mouse event took place.
|
public ClickEvent(Image source, MouseEventDetails details)
public Image getSource()
getSource in class java.util.EventObjectpublic MouseEventDetails.MouseButton getButton()
MouseEventDetails.MouseButton.LEFT,MouseEventDetails.MouseButton.MIDDLE,
MouseEventDetails.MouseButton.RIGHT to find out which button it is.public int getClientX()
public int getClientY()
public int getRelativeX()
public int getRelativeY()
public boolean isDoubleClick()
true if the event is a double click event, false otherwisepublic boolean isAltKey()
true if Alt was down when the event occurred, false otherwisepublic boolean isCtrlKey()
true if Ctrl was pressed when the event occurred, false otherwisepublic boolean isMetaKey()
true if Meta was pressed when the event occurred, false otherwisepublic boolean isShiftKey()
true if Shift was pressed when the event occurred, false otherwise