org.ximtec.igesture.core.composite
Class SequenceConstraint
java.lang.Object
org.ximtec.igesture.core.DefaultPropertyChangeNotifier
org.ximtec.igesture.core.DefaultDataObject
org.ximtec.igesture.core.composite.DefaultConstraint
org.ximtec.igesture.core.composite.SequenceConstraint
- All Implemented Interfaces:
- Serializable, Constraint, DataObject, PropertyChangeNotifier
- Direct Known Subclasses:
- ProximitySequenceConstraint
public class SequenceConstraint
- extends DefaultConstraint
This class represents a sequence constraint. All gestures have to be performed in the order they were defined. A minimum
and a maximum time interval between two consecutive gestures has to be defined.
- Author:
- Bjorn Puype, bpuype@gmail.com
- See Also:
- Serialized Form
| Methods inherited from class org.ximtec.igesture.core.composite.DefaultConstraint |
addGestureClass, addGestureClass, addGestureClass, addGestureClass, getDistinctGestureClasses, getGestureClasses, getGestureEntries, getGestureTime, getNumberOfGestures, getParameter, getParameters, getTimeStamp, removeAllGestureClasses, removeGestureClass, setGestureTime, setParameter |
SequenceConstraint
public SequenceConstraint()
setMinTime
public void setMinTime(String time)
throws ParseException
- Set the minimum time between two gestures
- Parameters:
time - minimum time in format "hh:mm:ss.SSS"
- Throws:
ParseException - thrown if the minimum time could not be parsed
setMaxTime
public void setMaxTime(String time)
throws ParseException
- Set the maximum time between two gestures
- Parameters:
time - maximum time in format "hh:mm:ss.SSS"
- Throws:
ParseException - thrown if the maximum time could not be parsed
getMinTime
public Calendar getMinTime()
- Get the minimum time between two gestures
getMaxTime
public Calendar getMaxTime()
- Get the maximum time between two gestures
determineTimeWindows
public Map<String,Calendar> determineTimeWindows()
- Description copied from interface:
Constraint
- Determine the time window for each composing gesture.
- Specified by:
determineTimeWindows in interface Constraint- Specified by:
determineTimeWindows in class DefaultConstraint
- Returns:
- Mapping between the gesture name and the corresponding time window.
generatePatterns
public Set<String> generatePatterns(Map<String,String> charMapping)
- Description copied from interface:
Constraint
- Generate all possible string patterns that represent the composite gesture.
- Specified by:
generatePatterns in interface Constraint- Specified by:
generatePatterns in class DefaultConstraint
- Parameters:
charMapping - Mapping between the gesture class name and the character representation
validateConditions
public boolean validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
- Description copied from interface:
Constraint
- Validate the constraint conditions.
- Specified by:
validateConditions in interface Constraint- Overrides:
validateConditions in class DefaultConstraint
- Parameters:
gestures - Gestures that possibly compose the composite gesture.manager - Device manager to check the associated users.
- Returns:
toString
public String toString()
- Specified by:
toString in interface Constraint- Overrides:
toString in class DefaultConstraint
Copyright © 2007-2010 Global Information Systems Group, ETH Zurich. All Rights Reserved.