EasyTalk
Class PhraseResultsScreen

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

public class PhraseResultsScreen
extends SearchScreen

PhraseResultsScreen generates the phrase results and places them on the screen. It has multiple phrases and one translated phrase on the bottom of the screen. It inherits from SearchScreen.


Field Summary
 
Fields inherited from class EasyTalk.SearchScreen
languages, naturalLanguages
 
Constructor Summary
PhraseResultsScreen()
          Constructs a PhraseResultsScreen
 
Method Summary
 void commandAction(Command command, Item item)
           
protected  void displayPhrases(java.lang.String t, CategoricalSearchScreen fmCategory)
          displayPhrases(String, CategoricalSearchScreen) displays the phrases onto the the PhraseResultsScreen.
 ChoiceGroup getLangChoice()
          getLangChoice is an accessor method that returns the language choice.
protected  java.lang.String[] getPhrases(int cat, int id)
          getPhrases(int,int) retrieves an array which contains all of the phrases in the database of the specific category and language.
 TextField getTranslateText()
          getTranslateText() is an accessor method that returns the translated text.
 void itemStateChanged(Item item)
          itemStatChanged(Item)is called if the form state changes.
 void setLanguageFrom(int i)
          setLanguageFrom is a mutator that changes language i to fit into the specified boundaries of language.
 
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

PhraseResultsScreen

public PhraseResultsScreen()
Constructs a PhraseResultsScreen

Method Detail

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.

getLangChoice

public ChoiceGroup getLangChoice()
getLangChoice is an accessor method that returns the language choice.

Returns:
langChoice

getTranslateText

public TextField getTranslateText()
getTranslateText() is an accessor method that returns the translated text.

Returns:
translatedText

setLanguageFrom

public void setLanguageFrom(int i)
setLanguageFrom is a mutator that changes language i to fit into the specified boundaries of language.

Parameters:
i - , the language id

displayPhrases

protected void displayPhrases(java.lang.String t,
                              CategoricalSearchScreen fmCategory)
displayPhrases(String, CategoricalSearchScreen) displays the phrases onto the the PhraseResultsScreen.

Parameters:
t -
fmCategory -

getPhrases

protected java.lang.String[] getPhrases(int cat,
                                        int id)
getPhrases(int,int) retrieves an array which contains all of the phrases in the database of the specific category and language.

Parameters:
cat - , the category
id - , the language id that specifies the language of the phrases being retrieved
Returns:
array , the array of phrases

commandAction

public void commandAction(Command command,
                          Item item)