Show CIGestureEvent.java syntax highlighted
/**
*
*/
package ucalgary.ebe.ci.gestures.events.impl;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import ucalgary.ebe.ci.common.ICIPoint;
import ucalgary.ebe.ci.common.Point;
import ucalgary.ebe.ci.gestures.DefaultGestures;
import ucalgary.ebe.ci.gestures.ICIGestureIndentifier;
import ucalgary.ebe.ci.gestures.events.ICIGestureEvent;
/**
* @author hkolenda
*
*/
public class CIGestureEvent implements ICIGestureEvent {
private ArrayList<ICIPoint> coords = null;
private ICIGestureIndentifier gesture = null;
private int id = 0;
public CIGestureEvent() {
coords = new ArrayList<ICIPoint>();
gesture = DefaultGestures.NOTHING;
id = 0;
}
public CIGestureEvent(ICIGestureEvent gestureEvent) {
coords = new ArrayList<ICIPoint>(gestureEvent.getCoords());
gesture = gestureEvent.getGesture();
id = gestureEvent.getID();
}
public void clearCoord() {
coords.clear();
}
public void addCoord(Enumeration<Point> coords) {
while (coords.hasMoreElements()) {
Point coord = coords.nextElement();
this.coords.add(coord);
}
}
public void addCoord(Point coord) {
this.coords.add(coord);
}
/*
* (non-Javadoc)
*
* @see ucalgary.ebe.ci.gestures.events.ICIGestureEvent#getCoords()
*/
public List<ICIPoint> getCoords() {
// TODO Auto-generated method stub
return coords;
}
/*
* (non-Javadoc)
*
* @see ucalgary.ebe.ci.gestures.events.ICIGestureEvent#getGesture()
*/
public ICIGestureIndentifier getGesture() {
// TODO Auto-generated method stub
return gesture;
}
/*
* (non-Javadoc)
*
* @see ucalgary.ebe.ci.ICIInputEvent#getID()
*/
public int getID() {
// TODO Auto-generated method stub
return id;
}
/**
* @param gesture
* the gesture to set
*/
public void setGesture(ICIGestureIndentifier gesture) {
this.gesture = gesture;
}
/**
* @param id
* the id to set
*/
public void setId(int id) {
this.id = id;
}
}
See more files for this project here
The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.
Project homepage:
http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other
CIGestureEvent.java