Class TerminalHistory
java.lang.Object
com.flowingcode.vaadin.addons.xterm.TerminalHistory
- All Implemented Interfaces:
Serializable
Manages a command history buffer for
XTerm.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a line to the historyvoidclear()Clears the history.static <T extends XTermBase & ITerminalConsole>
voidAdds support for command history to the given terminal.getLines()Returns the lines in the history.booleanGets the enabled state of the history.static <T extends XTermBase & ITerminalConsole>
TerminalHistoryof(T xterm) Returns the command history of the terminal.voidsetEnabled(boolean enabled) Sets the enabled state of the history.voidsetMaxSize(Integer maxSize) Set the number of elements to retain.
-
Constructor Details
-
TerminalHistory
protected TerminalHistory(T terminal)
-
-
Method Details
-
of
Returns the command history of the terminal. -
extend
Adds support for command history to the given terminal. -
setMaxSize
Set the number of elements to retain. Ifnullthe history is unbounded.- Throws:
IllegalArgumentException- if the argument is negative.
-
setEnabled
public void setEnabled(boolean enabled) Sets the enabled state of the history. -
isEnabled
public boolean isEnabled()Gets the enabled state of the history. -
add
Add a line to the history -
clear
public void clear()Clears the history. -
getLines
Returns the lines in the history.
-