Class TextConsole

All Implemented Interfaces:
RMTypes, TextTypes, DropTargetListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, CharSequence, EventListener, Scrollable

public class TextConsole extends TextArea
A text area subclass for consoles.
See Also:
  • Constructor Details

    • TextConsole

      public TextConsole()
  • Method Details

    • getPrompt

      public String getPrompt()
      Returns the prompt.
    • setPrompt

      public void setPrompt(String aPrompt)
      Sets the prompt.
    • getInputLocation

      public int getInputLocation()
      Returns the location of the end of the last text appended to console.
    • processEnterAction

      public void processEnterAction()
      Called when enter is hit.
    • append

      public void append(String aString)
      Appends a string.
      Overrides:
      append in class TextArea
    • getInput

      public String getInput()
      Gets input String from console starting at current input location.
    • executeCommand

      public String executeCommand(String aCommand)
      Executes command.
    • executeCommandImpl

      protected String executeCommandImpl(String aCommand)
      Executes command.
    • executeHelp

      public String executeHelp(String aCommand)
      Execute a help command.
    • executePrint

      public String executePrint(String aCommand)
      Executes a print command.
    • clearConsole

      public void clearConsole()
      Clears the console.
    • setCommandHistoryPrevious

      public void setCommandHistoryPrevious()
      Sets a command from history.
    • setCommandHistoryNext

      public void setCommandHistoryNext()
      Sets a command from history.
    • processKeyEvent

      public void processKeyEvent(KeyEvent anEvent)
      Handles key events.
      Overrides:
      processKeyEvent in class JComponent