to top
Android APIs
public class

GestureStore

extends Object
java.lang.Object
   ↳ android.gesture.GestureStore

Class Overview

GestureLibrary maintains gesture examples and makes predictions on a new gesture

Summary

Constants
int ORIENTATION_INVARIANT
int ORIENTATION_SENSITIVE
int SEQUENCE_INVARIANT
int SEQUENCE_SENSITIVE
Public Constructors

? Examples
GestureStore()
Public Methods

? Examples
void addGesture( String entryName, Gesture gesture)
Add a gesture for the entry

? Examples
Set< String> getGestureEntries()
Get all the gesture entry names in the library

? Examples
ArrayList< Gesture> getGestures( String entryName)
Get all the gestures of an entry

? Examples
int getOrientationStyle()

? Examples
int getSequenceType()

? Examples
boolean hasChanged()

? Examples
void load( InputStream stream)
Load the gesture library

? Examples
void load( InputStream stream, boolean closeStream)

? Examples
ArrayList< Prediction> recognize( Gesture gesture)
Recognize a gesture

? Examples
void removeEntry( String entryName)
Remove a entry of gestures

? Examples
void removeGesture( String entryName, Gesture gesture)
Remove a gesture from the library.

? Examples
void save( OutputStream stream)
Save the gesture library

? Examples
void save( OutputStream stream, boolean closeStream)

? Examples
void setOrientationStyle(int style)
Specify how the gesture library will handle orientation.

? Examples
void setSequenceType(int type)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ORIENTATION_INVARIANT

Added in API level 4

Constant Value: 1 (0x00000001)

public static final int ORIENTATION_SENSITIVE

Added in API level 4

Constant Value: 2 (0x00000002)

public static final int SEQUENCE_INVARIANT

Added in API level 4

Constant Value: 1 (0x00000001)

public static final int SEQUENCE_SENSITIVE

Added in API level 4

Constant Value: 2 (0x00000002)

Public Constructors

public GestureStore ()

Added in API level 4

Public Methods

public void addGesture (String entryName, Gesture gesture)

Added in API level 4

Add a gesture for the entry

Parameters
entryName entry name

public Set<String> getGestureEntries ()

Added in API level 4

Get all the gesture entry names in the library

Returns
  • a set of strings

public ArrayList<Gesture> getGestures (String entryName)

Added in API level 4

Get all the gestures of an entry

Returns
  • the list of gestures that is under this name

public int getOrientationStyle ()

Added in API level 4

public int getSequenceType ()

Added in API level 4

Returns
  • SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE

public boolean hasChanged ()

Added in API level 4

public void load (InputStream stream)

Added in API level 4

Load the gesture library

Throws
IOException

public void load (InputStream stream, boolean closeStream)

Added in API level 4

Throws
IOException

public ArrayList<Prediction> recognize (Gesture gesture)

Added in API level 4

Recognize a gesture

Parameters
gesture the query
Returns
  • a list of predictions of possible entries for a given gesture

public void removeEntry (String entryName)

Added in API level 4

Remove a entry of gestures

Parameters
entryName the entry name

public void removeGesture (String entryName, Gesture gesture)

Added in API level 4

Remove a gesture from the library. If there are no more gestures for the given entry, the gesture entry will be removed.

Parameters
entryName entry name

public void save (OutputStream stream)

Added in API level 4

Save the gesture library

Throws
IOException

public void save (OutputStream stream, boolean closeStream)

Added in API level 4

Throws
IOException

public void setOrientationStyle (int style)

Added in API level 4

Specify how the gesture library will handle orientation. Use ORIENTATION_INVARIANT or ORIENTATION_SENSITIVE

public void setSequenceType (int type)

Added in API level 4

Parameters
type SEQUENCE_INVARIANT or SEQUENCE_SENSITIVE
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.