|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.nokia.mid.ui.gestures.GestureRegistrationManager
The GestureRegistrationManager class provides the ability to register a GestureListener to be notified when a gesture event occurs within a container. The application must specify the container; a listener instance and the gestures that it wants to be notified about.
The API does not place any restriction on the order that setListener and register are called.
SeeGestureInteractiveZone
for further details on defining receivable
gestures.
Field Summary | |
static int |
MAX_SUPPORTED_GESTURE_INTERACTIVE_ZONES
Constant for the maximum number of supported gesture interactive zones per container. |
Method Summary | |
static GestureInteractiveZone |
getInteractiveZone(java.lang.Object container)
Get the container bound GestureInteractiveZone instance. |
static boolean |
register(java.lang.Object container,
GestureInteractiveZone gestureInteractiveZone)
Register a gesture interactive zone to a container. |
static void |
setListener(java.lang.Object container,
GestureListener listener)
Add a listener to the a container. |
static void |
unregister(java.lang.Object container,
GestureInteractiveZone gestureInteractiveZone)
Unregister a gesture interactive zone from a container. |
static void |
unregisterAll(java.lang.Object container)
Unregisters all current gesture interactive zones from a container. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_SUPPORTED_GESTURE_INTERACTIVE_ZONES
Constant for the maximum number of supported gesture interactive zones per container.
Method Detail |
public static void setListener(java.lang.Object container, GestureListener listener)
Add a listener to the a container. A container can be either a Canvas or a CustomItem. Each container can only have one listener associated with it.
container
- The container upon which gesture events have occurred.listener
- The listener that is to receive gesture events.
java.lang.IllegalArgumentException
- if container is null.
java.lang.IllegalArgumentException
- if gesture recognition is unsupported
on container.public static boolean register(java.lang.Object container, GestureInteractiveZone gestureInteractiveZone)
Register a gesture interactive zone to a container. If the gesture has already been registered the API will silently ignore the new attempt to register the gesture.
container
- The container against which the gesture is to be registered.gestureInteractiveZone
- The data defining the gestures to receive and the zone affected.
java.lang.IllegalArgumentException
- if container or gestureInteractiveZone is null.
java.lang.IllegalArgumentException
- if gesture recognition is unsupported on container.public static void unregister(java.lang.Object container, GestureInteractiveZone gestureInteractiveZone)
Unregister a gesture interactive zone from a container. If the gesture has not previously been registered the API will silently ignore the request to unregister it.
container
- The container against which the gesture is to be unregistered.gestureInteractiveZone
- The data defining the gestures to receive and the zone affected.
java.lang.IllegalArgumentException
- if container or gestureInteractiveZone is null.
java.lang.IllegalArgumentException
- if gesture recognition is unsupported on container.public static void unregisterAll(java.lang.Object container)
container
- The container from which to unregister the gesture interactive zones.
java.lang.IllegalArgumentException
- if container is null.
java.lang.IllegalArgumentException
- if container is of an unsupported type.public static GestureInteractiveZone getInteractiveZone(java.lang.Object container)
If a container its self is gesture interactive then the container provides a GestureInteractiveZone that is bound to the container's bounding box.
Note 1: calling register(Object, GestureInteractiveZone)
or/and
unregister(Object, GestureInteractiveZone)
will have no effect on such a
GestureInteractiveInstance.
Note 2: The GestureInteractiveZone of a container may only be available
after a call to setListener(Object, GestureListener)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |