View Javadoc

1   /*
2    * @(#)$Id: Gesture.java 796 2010-05-04 14:54:35Z bpuype $
3    *
4    * Author		:	Ueli Kurmann, igesture@uelikurmann.ch
5    *                  
6    *
7    * Purpose		:   Gesture interface to be implemented by any gesture
8    *                  handling component.
9    *
10   * -----------------------------------------------------------------------
11   *
12   * Revision Information:
13   *
14   * Date				Who			Reason
15   *
16   * 11.04.2008       ukurmann	Initial Release
17   *
18   * -----------------------------------------------------------------------
19   *
20   * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
21   *
22   * This software is the proprietary information of ETH Zurich.
23   * Use is subject to license terms.
24   * 
25   */
26  
27  
28  package org.ximtec.igesture.core;
29  
30  import org.ximtec.igesture.io.GestureDevice;
31  
32  /**
33   * Gesture interface to be implemented by any gesture handling component.
34   * 
35   * @version 1.0 11.04.2008
36   * @author Ueli Kurmann
37   * @author Beat Signer, signer@inf.ethz.ch
38   */
39  public interface Gesture<T> {
40  
41     /**
42      * Returns the gesture.
43      * @return the gesture.
44      */
45     T getGesture();
46  
47  
48     /**
49      * Sets the name of the gesture.
50      * @param name the name of the gesture.
51      */
52     void setName(String name);
53  
54  
55     /**
56      * Returns the name of the gesture.
57      * @return the name of the gesture.
58      */
59     String getName();
60  
61  
62     /**
63      * Visitor implementation.
64      * @param visitor the visitor.
65      */
66     void accept(Visitor visitor);
67     
68     /**
69      * Get the source device of the gesture.
70      * @return		The source device.
71      */
72     GestureDevice<?,?> getSource();
73     
74     /**
75      * Set the source device of the gesture.
76      * @param device		The source device.
77      */
78     void setSource(GestureDevice<?,?> device);
79  
80  }