public
class
GestureStore
extends Object
| java.lang.Object | |
| ↳ | android.gesture.GestureStore |
GestureLibrary maintains gesture examples and makes predictions on a new gesture
Constants | |
|---|---|
int |
ORIENTATION_INVARIANT
|
int |
ORIENTATION_SENSITIVE
|
int |
SEQUENCE_INVARIANT
|
int |
SEQUENCE_SENSITIVE
|
Public constructors | |
|---|---|
GestureStore()
|
|
Public methods | |
|---|---|
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)
|
Inherited methods | |
|---|---|
java.lang.Object
| |
void addGesture (String entryName, Gesture gesture)
Add a gesture for the entry
| Parameters | |
|---|---|
entryName |
String:
entry name |
Set<String> getGestureEntries ()
Get all the gesture entry names in the library
| Returns | |
|---|---|
Set<String> |
a set of strings |
ArrayList<Gesture> getGestures (String entryName)
Get all the gestures of an entry
| Returns | |
|---|---|
ArrayList<Gesture> |
the list of gestures that is under this name |
int getSequenceType ()
| Returns | |
|---|---|
int |
SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE |
void load (InputStream stream)
Load the gesture library
| Parameters | |
|---|---|
stream |
InputStream
|
| Throws | |
|---|---|
IOException |
|
void load (InputStream stream, boolean closeStream)
| Parameters | |
|---|---|
stream |
InputStream
|
closeStream |
boolean
|
| Throws | |
|---|---|
IOException |
|
ArrayList<Prediction> recognize (Gesture gesture)
Recognize a gesture
| Parameters | |
|---|---|
gesture |
Gesture:
the query |
| Returns | |
|---|---|
ArrayList<Prediction> |
a list of predictions of possible entries for a given gesture |
void removeEntry (String entryName)
Remove a entry of gestures
| Parameters | |
|---|---|
entryName |
String:
the entry name
|
void removeGesture (String entryName, Gesture gesture)
Remove a gesture from the library. If there are no more gestures for the given entry, the gesture entry will be removed.
| Parameters | |
|---|---|
entryName |
String:
entry name |
void save (OutputStream stream)
Save the gesture library
| Parameters | |
|---|---|
stream |
OutputStream
|
| Throws | |
|---|---|
IOException |
|
void save (OutputStream stream, boolean closeStream)
| Parameters | |
|---|---|
stream |
OutputStream
|
closeStream |
boolean
|
| Throws | |
|---|---|
IOException |
|
void setOrientationStyle (int style)
Specify how the gesture library will handle orientation. Use ORIENTATION_INVARIANT or ORIENTATION_SENSITIVE
void setSequenceType (int type)
| Parameters | |
|---|---|
type |
int:
SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE
|