net.sourceforge.wohenchan
Class DictionaryPane

java.lang.Object
  |
  +--org.eclipse.swt.widgets.Widget
        |
        +--org.eclipse.swt.widgets.Control
              |
              +--org.eclipse.swt.widgets.Scrollable
                    |
                    +--org.eclipse.swt.widgets.Composite
                          |
                          +--net.sourceforge.wohenchan.DictionaryPane
All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable

public class DictionaryPane
extends org.eclipse.swt.widgets.Composite

Prototype implementation of UI. Proposal available at http://sourceforge.net/forum/message.php?msg_id=28565

Version:
$Name: $ $Date: 2003/09/14 08:26:56 $
Author:
Wesley Tanaka

Field Summary
private static int INPUT_ACTION_DELAY
          The delay, in milliseconds, between the time the user stops typing in the input field, and the time an action is triggered off of that input.
private  org.eclipse.swt.widgets.Button m_clearButton
           
private  ConverterTableInterface[] m_converterTables
           
private  WoHenChanConverterListener m_currentSearch
           
private  org.eclipse.swt.widgets.Text m_inputField
           
private  LanguageChooser m_inputLanguage
           
private  java.util.Hashtable m_langToPosition
          Hashtable mapping LanguageInfoInterface to Integer representing the position in the input format chooser
private  java.lang.String m_lastSearchString
           
private  java.util.Hashtable m_listItemToConverterEntry
           
private  org.eclipse.jface.viewers.TableViewer m_outputList
           
private  ProgressListener m_progresslistener
           
private  java.util.Vector m_results
           
private static int MAX_VISIBLE_RESULTS
          maximum number of visible results on UI.
 
Fields inherited from class org.eclipse.swt.widgets.Composite
 
Fields inherited from class org.eclipse.swt.widgets.Scrollable
 
Fields inherited from class org.eclipse.swt.widgets.Control
 
Fields inherited from class org.eclipse.swt.widgets.Widget
handle
 
Constructor Summary
DictionaryPane(org.eclipse.swt.widgets.Composite parent, ProgressListener progress)
          Constructor
 
Method Summary
(package private)  void addToOutput(ConverterEntryInterface[] ents)
          Adds a list of items to the output list model.
private  void autodetect()
           
private  void clearOutput()
           
private  java.lang.String getInputString()
          Gets the content of the input field.
private  void initConverterTables()
           
private  void runsearch(java.lang.String inputString)
           
static void shutdownAndExit(int exitCode)
           
 
Methods inherited from class org.eclipse.swt.widgets.Composite
checkSubclass, computeSize, getBorderWidth, getChildren, getLayout, getTabList, layout, layout, setFocus, setLayout, setTabList
 
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getVerticalBar
 
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addFocusListener, addHelpListener, addKeyListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addPaintListener, addTraverseListener, computeSize, forceFocus, getAccessible, getBackground, getBounds, getDisplay, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getParent, getShell, getSize, getToolTipText, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, redraw, redraw, removeControlListener, removeFocusListener, removeHelpListener, removeKeyListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removePaintListener, removeTraverseListener, setBackground, setBounds, setBounds, setCapture, setCursor, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setSize, setSize, setToolTipText, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, update
 
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getStyle, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, setData, setData, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INPUT_ACTION_DELAY

private static final int INPUT_ACTION_DELAY
The delay, in milliseconds, between the time the user stops typing in the input field, and the time an action is triggered off of that input.

See Also:
Constant Field Values

MAX_VISIBLE_RESULTS

private static final int MAX_VISIBLE_RESULTS
maximum number of visible results on UI.

See Also:
Constant Field Values

m_clearButton

private org.eclipse.swt.widgets.Button m_clearButton

m_inputField

private org.eclipse.swt.widgets.Text m_inputField

m_inputLanguage

private LanguageChooser m_inputLanguage

m_langToPosition

private final java.util.Hashtable m_langToPosition
Hashtable mapping LanguageInfoInterface to Integer representing the position in the input format chooser


m_outputList

private org.eclipse.jface.viewers.TableViewer m_outputList

m_results

private java.util.Vector m_results

m_converterTables

private ConverterTableInterface[] m_converterTables

m_listItemToConverterEntry

private java.util.Hashtable m_listItemToConverterEntry

m_currentSearch

private WoHenChanConverterListener m_currentSearch

m_lastSearchString

private java.lang.String m_lastSearchString

m_progresslistener

private ProgressListener m_progresslistener
Constructor Detail

DictionaryPane

public DictionaryPane(org.eclipse.swt.widgets.Composite parent,
                      ProgressListener progress)
Constructor

Method Detail

initConverterTables

private void initConverterTables()

autodetect

private void autodetect()

runsearch

private void runsearch(java.lang.String inputString)

clearOutput

private void clearOutput()

addToOutput

void addToOutput(ConverterEntryInterface[] ents)
Adds a list of items to the output list model.


getInputString

private java.lang.String getInputString()
Gets the content of the input field. This method is to be called only from the swing event dispatch thread.

Returns:
the current content of the input field.

shutdownAndExit

public static void shutdownAndExit(int exitCode)