Class WebTerminal.WebTerminalComponent

java.lang.Object
org.jline.utils.ScreenTerminal
org.jline.builtins.WebTerminal.WebTerminalComponent
All Implemented Interfaces:
org.jline.terminal.Sized
Enclosing class:
WebTerminal

public static class WebTerminal.WebTerminalComponent extends org.jline.utils.ScreenTerminal
The inner WebTerminalComponent that contains the original ScreenTerminal-based implementation. This is the inner class that contains the original ScreenTerminal-based implementation.
  • Field Summary

    Fields inherited from class org.jline.utils.ScreenTerminal

    MAX_SIZE, MIN_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
    WebTerminalComponent(int columns, int rows)
    Creates a new WebTerminalComponent with the specified dimensions.
  • Method Summary

    Modifier and Type
    Method
    Description
    pipe(String input)
    Reads and processes input through the terminal.
    boolean
    setSize(int columns, int rows)
    Deprecated.
    Use ScreenTerminal.setSize(Sized) instead.
    void
    Sets the web terminal reference after construction to avoid this-escape issues.
    boolean
    write(String text)
    Writes text to the terminal.

    Methods inherited from class org.jline.utils.ScreenTerminal

    cellAttr, cellBackground, cellBold, cellCodePoint, cellColorRgb, cellConceal, cellDim, cellForeground, cellHasBackground, cellHasForeground, cellInverse, cellItalic, cellUnderline, dump, dump, dump, dump, dump, dump, getColumns, getHeight, getHistory, getHistorySize, getRows, getWidth, isDirty, read, setDirty, setSize, toString, waitDirty, waitDirty, write

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WebTerminalComponent

      public WebTerminalComponent(int columns, int rows)
      Creates a new WebTerminalComponent with the specified dimensions.
      Parameters:
      columns - the number of columns
      rows - the number of rows
  • Method Details

    • setWebTerminal

      public void setWebTerminal(WebTerminal webTerminal)
      Sets the web terminal reference after construction to avoid this-escape issues.
      Parameters:
      webTerminal - the WebTerminal instance
    • write

      public boolean write(String text)
      Writes text to the terminal.
      Parameters:
      text - the text to write
      Returns:
      true if successful
    • pipe

      public String pipe(String input)
      Reads and processes input through the terminal. Delegates to the ScreenTerminal pipe method which handles all special key sequences and terminal modes.
      Overrides:
      pipe in class org.jline.utils.ScreenTerminal
      Parameters:
      input - the input to process
      Returns:
      the processed input
    • setSize

      @Deprecated public boolean setSize(int columns, int rows)
      Deprecated.
      Use ScreenTerminal.setSize(Sized) instead.
      Set the terminal size to the given columns and rows if they are within allowed bounds.
      Overrides:
      setSize in class org.jline.utils.ScreenTerminal
      Parameters:
      columns - the new number of columns; must be between 10 and 200 inclusive
      rows - the new number of rows; must be between 5 and 100 inclusive
      Returns:
      true if the size was applied, false if the provided dimensions are out of range