com.nokia.mid.ui.multipointtouch
Class MultipointTouch

java.lang.Object
  extended by com.nokia.mid.ui.multipointtouch.MultipointTouch

public class MultipointTouch
extends java.lang.Object

MultipointTouch class provides access to data and configuration related to the multiple touch points.

The API imposes the restriction that the data related to the touch points (pointers' state and X & Y coordinates), got from MultipointTouch class, is only valid when the MIDlet provides implementation for the MultipointTouchListener interface. Provides applications access to register to be notified when a multipoint touch has occurred.

Notifications are sent asynchronously.


Field Summary
static int POINTER_DRAGGED
          Constant for the pointer drag.
static int POINTER_PRESSED
          Constant for the pointer press.
static int POINTER_RELEASED
          Constant for the pointer release.
 
Method Summary
 void addMultipointTouchListener(MultipointTouchListener listener)
          addMultipointTouchListener Registers a Multipoint Touch listener.
static MultipointTouch getInstance()
          getInstance Gets a reference to the MultipointTouch instance.
static int getMaxPointers()
          getMaxPointers The method returns the maximum number of pointers, that is touch points that can be recognized by the touch HW in the device.
static int getState(int pointerId)
          getState Current state of the pointer.
static int getX(int pointerId)
          getX Current X coordinate of the pointer.
static int getY(int pointerId)
          getY Current Y coordinate of the pointer.
 void removeMultipointTouchListener(MultipointTouchListener listener)
          removeMultipointTouchListener Removes a Multipoint Touch listener.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POINTER_PRESSED

public static final int POINTER_PRESSED

Constant for the pointer press.

POINTER_PRESSED has the value 0x1.

See Also:
Constant Field Values

POINTER_RELEASED

public static final int POINTER_RELEASED

Constant for the pointer release.

POINTER_RELEASED has the value 0x2.

See Also:
Constant Field Values

POINTER_DRAGGED

public static final int POINTER_DRAGGED

Constant for the pointer drag.

POINTER_DRAGGED has the value 0x3.

See Also:
Constant Field Values
Method Detail

addMultipointTouchListener

public void addMultipointTouchListener(MultipointTouchListener listener)
addMultipointTouchListener Registers a Multipoint Touch listener. Applications that need information about multipoint touch events need to register with MultipointTouch to get notifications of the events. If the listener has already been registered or null is passed, this method does nothing. Parameters: listener - the Multipoint Touch Listener to be registered


getInstance

public static MultipointTouch getInstance()
getInstance Gets a reference to the MultipointTouch instance. Returns: MultipointTouch instance.


removeMultipointTouchListener

public void removeMultipointTouchListener(MultipointTouchListener listener)
removeMultipointTouchListener Removes a Multipoint Touch listener. If the listener has not already been registered or the listener is null, this method does nothing. Parameters: listener - the Multipoint Touch listener to be unregistered


getMaxPointers

public static int getMaxPointers()
getMaxPointers The method returns the maximum number of pointers, that is touch points that can be recognized by the touch HW in the device. Returns: Maximum amount of simultaneous pointers.


getState

public static int getState(int pointerId)
getState Current state of the pointer. Parameters: pointerId - Pointer identifier. Pointer state can be one of: POINTER_PRESSED POINTER_RELEASED POINTER_DRAGGED Returns: Current state of the requested pointer, identified by pointerId.


getX

public static int getX(int pointerId)
getX Current X coordinate of the pointer. Parameters: pointerId - Pointer identifier. Returns: Current X coordinate of the requested pointer, identified by pointerId.


getY

public static int getY(int pointerId)
getY Current Y coordinate of the pointer. Parameters: pointerId - Pointer identifier. Returns: Current Y coordinate of the requested pointer, identified by pointerId.



Copyright © 2012 Nokia Corporation. All rights reserved.

Nokia is registered trademark of Nokia Corporation. Java and all Java-based marks are trademarks or registered trademarks of Oracle Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners. This document is confidential information of Nokia Corporation.

Disclaimer
The information in this document is provided "as is," with no warranties whatsoever, including any warranty of merchantability, fitness for any particular purpose, or any warranty otherwise arising out of any proposal, specification, or sample. Furthermore, information provided in this document is preliminary, and may be changed substantially prior to final release.

Nokia Corporation disclaims all liability, including liability for infringement of any proprietary rights, relating to this document and implementation of any information presented in this document.

Nokia Corporation retains the right to make changes to this document at any time, without notice.

License
Subject to above disclaimer, a license is hereby granted to use this documentation solely under existing Limited License Agreement and non-disclosure agreement between the companies for the agreed application development for Series 40 Nokia phones. No other licenses e.g. to any intellectual property rights are granted herein. Any use of the screen shots of this documentation, including any icons thereof, is subject to Nokia's prior written approval.