public abstract class DefaultConstraint extends DefaultDataObject implements Constraint
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,String> |
DEFAULT_CONFIGURATION |
protected List<DefaultConstraintEntry> |
gestures |
protected Map<String,IConstraintParameter> |
parameterMapping |
protected Set<IConstraintParameter> |
parameters |
static String |
PROPERTY_CONSTRAINT_PARAMETER_VALUE |
static String |
PROPERTY_GESTURES |
PROPERTY_IDpropertyChangeSupport| Constructor and Description |
|---|
DefaultConstraint() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraintParameters(IConstraintParameter param) |
void |
addGestureClass(String gestureClass)
Add a gesture class to the composite gesture.
|
void |
addGestureClass(String gestureClass,
int user)
Add a gesture class to the composite gesture and specify the user that performs it.
|
void |
addGestureClass(String gestureClass,
int user,
String deviceType,
Set<String> devices)
Add a gesture class to the composite gesture and specify the user and the device type used to perform it.
|
void |
addGestureClass(String gestureClass,
String deviceType,
Set<String> devices)
Add a gesture class to the composite gesture and specify the device type used to perform it.
|
Map<String,Calendar> |
determineTimeWindows()
Determine the time window for each composing gesture.
|
Set<String> |
generatePatterns(Map<String,String> charMapping)
Generate all possible string patterns that represent the composite gesture.
|
Set<IConstraintParameter> |
getConstraintParameters() |
Set<String> |
getDistinctGestureClasses()
Get the disctinct gesture classes that compose this composite gesture
|
List<String> |
getGestureClasses()
Get all the names of the gesture classes that compose this composite gesture
|
List<DefaultConstraintEntry> |
getGestureEntries()
Get all gesture entries.
|
int |
getNumberOfGestures()
Get the number of composing gestures
|
String |
getParameter(String property) |
Map<String,String> |
getParameters()
Returns an array of containing the constraint parameters.
|
void |
removeAllConstraintParameters() |
void |
removeAllGestureClasses()
Remove all gesture classes from the composite.
|
void |
removeGestureClass(DefaultConstraintEntry entry)
Removes the specified gesture class from the composite.
|
void |
setParameter(String property,
String value) |
String |
toString() |
boolean |
validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
Validate the constraint conditions.
|
accept, getId, setIdaddPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListenerprotected Map<String,IConstraintParameter> parameterMapping
protected List<DefaultConstraintEntry> gestures
public static final String PROPERTY_GESTURES
public static final String PROPERTY_CONSTRAINT_PARAMETER_VALUE
protected Set<IConstraintParameter> parameters
public void addConstraintParameters(IConstraintParameter param)
addConstraintParameters in interface Constraintpublic void addGestureClass(String gestureClass)
ConstraintaddGestureClass in interface Constraintpublic void addGestureClass(String gestureClass, int user)
ConstraintaddGestureClass in interface Constraintpublic void addGestureClass(String gestureClass, String deviceType, Set<String> devices)
ConstraintaddGestureClass in interface Constraintpublic void addGestureClass(String gestureClass, int user, String deviceType, Set<String> devices)
ConstraintaddGestureClass in interface Constraintpublic List<String> getGestureClasses()
ConstraintgetGestureClasses in interface Constraintpublic Set<String> getDistinctGestureClasses()
ConstraintgetDistinctGestureClasses in interface Constraintpublic int getNumberOfGestures()
ConstraintgetNumberOfGestures in interface Constraintpublic Set<String> generatePatterns(Map<String,String> charMapping)
ConstraintgeneratePatterns in interface ConstraintcharMapping - Mapping between the gesture class name and the character representationpublic Map<String,Calendar> determineTimeWindows()
ConstraintdetermineTimeWindows in interface Constraintpublic boolean validateConditions(List<Gesture<?>> gestures, IDeviceManager manager)
ConstraintvalidateConditions in interface Constraintgestures - Gestures that possibly compose the composite gesture.manager - Device manager to check the associated users.public String toString()
toString in interface ConstrainttoString in class Objectpublic Map<String,String> getParameters()
ConstraintgetParameters in interface Constraintpublic String getParameter(String property)
getParameter in interface Constraintpublic void setParameter(String property, String value)
setParameter in interface Constraintpublic void removeAllGestureClasses()
ConstraintremoveAllGestureClasses in interface Constraintpublic void removeGestureClass(DefaultConstraintEntry entry)
ConstraintremoveGestureClass in interface Constraintpublic List<DefaultConstraintEntry> getGestureEntries()
ConstraintgetGestureEntries in interface Constraintpublic Set<IConstraintParameter> getConstraintParameters()
getConstraintParameters in interface Constraintpublic void removeAllConstraintParameters()
removeAllConstraintParameters in interface ConstraintCopyright © 2007-2012 Global Information Systems Group, ETH Zurich. All Rights Reserved.