public class ClickEventArgs extends InputModeEventArgs
Clicked
.EMPTY
Constructor and Description |
---|
ClickEventArgs(IInputModeContext context,
PointD location,
ModifierKeys modifiers,
MouseButtons mouseButtons,
int clickCount)
Initializes a new instance of the
ClickEventArgs class. |
Modifier and Type | Method and Description |
---|---|
int |
getClickCount()
Gets the number of clicks associated with this event.
|
PointD |
getLocation()
Gets the location of the click.
|
ModifierKeys |
getModifiers()
Gets the state of the modifiers at the time of the click.
|
MouseButtons |
getMouseButtons()
Gets the
MouseButtons that have changed for this event. |
boolean |
isHandled()
Gets a value indicating whether this
ClickEventArgs have been handled. |
void |
setHandled(boolean value)
Sets a value indicating whether this
ClickEventArgs have been handled. |
getContext
public ClickEventArgs(IInputModeContext context, PointD location, ModifierKeys modifiers, MouseButtons mouseButtons, int clickCount)
ClickEventArgs
class.context
- The context in which the click occurred.location
- The location.modifiers
- State of the modifiers.mouseButtons
- The mouse button(s) that have changedpublic final int getClickCount()
This can be used to distinguish between single and multiple clicks. Note that for compatibility reasons, a negative value means that no click count has been provided at event creation time.
public final PointD getLocation()
public final ModifierKeys getModifiers()
public final MouseButtons getMouseButtons()
MouseButtons
that have changed for this event.public final boolean isHandled()
ClickEventArgs
have been handled.
Client code that is triggered by the event and does not want the event to become handled by other handles should set
this property to true
to stop propagation of the event.
true
if handled; false
otherwise.setHandled(boolean)
public final void setHandled(boolean value)
ClickEventArgs
have been handled.
Client code that is triggered by the event and does not want the event to become handled by other handles should set
this property to true
to stop propagation of the event.
value
- true
if handled; false
otherwise.isHandled()