com.guiseframework.input
Class MouseClickInput

java.lang.Object
  extended by com.globalmentor.model.AbstractHashObject
      extended by com.guiseframework.input.AbstractGestureInput
          extended by com.guiseframework.input.AbstractMouseInput
              extended by com.guiseframework.input.MouseClickInput
All Implemented Interfaces:
GestureInput, Input, MouseInput

public class MouseClickInput
extends AbstractMouseInput

An encapsulation of mouse click input.

Author:
Garret Wilson

Constructor Summary
MouseClickInput(MouseButton button, int count, Key... keys)
          Button and keys constructor.
 
Method Summary
 boolean equals(java.lang.Object object)
          Determines if this object equals another object.
 MouseButton getButton()
          The button that was clicked.
 int getCount()
           
 int hashCode()
          Returns the hash code of this object.
 java.lang.String toString()
           
 
Methods inherited from class com.guiseframework.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 com.guiseframework.input.GestureInput
getKeys, hasAltKey, hasControlKey, hasShiftKey
 

Constructor Detail

MouseClickInput

public MouseClickInput(MouseButton button,
                       int count,
                       Key... keys)
Button and keys constructor.

Parameters:
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 is null.
java.lang.IllegalArgumentException - if the given count is zero or less.
Method Detail

getButton

public MouseButton getButton()
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()
Returns the hash code of this object. This version extends the hash code of the underlying objects with the the button and count.

Overrides:
hashCode in class com.globalmentor.model.AbstractHashObject
Returns:
The hash code of this object.

equals

public boolean equals(java.lang.Object object)
Determines if this object equals another object. Besides the default checks, this version ensures that the buttons are equal.

Overrides:
equals in class com.globalmentor.model.AbstractHashObject
Parameters:
object - The object to compare with this object.
Returns:
true if the given object is considered equal to this object.

toString

public java.lang.String toString()
Overrides:
toString in class com.globalmentor.model.AbstractHashObject
Returns:
A string representation of this object.


Copyright © 2005-2010 GlobalMentor, Inc. All Rights Reserved.