Interface ITerminalConsole

All Superinterfaces:
com.vaadin.flow.component.HasElement, Serializable
All Known Implementing Classes:
XTerm

public interface ITerminalConsole extends com.vaadin.flow.component.HasElement
Add console support to XTerm. This provides handling of cursor, home/end, insert, delete and backspace keys, as well as a line event.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.vaadin.flow.shared.Registration
    addLineListener(com.vaadin.flow.component.ComponentEventListener<ITerminalConsole.LineEvent> listener)
    Adds a line listener.
    Returns the text in the current line
    default String
    Returns the command line prompt.
    default void
    setInsertMode(boolean insertMode)
    Set the insert mode.
    default void
    setPrompt(String prompt)
    Sets the command line prompt.
    default void
    Writes the command line prompt to the terminal.

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement
  • Method Details

    • addLineListener

      default com.vaadin.flow.shared.Registration addLineListener(com.vaadin.flow.component.ComponentEventListener<ITerminalConsole.LineEvent> listener)
      Adds a line listener. The listener is called when a line feed is intered in the console.
    • setInsertMode

      default void setInsertMode(boolean insertMode)
      Set the insert mode.
    • getCurrentLine

      default CompletableFuture<String> getCurrentLine()
      Returns the text in the current line
    • setPrompt

      default void setPrompt(String prompt)
      Sets the command line prompt.
    • getPrompt

      default String getPrompt()
      Returns the command line prompt.
    • writePrompt

      default void writePrompt()
      Writes the command line prompt to the terminal.