View Javadoc

1   /*
2    * @(#)$Id: MouseReaderEvent.java 689 2009-07-22 00:10:27Z bsigner $
3    *
4    * Author       :   Ueli Kurmann, igesture@uelikurmann.ch
5    *
6    * Purpose      : 	Mouse reader event.
7    *
8    * -----------------------------------------------------------------------
9    *
10   * Revision Information:
11   *
12   * Date             Who         Reason
13   *
14   * Dec 26, 2006     ukurmann    Initial Release
15   * Mar 22, 2007     bsigner     Cleanup
16   *
17   * -----------------------------------------------------------------------
18   *
19   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
20   *
21   * This software is the proprietary information of ETH Zurich.
22   * Use is subject to license terms.
23   * 
24   */
25  
26  
27  package org.ximtec.igesture.io.mouseclient;
28  
29  import org.sigtec.ink.input.TimestampedInputEvent;
30  import org.sigtec.input.InputDeviceEvent;
31  
32  
33  /**
34   * Mouse reader event.
35   * 
36   * @version 1.0, Dec 2006
37   * @author Ueli Kurmann, igesture@uelikurmann.ch
38   * @author Beat Signer, signer@inf.ethz.ch
39   */
40  public class MouseReaderEvent implements InputDeviceEvent {
41  
42     private TimestampedInputEvent timestampedInputEvent;
43  
44  
45     /**
46      * Constructs a new mouse reader event.
47      * 
48      * @param location the position captured by the mouse.
49      */
50     public MouseReaderEvent(TimestampedInputEvent location) {
51        this.timestampedInputEvent = location;
52     }
53  
54  
55     /**
56      * Returns the time when the event occurred.
57      * 
58      * @return the time when the event occurred.
59      */
60     public long getTimestamp() {
61        return timestampedInputEvent.getTimestamp();
62     } // getTimestamp
63  
64  
65     /**
66      * Returns the time stamped location.
67      * 
68      * @return the time stamped location.
69      */
70     public TimestampedInputEvent getTimestampedEvent() { 
71        return timestampedInputEvent;
72     } // getTimestampedLocation
73  
74  }