EasyTalk
Class CategoricalSearchScreen

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

public class CategoricalSearchScreen
extends SearchScreen

CategoricalSearchScreen is a SearchScreen that generates categories and places them on the screen. It is one of several screens that placed on the main display controlled in EasyTalk.java. The Categorical Search Screen appears when the categorical search button is selected from the Welcome Screen. The Categorical Search Screen also displays all the categories in the language that is chosen. Once a category is selected the phrases for that category will appear.


Field Summary
 
Fields inherited from class EasyTalk.SearchScreen
languages, naturalLanguages
 
Constructor Summary
CategoricalSearchScreen()
          Constructs a CategoricalSearchScreen
 
Method Summary
protected  void displayCategories()
          displayCategories() appends all the categories on the Categorical Search Window.
 ChoiceGroup getCatChoice()
          getCatSearchButton() is an accessor method that returns the categorical search button
protected  java.lang.String[] getCategories(int id)
          getCategories() receives a language id number and returns an array of strings containing the list of categories in the language corresponding to the id number.
 java.lang.String[] getCategoryArray()
          getCategories() is an accessor method that returns categories[]
 StringItem[] getChoices()
          getChoices() is an accessor method that returns choices[]
 void updateCategories()
          updateCategories() updates the categories based on the users language selection.
 
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

CategoricalSearchScreen

public CategoricalSearchScreen()
Constructs a CategoricalSearchScreen

Method Detail

getCatChoice

public ChoiceGroup getCatChoice()
getCatSearchButton() is an accessor method that returns the categorical search button

Returns:
catChoice

getChoices

public StringItem[] getChoices()
getChoices() is an accessor method that returns choices[]

Returns:
choices

getCategoryArray

public java.lang.String[] getCategoryArray()
getCategoryArray() is an accessor method that returns categories[]

Returns:
categories

displayCategories

protected void displayCategories()
displayCategories() appends all the categories on the Categorical Search Window. If there are previous categories already on the form, displayCategories() will first delete them


updateCategories

public void updateCategories()
updateCategories() updates the categories based on the users language selection.


getCategories

protected java.lang.String[] getCategories(int id)
getCategories() receives a language id number and returns an array of strings containing the list of categories in the language corresponding to the id number.

Parameters:
id - , the language id of the categories being translated
Returns:
array , the string array of the phrases