public class AeshConsoleBuffer extends Object implements ConsoleBuffer
Modifier and Type | Method and Description |
---|---|
void |
addActionToUndoStack()
Add current text and cursor position to the undo stack
|
void |
capitalizeWord() |
void |
changeCase()
Switch case if the character is a letter
|
void |
changeOutputBuffer(PrintStream output) |
void |
clear(boolean includeBuffer)
Clear an ansi terminal.
|
void |
displayPrompt() |
void |
drawLine() |
void |
drawLine(boolean keepCursorPosition) |
PrintStream |
err() |
Buffer |
getBuffer() |
EditMode |
getEditMode() |
PasteManager |
getPasteManager() |
UndoManager |
getUndoManager() |
void |
insertBufferLine(String insert,
int position) |
boolean |
isPrompted() |
void |
lowerCaseWord() |
void |
moveCursor(int where) |
PrintStream |
out() |
boolean |
paste(int index,
boolean before)
Paste previous yanked word/char either before or on the cursor position
|
boolean |
performAction(EditAction action)
Perform the designated action created by an event
|
void |
replace(int rChar) |
void |
setBufferLine(String newLine) |
void |
setEditMode(EditMode editMode) |
void |
setPrompt(Prompt prompt) |
void |
setPrompted(boolean prompted) |
void |
syncCursor() |
void |
updateCurrentAction(Action action) |
void |
updatePrompt(Prompt prompt) |
void |
upperCaseWord() |
void |
writeChar(char c) |
void |
writeChars(int[] chars) |
void |
writeString(String input) |
public Buffer getBuffer()
getBuffer
in interface ConsoleBuffer
public PrintStream out()
out
in interface ConsoleBuffer
public PrintStream err()
err
in interface ConsoleBuffer
public void changeOutputBuffer(PrintStream output)
changeOutputBuffer
in interface ConsoleBuffer
public void setEditMode(EditMode editMode)
setEditMode
in interface ConsoleBuffer
public UndoManager getUndoManager()
getUndoManager
in interface ConsoleBuffer
public PasteManager getPasteManager()
getPasteManager
in interface ConsoleBuffer
public EditMode getEditMode()
getEditMode
in interface ConsoleBuffer
public void moveCursor(int where)
moveCursor
in interface ConsoleBuffer
public void drawLine()
drawLine
in interface ConsoleBuffer
public void drawLine(boolean keepCursorPosition)
drawLine
in interface ConsoleBuffer
public void updateCurrentAction(Action action)
updateCurrentAction
in interface ConsoleBuffer
public void syncCursor()
syncCursor
in interface ConsoleBuffer
public void replace(int rChar)
replace
in interface ConsoleBuffer
public void changeCase()
ConsoleBuffer
changeCase
in interface ConsoleBuffer
public void capitalizeWord()
capitalizeWord
in interface ConsoleBuffer
public void lowerCaseWord()
lowerCaseWord
in interface ConsoleBuffer
public void upperCaseWord()
upperCaseWord
in interface ConsoleBuffer
public void writeChars(int[] chars)
writeChars
in interface ConsoleBuffer
public void writeString(String input)
writeString
in interface ConsoleBuffer
public void writeChar(char c)
writeChar
in interface ConsoleBuffer
public void displayPrompt()
displayPrompt
in interface ConsoleBuffer
public void setPrompt(Prompt prompt)
setPrompt
in interface ConsoleBuffer
public void updatePrompt(Prompt prompt)
updatePrompt
in interface ConsoleBuffer
public void setBufferLine(String newLine)
setBufferLine
in interface ConsoleBuffer
public void insertBufferLine(String insert, int position)
insertBufferLine
in interface ConsoleBuffer
public boolean performAction(EditAction action) throws IOException
ConsoleBuffer
performAction
in interface ConsoleBuffer
action
- console actionIOException
- streampublic boolean paste(int index, boolean before)
paste
in interface ConsoleBuffer
index
- which yank indexbefore
- cursorpublic void addActionToUndoStack()
addActionToUndoStack
in interface ConsoleBuffer
public void clear(boolean includeBuffer)
clear
in interface ConsoleBuffer
includeBuffer
- if true include the current buffer linepublic boolean isPrompted()
isPrompted
in interface ConsoleBuffer
public void setPrompted(boolean prompted)
setPrompted
in interface ConsoleBuffer
Copyright © 2016 JBoss by Red Hat. All rights reserved.