PenProfile 2.x

com.livescribe.event
Class DocumentEvent

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.DocumentEvent

public class DocumentEvent
extends PaperEvent

This event type provides support for document events.

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

Apologies for the naming inconsistency.

Since:
2.3
See Also:
PaperListener

Field Summary
static int DOCUMENT_FIRST_ID
          The first number in the range of ID's used for this event.
static int DOCUMENT_LAST_ID
          The last number in the range of ID's used for this event.
static int DOCUMENT_NEW_DOCUMENT
          The new document event.
static int DOCUMENT_NEW_PAGE
          The new page 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
DocumentEvent(int id, long time, PageInstance page)
          Creates a new document event using the specified parameters.
 
Method Summary
 int getCopy()
          Gets the copy number.
 Document getDocument()
          Gets the document object.
 
Methods inherited from class com.livescribe.event.PaperEvent
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

DOCUMENT_FIRST_ID

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

See Also:
Constant Field Values

DOCUMENT_LAST_ID

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

See Also:
Constant Field Values

DOCUMENT_NEW_PAGE

public static final int DOCUMENT_NEW_PAGE
The new page event.

See Also:
Constant Field Values

DOCUMENT_NEW_DOCUMENT

public static final int DOCUMENT_NEW_DOCUMENT
The new document event.

See Also:
Constant Field Values
Constructor Detail

DocumentEvent

public DocumentEvent(int id,
                     long time,
                     PageInstance page)
Creates a new document event using the specified parameters.

Parameters:
id - the event ID
time - the event time
page - the page object
Method Detail

getDocument

public Document getDocument()
Gets the document object. This will return null for the new page event.

This is a convenience method that calls PageInstance.getDocument() on the object returned by PaperEvent.getPageInstance().

Returns:
the document object.

getCopy

public int getCopy()
Gets the copy number. This will return zero for the new page event.

This is a convenience method that calls PageInstance.getCopy() on the object returned by PaperEvent.getPageInstance().

Overrides:
getCopy in class PaperEvent
Returns:
the copy number.
See Also:
PageInstance.getCopy()

PenProfile 2.x

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