|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectorg.ximtec.igesture.core.DefaultPropertyChangeNotifier
org.ximtec.igesture.core.DefaultDataObject
org.ximtec.igesture.core.composite.DefaultConstraint
org.ximtec.igesture.core.composite.IntervalConstraint
org.ximtec.igesture.core.composite.CardinalityDeviceConstraint
public class CardinalityDeviceConstraint
This class represents a cardinality constraint. A certain gesture has to be performed between a mimimum and a maximum number of times within a certain time interval. The main example for this kind of constraint is defining a majority. Each device has only one vote.
| Nested Class Summary | |
|---|---|
static class |
CardinalityDeviceConstraint.Config
|
| Field Summary |
|---|
| Fields inherited from class org.ximtec.igesture.core.composite.DefaultConstraint |
|---|
DEFAULT_CONFIGURATION, df, gestures, gestureTime, processingTime, PROPERTY_GESTURES, setterMapping |
| Fields inherited from class org.ximtec.igesture.core.DefaultDataObject |
|---|
PROPERTY_ID |
| Fields inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier |
|---|
propertyChangeSupport |
| Constructor Summary | |
|---|---|
CardinalityDeviceConstraint()
|
|
| Method Summary | |
|---|---|
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. |
Set<String> |
generatePatterns(Map<String,String> charMapping)
Generate all possible string patterns that represent the composite gesture. |
int |
getMaximumGestures()
Get the maximum number of gestures that has to be performed |
int |
getMinimumGestures()
Get the minimum number of gestures that has to be performed |
void |
setMaximumGestures(String max)
Set the maximum number of gestures to perform |
void |
setMinimumGestures(String min)
Set the minimum number of gestures to perform |
String |
toString()
|
boolean |
validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
Validate the constraint conditions. |
| Methods inherited from class org.ximtec.igesture.core.composite.IntervalConstraint |
|---|
determineTimeWindows, getDuration, setDuration |
| Methods inherited from class org.ximtec.igesture.core.composite.DefaultConstraint |
|---|
getDistinctGestureClasses, getGestureClasses, getGestureEntries, getGestureTime, getNumberOfGestures, getParameter, getParameters, getTimeStamp, removeAllGestureClasses, removeGestureClass, setGestureTime, setParameter |
| Methods inherited from class org.ximtec.igesture.core.DefaultDataObject |
|---|
accept, getId, setId |
| Methods inherited from class org.ximtec.igesture.core.DefaultPropertyChangeNotifier |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ximtec.igesture.core.PropertyChangeNotifier |
|---|
addPropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, removePropertyChangeListener |
| Constructor Detail |
|---|
public CardinalityDeviceConstraint()
| Method Detail |
|---|
public void addGestureClass(String gestureClass)
Constraint
addGestureClass in interface ConstraintaddGestureClass in class DefaultConstraint
public void addGestureClass(String gestureClass,
int user)
Constraint
addGestureClass in interface ConstraintaddGestureClass in class DefaultConstraint
public void addGestureClass(String gestureClass,
String deviceType,
Set<String> devices)
Constraint
addGestureClass in interface ConstraintaddGestureClass in class DefaultConstraint
public void addGestureClass(String gestureClass,
int user,
String deviceType,
Set<String> devices)
Constraint
addGestureClass in interface ConstraintaddGestureClass in class DefaultConstraint
public void setMinimumGestures(String min)
throws NumberFormatException
NumberFormatExceptionpublic int getMinimumGestures()
public void setMaximumGestures(String max)
throws NumberFormatException
NumberFormatExceptionpublic int getMaximumGestures()
public Set<String> generatePatterns(Map<String,String> charMapping)
Constraint
generatePatterns in interface ConstraintgeneratePatterns in class IntervalConstraintcharMapping - Mapping between the gesture class name and the character representation
public boolean validateConditions(List<Gesture<?>> gestures,
IDeviceManager manager)
Constraint
validateConditions in interface ConstraintvalidateConditions in class IntervalConstraintgestures - Gestures that possibly compose the composite gesture.manager - Device manager to check the associated users.
public String toString()
toString in interface ConstrainttoString in class IntervalConstraint
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||