applications.proxy.main
Class TextUIWindow

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Frame
                          |
                          +--javax.swing.JFrame
                                |
                                +--applications.proxy.main.TextUIWindow

public class TextUIWindow
extends JFrame
implements KeyListener, MamSystemOutputInterface, MooOutputInterface

Description of the Class

Author:
igasp
created March 8, 2001

Inner Class Summary
 (package private) classTextUIWindow.AutoMapListener
          Description of the Class
 (package private) classTextUIWindow.ExportASCIIAction
          Description of the Class
 (package private) classTextUIWindow.LinkAction
          Description of the Class
 (package private) classTextUIWindow.MonitorAction
          Description of the Class
 (package private) classTextUIWindow.QuitAction
          Description of the Class
 (package private) classTextUIWindow.SearchAction
          Description of the Class
 (package private) classTextUIWindow.TranslateListener
          Description of the Class
 (package private) classTextUIWindow.TutorialAction
          Description of the Class
 (package private) classTextUIWindow.VisualizeHtmlAction
          Description of the Class
 (package private) classTextUIWindow.VisualizeJavaAction
          Description of the Class
 (package private) classTextUIWindow.VisualizePluginAction
          Description of the Class

Inner classes inherited from class javax.swing.JFrame
JFrame.AccessibleJFrame

Inner classes inherited from class java.awt.Frame
Frame.AccessibleAWTFrame

Field Summary
 (package private) String[]combuffer
           
 (package private) intcomindex
           
 (package private) intcompos
           
 (package private) intcount
           
 (package private) intindex
           
 (package private) Stringinline
           
 private booleanm_advancedFeatures
           
 protected JMenuItemm_asciiExport
          Description of the Field
 (package private) ExclusiveMenuItemm_autoMapHTML
           
 (package private) ExclusiveMenuItemm_autoMapVRML
           
 private ExclusiveMenuItemm_currAutoMapSelection
           
 private ExclusiveMenuItemm_currTransSelection
           
 private booleanm_doOutputFromMam
           
 private ExclusiveMenuItemm_echo
           
 private ExclusiveMenuItemm_hideActivity
           
 protected InputHandlerm_inputHandler
           
 protected JTextFieldm_inputTextArea
          Description of the Field
 protected MamCommunicatorm_mamComm
          Description of the Field
 (package private) ExclusiveMenuItemm_noAutoMap
           
 private ExclusiveMenuItemm_noEcho
           
 private ExclusiveMenuItemm_originalTransSelection
           
 protected DefaultStyledDocumentm_outputDocument
           
 protected PhatJTextPanem_outputTextPane
          Description of the Field
 protected JViewportm_outputViewport
          Description of the Field
 (package private) String[]m_randomLanguagePairs
           
 private ExclusiveMenuItemm_showActivity
           
 private Mapm_textAttributeSets
           
 (package private) TranslateListenerm_translateListener
           
 (package private) JMenum_transMenu
           
 final static intMAM_TEXT_TYPE_INDEX
           
 final static intMOO_TEXT_TYPE_INDEX
           
 (package private) final static StringOUTPUT_FROM_SYSTEM_SOUND_NAME
           
 final static intSYSTEM_TEXT_TYPE_INDEX
           
 final static String[]TEXT_TYPES
           

Fields inherited from class javax.swing.JFrame
EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled, accessibleContext

Fields inherited from class java.awt.Frame
DEFAULT_CURSOR, CROSSHAIR_CURSOR, TEXT_CURSOR, WAIT_CURSOR, SW_RESIZE_CURSOR, SE_RESIZE_CURSOR, NW_RESIZE_CURSOR, NE_RESIZE_CURSOR, N_RESIZE_CURSOR, S_RESIZE_CURSOR, W_RESIZE_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, MOVE_CURSOR, NORMAL, ICONIFIED

Fields inherited from class java.awt.Component
TOP_ALIGNMENT, CENTER_ALIGNMENT, BOTTOM_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT

Constructor Summary
TextUIWindow(String title, InputHandler handler)
          Constructor for the TextUIWindow object

Method Summary
 voidactionAutoMapHTML()
           
 voidactionAutoMapVRML()
           
 voidactionNoAutoMap()
           
 voidaddKeyListener(KeyListener newListener)
          Adds a feature to the KeyListener attribute of the TextUIWindow object
 protected voidbuildMenus()
          Description of the Method
 protected voidbuildTextAttributeSets()
           
 voidconnectionHijacked()
          Description of the Method
 voiddisableAdvancedMooFeatures()
          Description of the Method
 booleangetAdvancedMooFeatures()
          Gets the AdvancedMooFeatures attribute of the TextUIWindow object
 protected MamCommunicatorgetMamCommunicator()
          Gets the MamCommunicator attribute of the TextUIWindow object
 protected MapgetTextAttributeSets()
           
 voidkeyPressed(KeyEvent keyEvent)
          Description of the Method
 voidkeyReleased(KeyEvent keyEvent)
          Description of the Method
 voidkeyTyped(KeyEvent keyEvent)
          Description of the Method
 static voidmain(String[] args)
          The main program for the TextUIWindow class
 voidmamFinishedExporting(String mooUserName, String mooPassword, boolean successful)
          Description of the Method
 voidmamMessageReceivedFromMoo(String mamMessage)
          Description of the Method
 synchronized voidmamSystemShutdown()
          Description of the Method
 synchronized voidmooConnectionClosed()
          Description of the Method
 voidmooExportStarted()
          Description of the Method
 voidmooTranslationChanged(String languagePair)
          Description of the Method
 synchronized voidoutputFromMam(String output)
          Description of the Method
 synchronized voidoutputFromMoo(String output)
          Description of the Method
 voidoutputFromSystem(String output)
          Description of the Method
 protected voidplayEventSound(String eventSoundName)
          Description of the Method
 voidrandomizeTranslation()
          Description of the Method
 voidrestoreTranslation()
          Description of the Method
 voidsetAdvancedMooFeatures(boolean bAdvanced)
          Sets the AdvancedMooFeatures attribute of the TextUIWindow object
 voidsetMamCommunicator(MamCommunicator mamCommunicator)
          Sets the MamCommunicator attribute of the TextUIWindow object
 voidshow()
           
 private synchronized voidshowText(String text, AttributeSet outputAttributeSet)
          Description of the Method

Methods inherited from class javax.swing.JFrame
frameInit, createRootPane, processKeyEvent, processWindowEvent, setDefaultCloseOperation, getDefaultCloseOperation, update, setJMenuBar, getJMenuBar, isRootPaneCheckingEnabled, setRootPaneCheckingEnabled, addImpl, remove, setLayout, getRootPane, setRootPane, getContentPane, setContentPane, getLayeredPane, setLayeredPane, getGlassPane, setGlassPane, paramString, getAccessibleContext

Methods inherited from class java.awt.Frame
finalize, addNotify, getTitle, setTitle, getIconImage, setIconImage, getMenuBar, setMenuBar, isResizable, setResizable, setState, getState, remove, removeNotify, setCursor, getCursorType, getFrames

Methods inherited from class java.awt.Window
pack, hide, dispose, toFront, toBack, getToolkit, getWarningString, getLocale, getInputContext, setCursor, getOwner, getOwnedWindows, addWindowListener, removeWindowListener, getListeners, processEvent, getFocusOwner, postEvent, isShowing, applyResourceBundle, applyResourceBundle, getGraphicsConfiguration

Methods inherited from class java.awt.Container
getComponentCount, countComponents, getComponent, getComponents, getInsets, insets, add, add, add, add, add, remove, removeAll, getLayout, doLayout, layout, invalidate, validate, validateTree, setFont, getPreferredSize, preferredSize, getMinimumSize, minimumSize, getMaximumSize, getAlignmentX, getAlignmentY, paint, print, paintComponents, printComponents, addContainerListener, removeContainerListener, processContainerEvent, deliverEvent, getComponentAt, locate, getComponentAt, findComponentAt, findComponentAt, isAncestorOf, list, list

Methods inherited from class java.awt.Component
getName, setName, getParent, getPeer, setDropTarget, getDropTarget, getTreeLock, isValid, isDisplayable, isVisible, isEnabled, setEnabled, enable, enable, disable, isDoubleBuffered, enableInputMethods, setVisible, show, getForeground, setForeground, getBackground, setBackground, getFont, setLocale, getColorModel, getLocation, getLocationOnScreen, location, setLocation, move, setLocation, getSize, size, setSize, resize, setSize, resize, getBounds, bounds, setBounds, reshape, setBounds, getX, getY, getWidth, getHeight, getBounds, getSize, getLocation, isOpaque, isLightweight, getGraphics, getFontMetrics, getCursor, paintAll, repaint, repaint, repaint, repaint, printAll, imageUpdate, createImage, createImage, prepareImage, prepareImage, checkImage, checkImage, contains, inside, contains, dispatchEvent, addComponentListener, removeComponentListener, addFocusListener, removeFocusListener, addHierarchyListener, removeHierarchyListener, addHierarchyBoundsListener, removeHierarchyBoundsListener, removeKeyListener, addMouseListener, removeMouseListener, addMouseMotionListener, removeMouseMotionListener, addInputMethodListener, removeInputMethodListener, getInputMethodRequests, enableEvents, disableEvents, coalesceEvents, processComponentEvent, processFocusEvent, processMouseEvent, processMouseMotionEvent, processInputMethodEvent, processHierarchyEvent, processHierarchyBoundsEvent, handleEvent, mouseDown, mouseDrag, mouseUp, mouseMove, mouseEnter, mouseExit, keyDown, keyUp, action, gotFocus, lostFocus, isFocusTraversable, requestFocus, transferFocus, nextFocus, hasFocus, add, toString, list, list, list, addPropertyChangeListener, removePropertyChangeListener, addPropertyChangeListener, removePropertyChangeListener, firePropertyChange, setComponentOrientation, getComponentOrientation

Methods inherited from class java.lang.Object
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait

Field Detail

combuffer

String[] combuffer

comindex

int comindex

compos

int compos

count

int count

index

int index

inline

String inline

m_advancedFeatures

private boolean m_advancedFeatures

m_asciiExport

protected JMenuItem m_asciiExport
Description of the Field
Since:

m_autoMapHTML

ExclusiveMenuItem m_autoMapHTML

m_autoMapVRML

ExclusiveMenuItem m_autoMapVRML

m_currAutoMapSelection

private ExclusiveMenuItem m_currAutoMapSelection

m_currTransSelection

private ExclusiveMenuItem m_currTransSelection

m_doOutputFromMam

private boolean m_doOutputFromMam

m_echo

private ExclusiveMenuItem m_echo

m_hideActivity

private ExclusiveMenuItem m_hideActivity

m_inputHandler

protected InputHandler m_inputHandler

m_inputTextArea

protected JTextField m_inputTextArea
Description of the Field
Since:

m_mamComm

protected MamCommunicator m_mamComm
Description of the Field
Since:

m_noAutoMap

ExclusiveMenuItem m_noAutoMap

m_noEcho

private ExclusiveMenuItem m_noEcho

m_originalTransSelection

private ExclusiveMenuItem m_originalTransSelection

m_outputDocument

protected DefaultStyledDocument m_outputDocument

m_outputTextPane

protected PhatJTextPane m_outputTextPane
Description of the Field
Since:

m_outputViewport

protected JViewport m_outputViewport
Description of the Field
Since:

m_randomLanguagePairs

String[] m_randomLanguagePairs

m_showActivity

private ExclusiveMenuItem m_showActivity

m_textAttributeSets

private Map m_textAttributeSets

m_translateListener

TranslateListener m_translateListener

m_transMenu

JMenu m_transMenu

MAM_TEXT_TYPE_INDEX

public final static int MAM_TEXT_TYPE_INDEX

MOO_TEXT_TYPE_INDEX

public final static int MOO_TEXT_TYPE_INDEX

OUTPUT_FROM_SYSTEM_SOUND_NAME

final static String OUTPUT_FROM_SYSTEM_SOUND_NAME

SYSTEM_TEXT_TYPE_INDEX

public final static int SYSTEM_TEXT_TYPE_INDEX

TEXT_TYPES

public final static String[] TEXT_TYPES
Constructor Detail

TextUIWindow

public TextUIWindow(String title, InputHandler handler)
Constructor for the TextUIWindow object
Parameters:
title - Description of Parameter
handler - Description of Parameter
Since:
Method Detail

actionAutoMapHTML

public void actionAutoMapHTML()

actionAutoMapVRML

public void actionAutoMapVRML()

actionNoAutoMap

public void actionNoAutoMap()

addKeyListener

public void addKeyListener(KeyListener newListener)
Adds a feature to the KeyListener attribute of the TextUIWindow object
Parameters:
newListener - The feature to be added to the KeyListener attribute
Since:

buildMenus

protected void buildMenus()
Description of the Method
Since:

buildTextAttributeSets

protected void buildTextAttributeSets()

connectionHijacked

public void connectionHijacked()
Description of the Method
Since:

disableAdvancedMooFeatures

public void disableAdvancedMooFeatures()
Description of the Method
Since:

getAdvancedMooFeatures

public boolean getAdvancedMooFeatures()
Gets the AdvancedMooFeatures attribute of the TextUIWindow object
Returns: The AdvancedMooFeatures value
Since:

getMamCommunicator

protected MamCommunicator getMamCommunicator()
Gets the MamCommunicator attribute of the TextUIWindow object
Returns: The MamCommunicator value
Since:

getTextAttributeSets

protected Map getTextAttributeSets()

keyPressed

public void keyPressed(KeyEvent keyEvent)
Description of the Method
Parameters:
keyEvent - Description of Parameter
Since:

keyReleased

public void keyReleased(KeyEvent keyEvent)
Description of the Method
Parameters:
keyEvent - Description of Parameter
Since:

keyTyped

public void keyTyped(KeyEvent keyEvent)
Description of the Method
Parameters:
keyEvent - Description of Parameter
Since:

main

public static void main(String[] args)
The main program for the TextUIWindow class
Parameters:
args - The command line arguments
Since:

mamFinishedExporting

public void mamFinishedExporting(String mooUserName, String mooPassword, boolean successful)
Description of the Method
Parameters:
mooUserName - Description of Parameter
mooPassword - Description of Parameter
successful - Description of Parameter
Since:

mamMessageReceivedFromMoo

public void mamMessageReceivedFromMoo(String mamMessage)
Description of the Method
Parameters:
mamMessage - Description of Parameter
Since:

mamSystemShutdown

public synchronized void mamSystemShutdown()
Description of the Method
Since:

mooConnectionClosed

public synchronized void mooConnectionClosed()
Description of the Method
Since:

mooExportStarted

public void mooExportStarted()
Description of the Method
Since:

mooTranslationChanged

public void mooTranslationChanged(String languagePair)
Description of the Method
Parameters:
languagePair - Description of Parameter
Since:

outputFromMam

public synchronized void outputFromMam(String output)
Description of the Method
Parameters:
output - Description of Parameter
Since:

outputFromMoo

public synchronized void outputFromMoo(String output)
Description of the Method
Parameters:
output - Description of Parameter
Since:

outputFromSystem

public void outputFromSystem(String output)
Description of the Method
Parameters:
output - Description of Parameter
Since:

playEventSound

protected void playEventSound(String eventSoundName)
Description of the Method
Parameters:
eventSoundName - Description of Parameter
Since:

randomizeTranslation

public void randomizeTranslation()
Description of the Method
Since:

restoreTranslation

public void restoreTranslation()
Description of the Method
Since:

setAdvancedMooFeatures

public void setAdvancedMooFeatures(boolean bAdvanced)
Sets the AdvancedMooFeatures attribute of the TextUIWindow object
Parameters:
bAdvanced - The new AdvancedMooFeatures value
Since:

setMamCommunicator

public void setMamCommunicator(MamCommunicator mamCommunicator)
Sets the MamCommunicator attribute of the TextUIWindow object
Parameters:
mamCommunicator - The new MamCommunicator value
Since:

show

public void show()

showText

private synchronized void showText(String text, AttributeSet outputAttributeSet)
Description of the Method
Parameters:
text - Description of Parameter
outputAttributeSet - Description of Parameter
Since: