Package org.jline.builtins
Class WebTerminal.WebTerminalComponent
java.lang.Object
org.jline.builtins.ScreenTerminal
org.jline.builtins.WebTerminal.WebTerminalComponent
- All Implemented Interfaces:
Sized
- Enclosing class:
WebTerminal
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.builtins.ScreenTerminal
MAX_SIZE, MIN_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionWebTerminalComponent(int columns, int rows) Creates a new WebTerminalComponent with the specified dimensions. -
Method Summary
Modifier and TypeMethodDescriptionReads and processes input through the terminal.booleansetSize(int columns, int rows) Deprecated.voidsetWebTerminal(WebTerminal webTerminal) Sets the web terminal reference after construction to avoid this-escape issues.booleanWrites text to the terminal.
-
Constructor Details
-
WebTerminalComponent
public WebTerminalComponent(int columns, int rows) Creates a new WebTerminalComponent with the specified dimensions.- Parameters:
columns- the number of columnsrows- the number of rows
-
-
Method Details
-
setWebTerminal
Sets the web terminal reference after construction to avoid this-escape issues.- Parameters:
webTerminal- the WebTerminal instance
-
write
Writes text to the terminal.- Parameters:
text- the text to write- Returns:
- true if successful
-
pipe
Reads and processes input through the terminal. Delegates to the ScreenTerminal pipe method which handles all special key sequences and terminal modes.- Overrides:
pipein classScreenTerminal- Parameters:
input- the input to process- Returns:
- the processed input
-
setSize
Deprecated.UseScreenTerminal.setSize(Sized)instead.Set the terminal size to the given columns and rows if they are within allowed bounds.- Overrides:
setSizein classScreenTerminal- Parameters:
columns- the new number of columns; must be between 10 and 200 inclusiverows- 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
-
ScreenTerminal.setSize(Sized)instead.