com.tensegrity.graphics.interaction
Class MouseInfo

java.lang.Object
  extended bycom.tensegrity.graphics.interaction.MouseInfo

public class MouseInfo
extends java.lang.Object

The MouseInfo class holds the information needed during an interaction with the mouse.

Version:
$Id: MouseInfo.java,v 1.6 2003/10/07 15:04:46 sr Exp $
Author:
MichaelKegel

Field Summary
static int LEFT_BUTTON
          constant that tells about the different mouse buttons
static int MIDDLE_BUTTON
          constant that tells about the different mouse buttons
static int NO_BUTTON
          constant that tells about the different mouse buttons
static int RIGHT_BUTTON
          constant that tells about the different mouse buttons
 
Constructor Summary
MouseInfo(long timestamp, int button)
          Constructor for MouseInfo with a coordinate given by x and y and button identifier given by button.
MouseInfo(long timestamp, int button, int clicks)
          Constructor for MouseInfo with a coordinate given by x and y, button identifier given by button and number of mouse clicks given by clicks.
MouseInfo(MouseInfo mouseInfo)
          Copy-constructor for MouseInfo.
 
Method Summary
 int getButtonType()
          Returns the type of the used mouse button.
 int getClicks()
          Returns the number of mouse clicks.
 long getTimestamp()
          Returns the timestamp that tells about the time when the mouse interaction takes place.
 java.lang.String toString()
          Returns a string-representation of this instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NO_BUTTON

public static final int NO_BUTTON
constant that tells about the different mouse buttons

See Also:
Constant Field Values

LEFT_BUTTON

public static final int LEFT_BUTTON
constant that tells about the different mouse buttons

See Also:
Constant Field Values

RIGHT_BUTTON

public static final int RIGHT_BUTTON
constant that tells about the different mouse buttons

See Also:
Constant Field Values

MIDDLE_BUTTON

public static final int MIDDLE_BUTTON
constant that tells about the different mouse buttons

See Also:
Constant Field Values
Constructor Detail

MouseInfo

public MouseInfo(long timestamp,
                 int button)
Constructor for MouseInfo with a coordinate given by x and y and button identifier given by button.

Parameters:
timestamp - the timestamp of the mouse interaction
button - the mouse button identifier

MouseInfo

public MouseInfo(long timestamp,
                 int button,
                 int clicks)
Constructor for MouseInfo with a coordinate given by x and y, button identifier given by button and number of mouse clicks given by clicks.

Parameters:
timestamp - the timestamp of the mouse interaction
button - the mouse button identifier
clicks - number of mouse clicks

MouseInfo

public MouseInfo(MouseInfo mouseInfo)
Copy-constructor for MouseInfo. Creates a new deep-copied instance that is filled with the values from the given instance.

Parameters:
mouseInfo - the MouseInfo instance to copy from.
Method Detail

getTimestamp

public long getTimestamp()
Returns the timestamp that tells about the time when the mouse interaction takes place.

Returns:
long the timestamp

getButtonType

public int getButtonType()
Returns the type of the used mouse button. The returned identifier is defined either LEFT_BUTTON, RIGHT_BUTTON, MIDDLE_BUTTON or NO_BUTTON

Returns:
int the identifier for the pressed button

getClicks

public int getClicks()
Returns the number of mouse clicks.

Returns:
int the number of mouse clicks

toString

public java.lang.String toString()
Returns a string-representation of this instance.

Returns:
a string-representation of this instance.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.