PenProfile 2.x

Package com.livescribe.event

This package consists of classes and interfaces that broadcast notifications and events to penlets.

See:
          Description

Interface Summary
AreaEnterExitListener Deprecated. use RegionEnterExitListener
CoordinateListener This interface must be implemented by any class that wishes to receive coordinate events from the system.
HWRListener Implementors of this interface will receive Handwriting Recognition (HWR) events.
MenuEventListener MenuEventListener must be implemented by any penlet that has an application menu.
PaperListener This interface must be implemented by any class that wishes to receive document or paper events from the system.
PenTipListener This interface must be implemented by any class that wishes to receive pen tip events from the system.
RegionEnterExitListener This interface must be implemented by any class that wishes to receive region entry/exit events from the system.
RequestListener This interface enables a penlet to respond to requests sent by other penlets.
StrokeListener The StrokeListener interface must be implemented by any class that wishes to receive strokes from the system.
SystemEventListener The SystemEventListener interface must be implemented by any class that wishes to receive system events.
 

Class Summary
CoordinateEvent  
DocumentEvent This event type provides support for document events.
Event This is the base class for penlet and menu events.
HardwareEvent The HardwareEvent class extends the SystemEvent class to encapsulate hardware specific events.
MenuEvent This represents events that occur by using the NavPlus menuing system.
PaperEvent Provides support for all paper-related events.
PenletEvent This event type provides support for timestamp and size data.
PenTipEvent This event type provides support for pen tip events.
RegionEvent This event type provides support for region events.
StrokeEvent This event type provides support for stroke events.
SystemEvent This represents system-specific events.
SystemEvent.Config This class encapsulates system configuration values as SystemEvent objects.
 

Package com.livescribe.event Description

This package consists of classes and interfaces that broadcast notifications and events to penlets.

Ordering

Pen tip events, region events, and stroke events are delivered to an application in the following order.

  1. Pen down
  2. Region enter—May be multiple, depending if any regions overlap
  3. Region exit—May be multiple, depending if any regions overlap, and in the reverse order from region enter events
  4. Pen up
  5. Taps—single and/or double taps
  6. Stroke created

Concepts

Think of the pen as being activated by its tip touching the paper. This corresponds to a pen-down event. Once the pen is activated, it can inspect its surroundings. This gives rise to the region-enter events. Finally, when the pen leaves the paper, it must first exit the regions (for symmetry), producing region-exit events, and then deliver a pen-up event. A stroke on the page has now been created.

Next, that stroke is examined. It may be a single tap or a single tap followed by a double tap. Each tap will generate a single-tap event, but if the system determines that two taps in a row are close enough together space and time, then a double-tap event will be generated.

Finally, that stroke is given to the application as a stroke-created event.

It is often the case in event-based systems that so-called "higher level" or "synthetic" events are delivered after the "simpler" events. For example, the pair of mouse-pressed and mouse-released will result in a mouse-click. Why then are stroke events delivered after the single and double tap events?

The answer is that a stroke may or may not be a tap. Without having the application test whether a stroke should be considered as a tap itself, there is no way to know when a particular sequence of pen events has finished before another pen-down event occurs. Delivering the stroke-created event last provides the application with a way to do this automatically.


PenProfile 2.x

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