public class GestureStore extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ORIENTATION_INVARIANT |
static int |
ORIENTATION_SENSITIVE |
static int |
SEQUENCE_INVARIANT |
static int |
SEQUENCE_SENSITIVE |
Constructor and Description |
---|
GestureStore() |
Modifier and Type | Method and Description |
---|---|
void |
addGesture(String entryName,
Gesture gesture)
Add a gesture for the entry
|
Set<String> |
getGestureEntries()
Get all the gesture entry names in the library
|
ArrayList<Gesture> |
getGestures(String entryName)
Get all the gestures of an entry
|
int |
getOrientationStyle() |
int |
getSequenceType() |
boolean |
hasChanged() |
void |
load(InputStream stream)
Load the gesture library
|
void |
load(InputStream stream,
boolean closeStream) |
ArrayList<Prediction> |
recognize(Gesture gesture)
Recognize a gesture
|
void |
removeEntry(String entryName)
Remove a entry of gestures
|
void |
removeGesture(String entryName,
Gesture gesture)
Remove a gesture from the library.
|
void |
save(OutputStream stream)
Save the gesture library
|
void |
save(OutputStream stream,
boolean closeStream) |
void |
setOrientationStyle(int style)
Specify how the gesture library will handle orientation.
|
void |
setSequenceType(int type) |
public static final int SEQUENCE_INVARIANT
public static final int SEQUENCE_SENSITIVE
public static final int ORIENTATION_INVARIANT
public static final int ORIENTATION_SENSITIVE
public void setOrientationStyle(int style)
style
- public int getOrientationStyle()
public void setSequenceType(int type)
type
- SEQUENCE_INVARIANT or SEQUENCE_SENSITIVEpublic int getSequenceType()
public Set<String> getGestureEntries()
public ArrayList<Prediction> recognize(Gesture gesture)
gesture
- the querypublic void addGesture(String entryName, Gesture gesture)
entryName
- entry namegesture
- public void removeGesture(String entryName, Gesture gesture)
entryName
- entry namegesture
- public void removeEntry(String entryName)
entryName
- the entry namepublic ArrayList<Gesture> getGestures(String entryName)
entryName
- public boolean hasChanged()
public void save(OutputStream stream) throws IOException
IOException
public void save(OutputStream stream, boolean closeStream) throws IOException
IOException
public void load(InputStream stream) throws IOException
IOException
public void load(InputStream stream, boolean closeStream) throws IOException
IOException