Class TerminalHistory

java.lang.Object
com.flowingcode.vaadin.addons.xterm.TerminalHistory
All Implemented Interfaces:
Serializable

public class TerminalHistory extends Object implements Serializable
Manages a command history buffer for XTerm.
See Also:
  • Constructor Details

    • TerminalHistory

      protected TerminalHistory(T terminal)
  • Method Details

    • of

      public static <T extends XTermBase & ITerminalConsole> TerminalHistory of(T xterm)
      Returns the command history of the terminal.
    • extend

      public static <T extends XTermBase & ITerminalConsole> void extend(XTerm xterm)
      Adds support for command history to the given terminal.
    • setMaxSize

      public void setMaxSize(Integer maxSize)
      Set the number of elements to retain. If null the 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

      public void add(String line)
      Add a line to the history
    • clear

      public void clear()
      Clears the history.
    • getLines

      public List<String> getLines()
      Returns the lines in the history.