Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jline.utils.ScreenTerminal

        org.jline.utils.ScreenTerminal.VirtualTerminal
    • 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

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.lang.String pipe​(java.lang.String input)
      Reads and processes input through the terminal.
      boolean setSize​(int columns, int rows)
      Deprecated.
      Use ScreenTerminal.setSize(Sized) instead.
      void setWebTerminal​(WebTerminal webTerminal)
      Sets the web terminal reference after construction to avoid this-escape issues.
      boolean write​(java.lang.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, isSynchronizedOutput, read, setDirty, setSize, toString, waitDirty, waitDirty, wireTerminal, wireTerminal, withTerminal, write
      • Methods inherited from class java.lang.Object

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

      • 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 Detail

      • 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​(java.lang.String text)
        Writes text to the terminal.
        Parameters:
        text - the text to write
        Returns:
        true if successful
      • pipe

        public java.lang.String pipe​(java.lang.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