public final class SpenEquationRecognitionManager extends SpenRecognitionManager
| Modifier and Type | Field and Description |
|---|---|
static String |
SPEN_EQUATION
The full class name of the preloaded EquationRecognitionPlugin.
|
| Constructor and Description |
|---|
SpenEquationRecognitionManager(Context context)
Creates an SpenEquationRecognitionManager instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes an SpenEquationRecognitionManager instance.
|
SpenEquationRecognition |
createRecognition(SpenRecognitionInfo info)
Create an SpenEquationRecognition instance with the specified recognition information from the candidate
information list.
You can get the information by calling getInfoList(int, int). |
SpenEquationRecognition |
createRecognition(SpenRecognitionInfo info,
String key)
Create an SpenEquationRecognition instance with the specified recognition information from the candidate
information list and the specified key.
You can get the information by calling getInfoList(int, int) |
SpenEquationRecognition |
createRecognition(String className)
Create an SpenEquationRecognition instance with the specified full class name.
If you know the name of the package and class, you can call this method directly without making a candidate list. |
SpenEquationRecognition |
createRecognition(String className,
String key)
Create an SpenEquationRecognition instance directly with the specified full class name and key.
If you already know the name of the package and class, you can call this method directly without make a candidate list. |
void |
destroyRecognition(SpenEquationRecognition recognition)
Destroy the currently loaded equation recognition instance.
|
List<SpenRecognitionInfo> |
getInfoList(int inputType,
int outputType)
Get the information list with the specified input type and output type.
The list includes all available EquationRecognition Plug-ins with the given inputType and
outputType . |
String |
getPrivateKeyHint(SpenRecognitionInfo info)
Get a private key hint for the recognition plug-in.
|
public static final String SPEN_EQUATION
public SpenEquationRecognitionManager(Context context)
context - The Context for your applicationIllegalArgumentException - Thrown if context is null.close()public List<SpenRecognitionInfo> getInfoList(int inputType, int outputType)
inputType and
outputType .inputType - The input object type for the recognition plug-in.outputType - The output object type of the recognition plug-in.SpenObjectBase.TYPE_NONE,
SpenObjectBase.TYPE_STROKE,
SpenObjectBase.TYPE_TEXT_BOX,
SpenObjectBase.TYPE_IMAGE,
SpenObjectBase.TYPE_CONTAINERpublic String getPrivateKeyHint(SpenRecognitionInfo info) throws ClassNotFoundException, InstantiationException, IllegalAccessException
info - The recognition information object.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.InstantiationException - Thrown when the constructor is not accessible during instantiation.IllegalAccessException - Thrown when the class methods are not accessible.IllegalArgumentException - Thrown if info is null.public SpenEquationRecognition createRecognition(SpenRecognitionInfo info) throws ClassNotFoundException, SpenCreationFailureException, Exception
getInfoList(int, int).info - The recognition information object.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified classSpenCreationFailureException - Thrown when the recognition instance cannot be created.Exception - Thrown if the recognition engine returns an error.destroyRecognition(SpenEquationRecognition)public SpenEquationRecognition createRecognition(SpenRecognitionInfo info, String key) throws ClassNotFoundException, SpenCreationFailureException, Exception
getInfoList(int, int)info - The recognition information object.key - The private key for the recognition instance.IllegalArgumentException - Thrown when the information passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the recognition instance cannot be created.Exception - Thrown if the recognition engine returns an error.getPrivateKeyHint(SpenRecognitionInfo),
destroyRecognition(SpenEquationRecognition)public SpenEquationRecognition createRecognition(String className) throws ClassNotFoundException, SpenCreationFailureException, Exception
className - The full class name of the recognition plug-in.IllegalArgumentException - Thrown when the className passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the recognition instance cannot be created.Exception - Thrown if the recognition engine returns an error.destroyRecognition(SpenEquationRecognition)public SpenEquationRecognition createRecognition(String className, String key) throws ClassNotFoundException, SpenCreationFailureException, Exception
className - The full class name of the recognition plug-in.key - The private key for the recognition plug-in.IllegalArgumentException - Thrown when the className passed is null.ClassNotFoundException - Thrown when the class loader is unable to find the specified class.SpenCreationFailureException - Thrown when the recognition instance cannot be created.Exception - Thrown if the recognition engine returns an error.getPrivateKeyHint(SpenRecognitionInfo),
destroyRecognition(SpenEquationRecognition)public void destroyRecognition(SpenEquationRecognition recognition)
recognition - The SpenEquationRecognition instance to destroy.IllegalArgumentException - Thrown when the recognition plug-in passed is not a loaded plug-in.createRecognition(SpenRecognitionInfo),
createRecognition(SpenRecognitionInfo, String),
createRecognition(String),
createRecognition(String, String)public void close()