Class AeshConsoleBuffer

java.lang.Object
org.aesh.readline.AeshConsoleBuffer
All Implemented Interfaces:
ConsoleBuffer

public class AeshConsoleBuffer extends Object implements ConsoleBuffer
Author:
Ståle W. Pedersen invalid input: '<'stale.pedersen@jboss.org>
  • Constructor Details

  • Method Details

    • history

      public History history()
      Specified by:
      history in interface ConsoleBuffer
      Returns:
      history
    • completer

      public CompletionHandler completer()
      Specified by:
      completer in interface ConsoleBuffer
      Returns:
      CompletionHandler
    • setSize

      public void setSize(org.aesh.terminal.tty.Size size)
      Specified by:
      setSize in interface ConsoleBuffer
      Parameters:
      size - specify new size
    • size

      public org.aesh.terminal.tty.Size size()
      Specified by:
      size in interface ConsoleBuffer
      Returns:
      size
    • buffer

      public Buffer buffer()
      Specified by:
      buffer in interface ConsoleBuffer
      Returns:
      buffer
    • undoManager

      public UndoManager undoManager()
      Specified by:
      undoManager in interface ConsoleBuffer
      Returns:
      UndoManager
    • addActionToUndoStack

      public void addActionToUndoStack()
      Description copied from interface: ConsoleBuffer
      Will add the current action to the undo stack
      Specified by:
      addActionToUndoStack in interface ConsoleBuffer
    • pasteManager

      public PasteManager pasteManager()
      Specified by:
      pasteManager in interface ConsoleBuffer
      Returns:
      PasteManager
    • moveCursor

      public void moveCursor(int where)
      Description copied from interface: ConsoleBuffer
      Move the cursor either back or forth. Boundary checks will be done to make sure that the cursor do not go OB.
      Specified by:
      moveCursor in interface ConsoleBuffer
      Parameters:
      where - < 0 move back, where > 0 move forward
    • drawLine

      public void drawLine()
      Description copied from interface: ConsoleBuffer
      Print the contents of the current buffer to the console
      Specified by:
      drawLine in interface ConsoleBuffer
    • drawLineForceDisplay

      public void drawLineForceDisplay()
      Description copied from interface: ConsoleBuffer
      Force a rewrite of the prompt even though it might not be needed
      Specified by:
      drawLineForceDisplay in interface ConsoleBuffer
    • writeChar

      public void writeChar(char input)
      Specified by:
      writeChar in interface ConsoleBuffer
      Parameters:
      input - char to write to the Buffer
    • writeOut

      public void writeOut(String out)
      Specified by:
      writeOut in interface ConsoleBuffer
      Parameters:
      out - write directly to the Connection output stream
    • writeOut

      public void writeOut(int[] out)
      Specified by:
      writeOut in interface ConsoleBuffer
      Parameters:
      out - write directly to the Connection output stream
    • writeChars

      public void writeChars(int[] input)
      Specified by:
      writeChars in interface ConsoleBuffer
      Parameters:
      input - write to the Buffer
    • writeString

      public void writeString(String input)
      Specified by:
      writeString in interface ConsoleBuffer
      Parameters:
      input - write to the Buffer
    • setPrompt

      public void setPrompt(Prompt prompt)
      Description copied from interface: ConsoleBuffer
      Specify the prompt
      Specified by:
      setPrompt in interface ConsoleBuffer
      Parameters:
      prompt - new prompt
    • insert

      public void insert(String insert, int position)
      Description copied from interface: ConsoleBuffer
      Insert a String into the buffer at a specific point
      Specified by:
      insert in interface ConsoleBuffer
      Parameters:
      insert - input
      position - point in the buffer
    • insert

      public void insert(int[] insert)
      Description copied from interface: ConsoleBuffer
      Insert at the end of the Buffer
      Specified by:
      insert in interface ConsoleBuffer
      Parameters:
      insert - data
    • delete

      public void delete(int delta)
      Description copied from interface: ConsoleBuffer
      Delete from cursor position back or forth depending on the value of delta. Delta < 0 delete backwards, delta > 0 delete forwards.
      Specified by:
      delete in interface ConsoleBuffer
      Parameters:
      delta - specify which direction and how far to delete
    • upCase

      public void upCase()
      Description copied from interface: ConsoleBuffer
      Up case the char located at the cursor position
      Specified by:
      upCase in interface ConsoleBuffer
    • downCase

      public void downCase()
      Description copied from interface: ConsoleBuffer
      Down case the char located at the cursor position
      Specified by:
      downCase in interface ConsoleBuffer
    • changeCase

      public void changeCase()
      Description copied from interface: ConsoleBuffer
      Change case on the char located at the cursor position
      Specified by:
      changeCase in interface ConsoleBuffer
    • replace

      public void replace(int[] line)
      Description copied from interface: ConsoleBuffer
      Replace the entire current buffer with the given line The new line will be pushed to the Connection Cursor will be moved to the end of the new buffer line
      Specified by:
      replace in interface ConsoleBuffer
      Parameters:
      line - input
    • replace

      public void replace(String line)
      Description copied from interface: ConsoleBuffer
      Replace the entire current buffer with the given line The new line will be pushed to the Connection Cursor will be moved to the end of the new buffer line
      Specified by:
      replace in interface ConsoleBuffer
      Parameters:
      line - input
    • reset

      public void reset()
      Description copied from interface: ConsoleBuffer
      Clear all content in the Buffer and reset all data
      Specified by:
      reset in interface ConsoleBuffer
    • clear

      public void clear(boolean includeBuffer)
      Description copied from interface: ConsoleBuffer
      Clear an ansi terminal. Set includeBuffer to true if the current buffer should be printed again after clear.
      Specified by:
      clear in interface ConsoleBuffer
      Parameters:
      includeBuffer - if true include the current buffer line