View Javadoc

1   package org.ximtec.igesture.io.tuio.server;
2   
3   /** 
4    * @author Bjorn Puype, bpuype@gmail.com
5    * 
6    * Extend this class to easily create gestures from tuio objects 
7    * 
8    */
9   public abstract class AbstractTuioToIGestureInterface implements TuioToIGestureInterface{
10  
11  	private static final long serialVersionUID = 1L;
12  	
13  	/** Is the gesture trigger active */
14  	private boolean gestureTrigger = false;
15  	/** Is the application used in compatibility mode (only send the gesture data of objects) */
16  	private boolean inCompatibilityMode = false;
17  	
18  	/**
19  	 * Returns true if the gesture trigger is activated.
20  	 * @return the state of the gesture trigger
21  	 */
22  	public boolean isGestureTriggered() {
23  		return gestureTrigger;
24  	}
25  	/**
26  	 * Activate or deactivate the gesture trigger.
27  	 * @param gestureTrigger the gestureTrigger to set
28  	 */
29  	public void setGestureTrigger(boolean gestureTrigger) {
30  		this.gestureTrigger = gestureTrigger;
31  		if(inCompatibilityMode)
32  		{
33  			if(this.gestureTrigger) //when activating the trigger
34  				sendVirtualAdd();
35  			else //when deactivating the trigger
36  				sendVirtualRemove();
37  		}
38  	}
39  	/**
40  	 * Returns true if the compatibility mode is activated.
41  	 * @return the state of the compatibility mode
42  	 */
43  	public boolean isCompatibilityModeActivated() {
44  		return inCompatibilityMode;
45  	}
46  	/**
47  	 * Activate or deactivate the compatibility mode.
48  	 * @param compatibilyModeActivated The value to set.
49  	 */
50  	public void setCompatibilityModeActivated(boolean compatibilyModeActivated) {
51  		this.inCompatibilityMode = compatibilyModeActivated;
52  	}
53  	
54  
55  }