dict.me
Class SearchKeysForm

java.lang.Object
  extended by javax.microedition.lcdui.Displayable
      extended by javax.microedition.lcdui.Screen
          extended by javax.microedition.lcdui.Form
              extended by dict.me.BaseForm
                  extended by dict.me.SearchKeysForm
All Implemented Interfaces:
IProgress, IResult, javax.microedition.lcdui.CommandListener, javax.microedition.lcdui.ItemCommandListener

public class SearchKeysForm
extends BaseForm
implements javax.microedition.lcdui.ItemCommandListener

Form showing keywords for a pattern.

Version:
$Revision: 21 $
Author:
Daniel Stoinski

Field Summary
private  DictForm m_parentform
          The form to read the search pattern from and where to put the selected keyword into.
private  DictIndexSKeysThread m_thr
          The thread performing the search.
 
Fields inherited from class dict.me.BaseForm
m_parent
 
Constructor Summary
SearchKeysForm(DictMidlet aParent, DictForm aParentForm)
          Initializes the form and starts searching.
 
Method Summary
 void addResult(java.lang.String aResult)
          Appends the given result to the form.
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Displayable s)
          Command actions.
 void commandAction(javax.microedition.lcdui.Command c, javax.microedition.lcdui.Item item)
          Reaction for selecting an item.
 void doSearch()
          Starts searching for keywords.
 
Methods inherited from class dict.me.BaseForm
emptyForm, getIndex, message, progress, ready, showForm
 
Methods inherited from class javax.microedition.lcdui.Form
append, append, append, delete, deleteAll, get, getHeight, getWidth, insert, set, setItemStateListener, size
 
Methods inherited from class javax.microedition.lcdui.Displayable
addCommand, getTicker, getTitle, isShown, removeCommand, setCommandListener, setTicker, setTitle, sizeChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_thr

private DictIndexSKeysThread m_thr
The thread performing the search.


m_parentform

private DictForm m_parentform
The form to read the search pattern from and where to put the selected keyword into.

Constructor Detail

SearchKeysForm

public SearchKeysForm(DictMidlet aParent,
                      DictForm aParentForm)
Initializes the form and starts searching.

Parameters:
aParent - the parent midlet.
aParentForm - the parent form.
Method Detail

doSearch

public void doSearch()
Starts searching for keywords.


addResult

public void addResult(java.lang.String aResult)
Appends the given result to the form.

Specified by:
addResult in interface IResult
Specified by:
addResult in class BaseForm
Parameters:
aResult - the query result to show in the form

commandAction

public final void commandAction(javax.microedition.lcdui.Command c,
                                javax.microedition.lcdui.Displayable s)
Command actions.

Specified by:
commandAction in interface javax.microedition.lcdui.CommandListener
Parameters:
c - c.getCommandType() contains the action requested
s - ignored

commandAction

public final void commandAction(javax.microedition.lcdui.Command c,
                                javax.microedition.lcdui.Item item)
Reaction for selecting an item. For Command.ITEM starts searching for the selected keyword in the parent form.

Specified by:
commandAction in interface javax.microedition.lcdui.ItemCommandListener
Parameters:
c - c.getCommandType() contains the action requested, c.getLabel() contains the items text.
item - ignored