PenProfile 2.x

com.livescribe.event
Interface CoordinateListener


public interface CoordinateListener

This interface must be implemented by any class that wishes to receive coordinate events from the system. These are the raw position events. Coordinate events include:

  1. Coordinate—The pen has successfully decoded a coordinate. The pen tip is in contact with dot paper. In other words, a pen-down event will have occurred.
  2. Coordinate Failed—The coordinate was not able to be determined. This also occurs when the pen tip is in contact with dot paper.
  3. Hover—This is similar to the coordinate event, except the pen is hovering above dot paper without the pen tip making contact.
  4. Pen Away—The pen has been hovering but now can no longer see or decode any coordinates. This will only occur once after the pen has been hovering or seen some coordinates. This can be used as a sort-of "pen away" terminating event.
  5. White Paper—The pen sees white or non-dotted paper. These events can occur when the pen is making contact with or hovering over paper.

Since:
2.4
See Also:
Coordinate

Method Summary
 void coordinate(long time, Coordinate coord)
          This is called whenever a new coordinate has been decoded by the system.
 void coordinateFailed(long time)
          This is called if a coordinate failed to decode.
 void hover(long time, Coordinate coord)
          This is called when a valid coordinate is detected when the pen tip is near, but not in contact with, the paper.
 void hoverAway(long time)
          This is called when the pen tip moves beyond the range of it ability to decode coordinates when hovering.
 void whitePaper(long time)
          This is called when the pen sees white, or non dotted, paper.
 

Method Detail

coordinate

void coordinate(long time,
                Coordinate coord)
This is called whenever a new coordinate has been decoded by the system. These events occur when the pen tip is in contact with the paper.

Parameters:
time - the event time
coord - the coordinate
See Also:
coordinateFailed(long), SystemConfig.getSuccessfulCoordinateCount()

coordinateFailed

void coordinateFailed(long time)
This is called if a coordinate failed to decode. This also occurs when the pen tip is in contact with the paper.

Parameters:
time - the event time
See Also:
coordinate(long, Coordinate), SystemConfig.getFailedCoordinateCount()

hover

void hover(long time,
           Coordinate coord)
This is called when a valid coordinate is detected when the pen tip is near, but not in contact with, the paper. When hover mode is off, this will not be called.

Parameters:
time - the event time
coord - the coordinate
See Also:
hoverAway(long), SystemConfig.setHoverModeEnabled(boolean)

hoverAway

void hoverAway(long time)
This is called when the pen tip moves beyond the range of it ability to decode coordinates when hovering. When hover mode is off this will not be called. Instead, you can use a regular pen-up event.

Note that unlike the other methods in this interface, this one is only called once after the pen has been hovering or has seen some coordinates.

Parameters:
time - the event time
See Also:
hover(long, Coordinate), SystemConfig.setHoverModeEnabled(boolean)

whitePaper

void whitePaper(long time)
This is called when the pen sees white, or non dotted, paper. Note that a page with some sort of printed content may generate coordinate-failed events instead of this event.

Parameters:
time - the event time

PenProfile 2.x

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