org.diamondspin
Class DSTouchEvent

java.lang.Object
  extended by java.util.EventObject
      extended by java.awt.AWTEvent
          extended by java.awt.event.ComponentEvent
              extended by java.awt.event.InputEvent
                  extended by java.awt.event.MouseEvent
                      extended by org.diamondspin.DSTouchEvent
All Implemented Interfaces:
Serializable

public class DSTouchEvent
extends MouseEvent

This object is an rich event to repace mouse events.

Copyright 2004 Mitsubishi Electric Research Laboratories. All Rights Reserved.

Permission to use, copy, modify and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and the following three paragraphs appear in all copies.

To request Permission to incorporate this software into commercial products contact MERL - Mitsubishi Electric Research Laboratories, 201 Broadway, Cambridge, MA 02139.

IN NO EVENT SHALL MERL BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF MERL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

MERL SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HERE UNDER IS ON AN "AS IS" BASIS, AND MERL HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

Creation date : 17 october 2001

To do:
-1- speed, acceleration, other finger, last touch time, drag time, bouding box, signal strenht

Known bugs :
Bounding box has no interpolation
Last modif date : Febuary 21, 2003 (fred)

Version:
: 1.1
Author:
: Fred Vernier
See Also:
Serialized Form

Field Summary
protected  Rectangle2D BoundingBox
           
protected  float fingerAngle
           
protected  Point ReferencePoint
           
protected  int touchID
           
protected  int TouchPointCount
           
protected  float touchStrength
           
 
Fields inherited from class java.awt.event.MouseEvent
BUTTON1, BUTTON2, BUTTON3, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_FIRST, MOUSE_LAST, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, MOUSE_WHEEL, NOBUTTON
 
Fields inherited from class java.awt.event.InputEvent
ALT_DOWN_MASK, ALT_GRAPH_DOWN_MASK, ALT_GRAPH_MASK, ALT_MASK, BUTTON1_DOWN_MASK, BUTTON1_MASK, BUTTON2_DOWN_MASK, BUTTON2_MASK, BUTTON3_DOWN_MASK, BUTTON3_MASK, CTRL_DOWN_MASK, CTRL_MASK, META_DOWN_MASK, META_MASK, SHIFT_DOWN_MASK, SHIFT_MASK
 
Fields inherited from class java.awt.event.ComponentEvent
COMPONENT_FIRST, COMPONENT_HIDDEN, COMPONENT_LAST, COMPONENT_MOVED, COMPONENT_RESIZED, COMPONENT_SHOWN
 
Fields inherited from class java.awt.AWTEvent
ACTION_EVENT_MASK, ADJUSTMENT_EVENT_MASK, COMPONENT_EVENT_MASK, consumed, CONTAINER_EVENT_MASK, FOCUS_EVENT_MASK, HIERARCHY_BOUNDS_EVENT_MASK, HIERARCHY_EVENT_MASK, id, INPUT_METHOD_EVENT_MASK, INVOCATION_EVENT_MASK, ITEM_EVENT_MASK, KEY_EVENT_MASK, MOUSE_EVENT_MASK, MOUSE_MOTION_EVENT_MASK, MOUSE_WHEEL_EVENT_MASK, PAINT_EVENT_MASK, RESERVED_ID_MAX, TEXT_EVENT_MASK, WINDOW_EVENT_MASK, WINDOW_FOCUS_EVENT_MASK, WINDOW_STATE_EVENT_MASK
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
DSTouchEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger)
          Constructor for the TouchEvent object
DSTouchEvent(Component source, int id, long when, int modifiers, int x, int y, int clickCount, boolean popupTrigger, int button)
          Constructor for the TouchEvent object
 
Method Summary
 Rectangle2D getBoundingBox()
          return the bouding box of the touched areas
 float getFingerAngle()
          Gets the angle attribute of the TouchEvent object
 int getFingerID()
          Gets the userId attribute of the TouchEvent object.
 Point getReferencePoint()
          return how many point touch the surface (i.e the number of fingers touching the table)
 int getTouchID()
          Gets the userId attribute of the TouchEvent object.
 int getTouchPointCount()
          return how many point touch the surface (i.e the number of fingers touching the table)
 float getTouchStrength()
          Gets the angle attribute of the TouchEvent object
 int getUserID()
          Gets the userId attribute of the TouchEvent object.
 void setBoundingBox(Rectangle2D Recttangle)
          Sets the boundingBox attribute of the TouchEvent object
 void setEventID(int newID)
          Changes the event type ID of this event.
 void setFingerAngle(float tangle)
          Sets the angle attribute of the TouchEvent object
 void setReferencePoint(Point Point_Arg)
          Sets the referencePoint attribute of the TouchEvent object
 void setTouchID(int TouchId)
          Sets the touch Id attribute of the TouchEvent object.
 void setTouchPointCount(int TouchPointCount_Arg)
          Sets the touchPointCount attribute of the TouchEvent object
 void setTouchStrength(float strength)
          Sets the force attribute of the TouchEvent object
 String toString()
          Description of the Method
 
Methods inherited from class java.awt.event.MouseEvent
getButton, getClickCount, getLocationOnScreen, getMouseModifiersText, getPoint, getX, getXOnScreen, getY, getYOnScreen, isPopupTrigger, paramString, translatePoint
 
Methods inherited from class java.awt.event.InputEvent
consume, getModifiers, getModifiersEx, getModifiersExText, getWhen, isAltDown, isAltGraphDown, isConsumed, isControlDown, isMetaDown, isShiftDown
 
Methods inherited from class java.awt.event.ComponentEvent
getComponent
 
Methods inherited from class java.awt.AWTEvent
getID, setSource
 
Methods inherited from class java.util.EventObject
getSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

touchID

protected int touchID

BoundingBox

protected Rectangle2D BoundingBox

ReferencePoint

protected Point ReferencePoint

TouchPointCount

protected int TouchPointCount

fingerAngle

protected float fingerAngle

touchStrength

protected float touchStrength
Constructor Detail

DSTouchEvent

public DSTouchEvent(Component source,
                    int id,
                    long when,
                    int modifiers,
                    int x,
                    int y,
                    int clickCount,
                    boolean popupTrigger)
Constructor for the TouchEvent object

Parameters:
source - Description of the Parameter
id - Description of the Parameter
when - Description of the Parameter
modifiers - Description of the Parameter
x - Description of the Parameter
y - Description of the Parameter
clickCount - Description of the Parameter
popupTrigger - Description of the Parameter

DSTouchEvent

public DSTouchEvent(Component source,
                    int id,
                    long when,
                    int modifiers,
                    int x,
                    int y,
                    int clickCount,
                    boolean popupTrigger,
                    int button)
Constructor for the TouchEvent object

Parameters:
source - Description of the Parameter
id - Description of the Parameter
when - Description of the Parameter
modifiers - Description of the Parameter
x - Description of the Parameter
y - Description of the Parameter
clickCount - Description of the Parameter
popupTrigger - Description of the Parameter
button - Description of the Parameter
Method Detail

setTouchID

public void setTouchID(int TouchId)
Sets the touch Id attribute of the TouchEvent object. This id has the user id and the finger id mixed

Parameters:
TouchId - The new userId value

getTouchID

public int getTouchID()
Gets the userId attribute of the TouchEvent object. This id has the user id and the finger id mixed

Returns:
The userId value

getUserID

public int getUserID()
Gets the userId attribute of the TouchEvent object. This id has the user id and the finger id mixed

Returns:
The userId value

getFingerID

public int getFingerID()
Gets the userId attribute of the TouchEvent object. This id has the user id and the finger id mixed

Returns:
The userId value

setTouchStrength

public void setTouchStrength(float strength)
Sets the force attribute of the TouchEvent object

Parameters:
strength - The new strenght value of the event

getTouchStrength

public float getTouchStrength()
Gets the angle attribute of the TouchEvent object

Returns:
The strength value of the event

setFingerAngle

public void setFingerAngle(float tangle)
Sets the angle attribute of the TouchEvent object

Parameters:
tangle - The new table angle value of the event

getFingerAngle

public float getFingerAngle()
Gets the angle attribute of the TouchEvent object

Returns:
The userId value

setReferencePoint

public void setReferencePoint(Point Point_Arg)
Sets the referencePoint attribute of the TouchEvent object

Parameters:
Point_Arg - The new referencePoint value

getReferencePoint

public Point getReferencePoint()
return how many point touch the surface (i.e the number of fingers touching the table)

Returns:
The referencePoint value

setBoundingBox

public void setBoundingBox(Rectangle2D Recttangle)
Sets the boundingBox attribute of the TouchEvent object

Parameters:
Recttangle - The new boundingBox value

getBoundingBox

public Rectangle2D getBoundingBox()
return the bouding box of the touched areas

Returns:
The boundingBox value

setTouchPointCount

public void setTouchPointCount(int TouchPointCount_Arg)
Sets the touchPointCount attribute of the TouchEvent object

Parameters:
TouchPointCount_Arg - The new touchPointCount value

getTouchPointCount

public int getTouchPointCount()
return how many point touch the surface (i.e the number of fingers touching the table)

Returns:
The touchPointCount value

setEventID

public void setEventID(int newID)
Changes the event type ID of this event. Can be done only from a sub-class because the id field is protected (this added for convenience by DWigdor).

Parameters:
newID - The new eventID value

toString

public String toString()
Description of the Method

Overrides:
toString in class AWTEvent
Returns:
Description of the Return Value


Copyright © 2006 Frederic Vernier(LIMSI) Chia Shen(MERL) Guillaume Besacier(LIMSI). All Rights Reserved.