EasyTalk
Class GeneralSearchScreen

java.lang.Object
  extended by Form
      extended by EasyTalk.SearchScreen
          extended by EasyTalk.GeneralSearchScreen

public class GeneralSearchScreen
extends SearchScreen

The GeneralSearch Screen is a subclass of Search Window. The user inserts a phrase, then the GeneralSearchScreen checks to see if the phrase is in the database. If the phrase is not in the database the GeneralSearchScreen retrieves the translation from Google Translator.


Field Summary
 
Fields inherited from class EasyTalk.SearchScreen
languages, naturalLanguages
 
Constructor Summary
GeneralSearchScreen()
          Constructs a GeneralSearchScreen
 
Method Summary
 void commandAction(Command command, Item item)
           
 ChoiceGroup getLangFrom()
          getLangFrom is an accessor method that returns the ChoiceGroup which contains the language being translated from.
 ChoiceGroup getLangTo()
          getLangTo is an accessor method that returns the ChoiceGroup which contains the language being translated to.
 StringItem getOnlineTranslationItem()
          getOnlineTranslationItem() is an accessor method that returns the onlineTranslation TextField.
 TextField getTextToTranslate()
          getTextToTranslate() is an accessor method that returns the Textfield which contains the text to be translated.
 StringItem getTranslateButton()
          getTranslateButton() is an accessor method that returns the translate button
 TextField getTranslatedText()
          getTranslatedText() is an accessor method that returns the Textfield which contains the translated text.
 void itemStateChanged(Item item)
          itemStatChanged(Item)is called if the form state changes.
 
Methods inherited from class EasyTalk.SearchScreen
getHTML, getLanguages, parseLanguages, translateText
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeneralSearchScreen

public GeneralSearchScreen()
Constructs a GeneralSearchScreen

Method Detail

getLangFrom

public ChoiceGroup getLangFrom()
getLangFrom is an accessor method that returns the ChoiceGroup which contains the language being translated from.

Returns:
langFromButton

getLangTo

public ChoiceGroup getLangTo()
getLangTo is an accessor method that returns the ChoiceGroup which contains the language being translated to.

Returns:
langToButton

getTextToTranslate

public TextField getTextToTranslate()
getTextToTranslate() is an accessor method that returns the Textfield which contains the text to be translated.

Returns:
textToTranslate

getTranslatedText

public TextField getTranslatedText()
getTranslatedText() is an accessor method that returns the Textfield which contains the translated text.

Returns:
translatedText

getTranslateButton

public StringItem getTranslateButton()
getTranslateButton() is an accessor method that returns the translate button

Returns:
translate , a StringItem button

getOnlineTranslationItem

public StringItem getOnlineTranslationItem()
getOnlineTranslationItem() is an accessor method that returns the onlineTranslation TextField.

Returns:
onlineTranslation , a TextField that tells the user if the translation was found using an online source.

itemStateChanged

public void itemStateChanged(Item item)
itemStatChanged(Item)is called if the form state changes. If the left drop down menu changes state, then this function is called to request the language list from the database. The languages are listed in their natural form.

Parameters:
item, - the Item changed on the Form.

commandAction

public void commandAction(Command command,
                          Item item)