com.paragon.open.dictionary.api
Interface Dictionary.TranslateAsTextListener

Enclosing class:
Dictionary

public static interface Dictionary.TranslateAsTextListener

Callback interface for the translation in text format requests.


Method Summary
 void onComplete(java.lang.String result, TranslateMode mode)
          Called when a translation request completes.
 void onError(Error error)
          Called when an Open Dictionary API Service responds to the request with an error.
 void onIPCError(java.lang.String details)
          Called when an error occurs while communicating with the Open Dictionary API Service.
 void onWordNotFound(java.util.ArrayList<java.lang.String> similarWords)
          Called when the specified word is not found.
 

Method Detail

onComplete

void onComplete(java.lang.String result,
                TranslateMode mode)
Called when a translation request completes.

Parameters:
result - result string with translation
mode - result translate mode. May differ from the requested translate mode

onWordNotFound

void onWordNotFound(java.util.ArrayList<java.lang.String> similarWords)
Called when the specified word is not found.

Parameters:
similarWords - list of similar words

onError

void onError(Error error)
Called when an Open Dictionary API Service responds to the request with an error.

Parameters:
error - any error

onIPCError

void onIPCError(java.lang.String details)
Called when an error occurs while communicating with the Open Dictionary API Service.

Parameters:
details - detailed message