Package io.guise.framework.input
Class MouseClickInput
java.lang.Object
com.globalmentor.model.AbstractHashObject
io.guise.framework.input.AbstractGestureInput
io.guise.framework.input.AbstractMouseInput
io.guise.framework.input.MouseClickInput
- All Implemented Interfaces:
GestureInput
,Input
,MouseInput
An encapsulation of mouse click input.
- Author:
- Garret Wilson
-
Constructor Summary
ConstructorDescriptionMouseClickInput
(MouseButton button, int count, Key... keys) Button and keys constructor. -
Method Summary
Methods inherited from class io.guise.framework.input.AbstractGestureInput
getKeys, hasAltKey, hasControlKey, hasShiftKey
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.guise.framework.input.GestureInput
getKeys, hasAltKey, hasControlKey, hasShiftKey
-
Constructor Details
-
MouseClickInput
Button and keys constructor.- Parameters:
button
- The button that was clicked.count
- The number of clicks that were input (e.g. 1 for a single click, 2 for a double click, etc.).keys
- The keys that were pressed when this input occurred.- Throws:
NullPointerException
- if the given button and/or keys isnull
.IllegalArgumentException
- if the given count is zero or less.
-
-
Method Details
-
getButton
- Returns:
- The button that was clicked.
-
getCount
public int getCount()- Returns:
- The number of clicks that were input (e.g. 1 for a single click, 2 for a double click, etc.).
-
hashCode
public int hashCode()This version extends the hash code of the underlying objects with the the button and count.
- Overrides:
hashCode
in classcom.globalmentor.model.AbstractHashObject
-
equals
Besides the default checks, this version ensures that the buttons are equal.
- Overrides:
equals
in classcom.globalmentor.model.AbstractHashObject
-
toString
- Overrides:
toString
in classcom.globalmentor.model.AbstractHashObject
-