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
public class MouseClickInput extends AbstractMouseInput
An encapsulation of mouse click input.- Author:
- Garret Wilson
-
-
Constructor Summary
Constructors Constructor Description MouseClickInput(MouseButton button, int count, Key... keys)
Button and keys constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object object)
MouseButton
getButton()
int
getCount()
int
hashCode()
java.lang.String
toString()
-
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 Detail
-
MouseClickInput
public MouseClickInput(MouseButton button, int count, Key... keys)
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:
java.lang.NullPointerException
- if the given button and/or keys isnull
.java.lang.IllegalArgumentException
- if the given count is zero or less.
-
-
Method Detail
-
getButton
public MouseButton 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
public boolean equals(java.lang.Object object)
Besides the default checks, this version ensures that the buttons are equal.
- Overrides:
equals
in classcom.globalmentor.model.AbstractHashObject
-
toString
public java.lang.String toString()
- Overrides:
toString
in classcom.globalmentor.model.AbstractHashObject
-
-