All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class mootcan.CommandTextField

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Panel
                           |
                           +----mootcan.CommandTextField

public class CommandTextField
extends Panel
a textfield to enter commands has support for history. sends the 'commands' into a pipe. for now it only sends strings, but it can probably be expanded to send other types. it may seem like overkill to add a new panel just for the TextArea here. the reason I did this was to make it possible to try to add a java-1.1 TextArea which is superior to the java-1.0 one. (we are allowed to construct it without scrollbars). if the java-1.1 TextArea is not found, we fall back to the java-1.0 one.

Author:
Sindre Sørensen

Variable Index

 o ancientAWT
 o caretPosition
 o commandArea
 o currentMode
 o history
 o histSize
 o inputStream
 o issuedCommand
 o modes
 o out
 o outputArea
 o outputStream
 o PGDNonKeyDown

Constructor Index

 o CommandTextField(Font, int, Vector)

Method Index

 o clean()
 o cycleDown()
 o cycleUp()
 o getInputStream()
 o getIssuedCommand()
 o getMode()
 o issueCommand()
 o keyDown(Event, int)
 o keyUp(Event, int)
 o requestFocus()
 o sendIssuedCommand(String)
 o setMode(Mode)
 o setMode(String)

Variables

 o histSize
 private int histSize
 o caretPosition
 private int caretPosition
 o outputArea
 private UserOutputArea outputArea
 o history
 HistoryList history
 o issuedCommand
 String issuedCommand
 o PGDNonKeyDown
 boolean PGDNonKeyDown
 o ancientAWT
 boolean ancientAWT
 o outputStream
 PipedOutputStream outputStream
 o inputStream
 PipedInputStream inputStream
 o out
 DataOutputStream out
 o commandArea
 TextComponent commandArea
 o modes
 Vector modes
 o currentMode
 Mode currentMode

Constructors

 o CommandTextField
 CommandTextField(Font font,
                  int histSize,
                  Vector modes)

Methods

 o requestFocus
 public void requestFocus()
Overrides:
requestFocus in class Component
 o getInputStream
 public PipedInputStream getInputStream()
 o sendIssuedCommand
 private void sendIssuedCommand(String s)
 o getIssuedCommand
 public String getIssuedCommand()
 o clean
 public void clean()
 o cycleUp
 private void cycleUp()
 o cycleDown
 private void cycleDown()
 o issueCommand
 private void issueCommand()
 o keyUp
 public boolean keyUp(Event event,
                      int keycode)
Overrides:
keyUp in class Component
 o keyDown
 public boolean keyDown(Event event,
                        int keycode)
Overrides:
keyDown in class Component
 o setMode
 public void setMode(Mode mode)
 o setMode
 public void setMode(String smode)
 o getMode
 public Mode getMode()

All Packages  Class Hierarchy  This Package  Previous  Next  Index