1 /*
2 * @(#)$Id: GestureToActionMapping.java 689 2009-07-22 00:10:27Z bsigner $
3 *
4 * Author : Michele Croci, mcroci@gmail.com
5 *
6 * Purpose : Interface describing general Action for Gesture mapping
7 *
8 * -----------------------------------------------------------------------
9 *
10 * Revision Information:
11 *
12 * Date Who Reason
13 *
14 * Nov 19, 2007 crocimi Initial Release
15 *
16 * -----------------------------------------------------------------------
17 *
18 * Copyright 1999-2009 ETH Zurich. All Rights Reserved.
19 *
20 * This software is the proprietary information of ETH Zurich.
21 * Use is subject to license terms.
22 *
23 */
24
25
26 package org.ximtec.igesture.geco.mapping;
27
28 import org.ximtec.igesture.core.GestureClass;
29 import org.ximtec.igesture.event.GestureAction;
30
31
32
33 /**
34 * Interface describing general Action for Gesture mapping
35 *
36 * @version 0.9, Nov 19, 2007
37 * @author Michele Croci, mcroci@gmail.com
38 */
39 public class GestureToActionMapping {
40
41 protected GestureClass gestureClass = null;
42
43 protected GestureAction action = null;
44
45
46 /**
47 * Constructor
48 *
49 * @param gesture the gesture class
50 * @param action the action corresponding to the gesture
51 */
52 public GestureToActionMapping(GestureClass gesture, GestureAction action) {
53 this.gestureClass = gesture;
54 this.action = action;
55 }
56
57
58 /**
59 * Returns the gesture class
60 *
61 * @return the gesture class
62 */
63 public GestureClass getGestureClass(){
64 return gestureClass;
65 }
66
67
68 /**
69 * Returns the gesture class
70 *
71 * @return the description of the Mapping
72 */
73 public String toString(){
74 //TODO: change implementation of this method?
75 return gestureClass.getName();
76 }
77
78
79 /**
80 * Returns the action
81 *
82 * @return the action
83 */
84 public GestureAction getAction(){
85 return action;
86 }
87
88
89
90
91 }