PenProfile 2.x

com.livescribe.event
Class PenTipEvent

java.lang.Object
  extended by com.livescribe.event.Event
      extended by com.livescribe.event.PenletEvent
          extended by com.livescribe.event.PaperEvent
              extended by com.livescribe.event.PenTipEvent

public class PenTipEvent
extends PaperEvent

This event type provides support for pen tip events.

Note that double- and single-taps will also appear as strokes.

Note also that the PE_XXX fields are not used with this event. Use the PEN_TIP_xxx fields from this class.

Since:
2.3
See Also:
PenTipListener

Field Summary
static int PEN_TIP_DOUBLE_TAP
          The double tap event.
static int PEN_TIP_FIRST_ID
          The first number in the range of ID's used for this event.
static int PEN_TIP_LAST_ID
          The last number in the range of ID's used for this event.
static int PEN_TIP_PEN_DOWN
          The pen down event.
static int PEN_TIP_PEN_UP
          The pen up event.
static int PEN_TIP_SINGLE_TAP
          The single tap event.
 
Fields inherited from class com.livescribe.event.PaperEvent
areaId, pageInstance, PE_AREAENTER, PE_AREAEXIT, PE_COORDINATE, PE_NEWDOCUMENT, PE_NEWPAGE, PE_PENDOWN, PE_PENUP, PE_STROKE
 
Fields inherited from class com.livescribe.event.PenletEvent
size, time
 
Fields inherited from class com.livescribe.event.Event
consumed, eventId
 
Constructor Summary
PenTipEvent(int id, long time, PageInstance page, Region region, int x, int y)
          Creates a new pen tip event using the specified parameters.
 
Method Summary
 int getX()
          Gets the X-coordinate for single- and double-taps.
 int getY()
          Gets the Y-coordinate for single- and double-taps.
 
Methods inherited from class com.livescribe.event.PaperEvent
getCopy, getPage, getPageInstance, getRegion, toDate, toString
 
Methods inherited from class com.livescribe.event.PenletEvent
getTime
 
Methods inherited from class com.livescribe.event.Event
consume, getId, isConsumed
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PEN_TIP_FIRST_ID

public static final int PEN_TIP_FIRST_ID
The first number in the range of ID's used for this event.

See Also:
Constant Field Values

PEN_TIP_LAST_ID

public static final int PEN_TIP_LAST_ID
The last number in the range of ID's used for this event.

See Also:
Constant Field Values

PEN_TIP_PEN_DOWN

public static final int PEN_TIP_PEN_DOWN
The pen down event.

See Also:
Constant Field Values

PEN_TIP_PEN_UP

public static final int PEN_TIP_PEN_UP
The pen up event.

See Also:
Constant Field Values

PEN_TIP_SINGLE_TAP

public static final int PEN_TIP_SINGLE_TAP
The single tap event.

See Also:
Constant Field Values

PEN_TIP_DOUBLE_TAP

public static final int PEN_TIP_DOUBLE_TAP
The double tap event.

See Also:
Constant Field Values
Constructor Detail

PenTipEvent

public PenTipEvent(int id,
                   long time,
                   PageInstance page,
                   Region region,
                   int x,
                   int y)
Creates a new pen tip event using the specified parameters. Note that not all the parameters are used by all pen tip event types, and so may be set to null or zero.

Parameters:
id - the event ID
time - the event time
page - the page object, may be null
region - the region object, may be null
x - the X-coordinate
y - the Y-coordinate
Method Detail

getX

public int getX()
Gets the X-coordinate for single- and double-taps.

Returns:
the X-coordinate.

getY

public int getY()
Gets the Y-coordinate for single- and double-taps.

Returns:
the Y-coordinate.

PenProfile 2.x

Copyright © 2010 Livescribe Inc. All Rights Reserved.
Confidential and subject to NDA.