public class

PenEvent

extends Object
java.lang.Object
   ↳ com.htc.pen.PenEvent

Summary

Constants
int PEN_ACTION_DOWN Constant for getAction(): A pressed gesture has started, the motion contains the initial starting location.
int PEN_ACTION_MOVE Constant for getAction(): A change has happened during a press gesture (between PEN_ACTION_DOWN and PEN_ACTION_UP).
int PEN_ACTION_UP Constant for getAction(): A pressed gesture has finished, the motion contains the final release location as well as any intermediate points since the last down or move event.
int PEN_BUTTON1 Pen event: Lower pen button has gone down.
int PEN_BUTTON2 Pen event: Upper pen button has gone down.
int PEN_BUTTON_NONE Pen event: None pen button has gone down.
int PEN_MOVE_BUTTON1_DOWN Pen event: Lower pen button has gone down while moving.
int PEN_MOVE_BUTTON1_UP Pen event: Lower pen button has gone up while moving.
int PEN_MOVE_BUTTON2_DOWN Pen event: Upper pen button has gone down while moving.
int PEN_MOVE_BUTTON2_UP Pen event: Upper pen button has gone up while moving.
int SOURCE_PEN_TOUCHSCREEN Pen Source: define the pen source.
Public Constructors
PenEvent()
Public Methods
static int PenAction(MotionEvent event)
static int PenButton(MotionEvent event)
static void enablePenEvent(Activity act, boolean bEnable)
static boolean hasPenEvent(Activity act)
static boolean isPenEvent(MotionEvent event)
In API level 14, MotionEvent could support multi-touch with some of the pointer from STYLUS But, PenEvent does not support multi-touch.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int PEN_ACTION_DOWN

Since: API Level 4.1

Constant for getAction(): A pressed gesture has started, the motion contains the initial starting location.

Constant Value: 30 (0x0000001e)

public static final int PEN_ACTION_MOVE

Since: API Level 4.1

Constant for getAction(): A change has happened during a press gesture (between PEN_ACTION_DOWN and PEN_ACTION_UP). The pen motion contains the most recent point, as well as any intermediate points since the last down or move event.

Constant Value: 32 (0x00000020)

public static final int PEN_ACTION_UP

Since: API Level 4.1

Constant for getAction(): A pressed gesture has finished, the motion contains the final release location as well as any intermediate points since the last down or move event.

Constant Value: 31 (0x0000001f)

public static final int PEN_BUTTON1

Since: API Level 4.1

Pen event: Lower pen button has gone down. The bits in indicate which pen button changed.

Constant Value: 41 (0x00000029)

public static final int PEN_BUTTON2

Since: API Level 4.1

Pen event: Upper pen button has gone down. The bits in indicate which pen button changed.

Constant Value: 42 (0x0000002a)

public static final int PEN_BUTTON_NONE

Since: API Level 4.1

Pen event: None pen button has gone down. The bits in indicate which pen button changed.

Constant Value: 40 (0x00000028)

public static final int PEN_MOVE_BUTTON1_DOWN

Since: API Level 4.1

Pen event: Lower pen button has gone down while moving.

Constant Value: 261 (0x00000105)

public static final int PEN_MOVE_BUTTON1_UP

Since: API Level 4.1

Pen event: Lower pen button has gone up while moving.

Constant Value: 262 (0x00000106)

public static final int PEN_MOVE_BUTTON2_DOWN

Since: API Level 4.1

Pen event: Upper pen button has gone down while moving.

Constant Value: 517 (0x00000205)

public static final int PEN_MOVE_BUTTON2_UP

Since: API Level 4.1

Pen event: Upper pen button has gone up while moving.

Constant Value: 518 (0x00000206)

public static final int SOURCE_PEN_TOUCHSCREEN

Since: API Level 4.1

Pen Source: define the pen source.

Constant Value: 16386 (0x00004002)

Public Constructors

public PenEvent ()

Since: API Level 4.1

Public Methods

public static int PenAction (MotionEvent event)

Since: API Level 4.1

public static int PenButton (MotionEvent event)

Since: API Level 4.1

public static void enablePenEvent (Activity act, boolean bEnable)

Since: API Level 4.1

public static boolean hasPenEvent (Activity act)

Since: API Level 4.1

public static boolean isPenEvent (MotionEvent event)

Since: API Level 4.1

In API level 14, MotionEvent could support multi-touch with some of the pointer from STYLUS But, PenEvent does not support multi-touch. This API should be deprecated due to function not work in multi-outch MotionEvent