public class TerminalHistory extends Object implements Serializable
XTerm.| Modifier | Constructor and Description |
|---|---|
protected |
TerminalHistory(T terminal) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String line)
Add a line to the history
|
void |
clear()
Clears the history.
|
static <T extends XTermBase & ITerminalConsole> |
extend(XTerm xterm)
Adds support for command history to the given terminal.
|
List<String> |
getLines()
Returns the lines in the history.
|
boolean |
isEnabled()
Gets the enabled state of the history.
|
static <T extends XTermBase & ITerminalConsole> |
of(T xterm)
Returns the command history of the terminal.
|
void |
setEnabled(boolean enabled)
Sets the enabled state of the history.
|
void |
setMaxSize(Integer maxSize)
Set the number of elements to retain.
|
public static <T extends XTermBase & ITerminalConsole> TerminalHistory of(T xterm)
public static <T extends XTermBase & ITerminalConsole> void extend(XTerm xterm)
public void setMaxSize(Integer maxSize)
null the history is unbounded.IllegalArgumentException - if the argument is negative.public void setEnabled(boolean enabled)
public boolean isEnabled()
public void add(String line)
public void clear()
Copyright © 2020–2021 Flowing Code. All rights reserved.