Class JediTerminal
java.lang.Object
org.springframework.shell.test.jediterm.terminal.model.JediTerminal
- All Implemented Interfaces:
Terminal
,TerminalCoordinates
Terminal that reflects obtained commands and text at
TerminalDisplay
(handles change of cursor position, screen size etc)
and TerminalTextBuffer
(stores printed text)-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionJediTerminal
(TerminalDisplay display, TerminalTextBuffer buf, StyleState initialStyleState) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
beep()
void
void
characterAttributes
(TextStyle textStyle) void
void
clearLines
(int beginY, int endY) void
void
void
crnl()
void
cursorBackward
(int dX) void
cursorDown
(int dY) void
cursorForward
(int dX) void
cursorHorizontalAbsolute
(int x) void
cursorPosition
(int x, int y) void
cursorShape
(CursorShape shape) void
cursorUp
(int countY) void
deleteCharacters
(int count) void
deleteLines
(int count) void
designateCharacterSet
(int tableNumber, char charset) void
deviceAttributes
(byte[] response) void
deviceStatusReport
(String str) void
int
void
eraseCharacters
(int count) void
eraseInDisplay
(int arg) void
eraseInLine
(int arg) void
fillScreen
(char c) int
int
int
int
int
getX()
int
getY()
void
void
index()
void
insertBlankCharacters
(int count) void
insertLines
(int count) boolean
boolean
void
linePositionAbsolute
(int y) void
mapCharsetToGL
(int num) void
mapCharsetToGR
(int num) void
newLine()
void
nextLine()
void
reset()
void
void
resize
(int width, int height, RequestOrigin origin) void
resize
(int width, int height, RequestOrigin origin, CompletableFuture<?> promptUpdated) void
void
restoreCursor
(StoredCursor storedCursor) void
void
void
void
void
scrollDown
(int count) void
scrollUp
(int count) void
scrollY()
void
setAltSendsEscape
(boolean enabled) void
setAnsiConformanceLevel
(int level) void
setApplicationArrowKeys
(boolean enabled) void
setApplicationKeypad
(boolean enabled) void
setAutoNewLine
(boolean enabled) void
setBlinkingCursor
(boolean enabled) void
setBracketedPasteMode
(boolean enabled) void
setCursorVisible
(boolean visible) void
setModeEnabled
(TerminalMode mode, boolean enabled) void
setScrollingRegion
(int top, int bottom) void
void
setTerminalOutput
(TerminalOutputStream terminalOutput) void
setWindowTitle
(String name) void
setX
(int x) void
setY
(int y) void
singleShiftSelect
(int num) void
useAlternateBuffer
(boolean enabled) void
writeCharacters
(String string) void
writeDoubleByte
(char[] bytesOfChar) void
void
writeUnwrappedString
(String string)
-
Constructor Details
-
JediTerminal
-
-
Method Details
-
setModeEnabled
- Specified by:
setModeEnabled
in interfaceTerminal
-
disconnected
public void disconnected()- Specified by:
disconnected
in interfaceTerminal
-
writeCharacters
- Specified by:
writeCharacters
in interfaceTerminal
-
writeDoubleByte
- Specified by:
writeDoubleByte
in interfaceTerminal
- Throws:
UnsupportedEncodingException
-
writeUnwrappedString
- Specified by:
writeUnwrappedString
in interfaceTerminal
-
scrollY
public void scrollY() -
crnl
public void crnl() -
newLine
public void newLine() -
mapCharsetToGL
public void mapCharsetToGL(int num) - Specified by:
mapCharsetToGL
in interfaceTerminal
-
mapCharsetToGR
public void mapCharsetToGR(int num) - Specified by:
mapCharsetToGR
in interfaceTerminal
-
designateCharacterSet
public void designateCharacterSet(int tableNumber, char charset) - Specified by:
designateCharacterSet
in interfaceTerminal
-
singleShiftSelect
public void singleShiftSelect(int num) - Specified by:
singleShiftSelect
in interfaceTerminal
-
setAnsiConformanceLevel
public void setAnsiConformanceLevel(int level) - Specified by:
setAnsiConformanceLevel
in interfaceTerminal
-
setWindowTitle
- Specified by:
setWindowTitle
in interfaceTerminal
-
saveWindowTitleOnStack
public void saveWindowTitleOnStack()- Specified by:
saveWindowTitleOnStack
in interfaceTerminal
-
restoreWindowTitleFromStack
public void restoreWindowTitleFromStack()- Specified by:
restoreWindowTitleFromStack
in interfaceTerminal
-
backspace
public void backspace() -
carriageReturn
public void carriageReturn()- Specified by:
carriageReturn
in interfaceTerminal
-
horizontalTab
public void horizontalTab()- Specified by:
horizontalTab
in interfaceTerminal
-
eraseInDisplay
public void eraseInDisplay(int arg) - Specified by:
eraseInDisplay
in interfaceTerminal
-
clearLines
public void clearLines(int beginY, int endY) -
clearScreen
public void clearScreen()- Specified by:
clearScreen
in interfaceTerminal
-
setCursorVisible
public void setCursorVisible(boolean visible) - Specified by:
setCursorVisible
in interfaceTerminal
-
useAlternateBuffer
public void useAlternateBuffer(boolean enabled) - Specified by:
useAlternateBuffer
in interfaceTerminal
-
setApplicationArrowKeys
public void setApplicationArrowKeys(boolean enabled) - Specified by:
setApplicationArrowKeys
in interfaceTerminal
-
setApplicationKeypad
public void setApplicationKeypad(boolean enabled) - Specified by:
setApplicationKeypad
in interfaceTerminal
-
setAutoNewLine
public void setAutoNewLine(boolean enabled) - Specified by:
setAutoNewLine
in interfaceTerminal
-
eraseInLine
public void eraseInLine(int arg) - Specified by:
eraseInLine
in interfaceTerminal
-
deleteCharacters
public void deleteCharacters(int count) - Specified by:
deleteCharacters
in interfaceTerminal
-
insertBlankCharacters
public void insertBlankCharacters(int count) - Specified by:
insertBlankCharacters
in interfaceTerminal
-
eraseCharacters
public void eraseCharacters(int count) - Specified by:
eraseCharacters
in interfaceTerminal
-
clearTabStopAtCursor
public void clearTabStopAtCursor()- Specified by:
clearTabStopAtCursor
in interfaceTerminal
-
clearAllTabStops
public void clearAllTabStops()- Specified by:
clearAllTabStops
in interfaceTerminal
-
setTabStopAtCursor
public void setTabStopAtCursor()- Specified by:
setTabStopAtCursor
in interfaceTerminal
-
insertLines
public void insertLines(int count) - Specified by:
insertLines
in interfaceTerminal
-
deleteLines
public void deleteLines(int count) - Specified by:
deleteLines
in interfaceTerminal
-
setBlinkingCursor
public void setBlinkingCursor(boolean enabled) - Specified by:
setBlinkingCursor
in interfaceTerminal
-
cursorUp
public void cursorUp(int countY) -
cursorDown
public void cursorDown(int dY) - Specified by:
cursorDown
in interfaceTerminal
-
index
public void index() -
nextLine
public void nextLine() -
reverseIndex
public void reverseIndex()- Specified by:
reverseIndex
in interfaceTerminal
-
cursorForward
public void cursorForward(int dX) - Specified by:
cursorForward
in interfaceTerminal
-
cursorBackward
public void cursorBackward(int dX) - Specified by:
cursorBackward
in interfaceTerminal
-
cursorShape
- Specified by:
cursorShape
in interfaceTerminal
-
cursorHorizontalAbsolute
public void cursorHorizontalAbsolute(int x) - Specified by:
cursorHorizontalAbsolute
in interfaceTerminal
-
linePositionAbsolute
public void linePositionAbsolute(int y) - Specified by:
linePositionAbsolute
in interfaceTerminal
-
cursorPosition
public void cursorPosition(int x, int y) - Specified by:
cursorPosition
in interfaceTerminal
-
setScrollingRegion
public void setScrollingRegion(int top, int bottom) - Specified by:
setScrollingRegion
in interfaceTerminal
-
scrollUp
public void scrollUp(int count) -
scrollDown
public void scrollDown(int count) - Specified by:
scrollDown
in interfaceTerminal
-
resetScrollRegions
public void resetScrollRegions()- Specified by:
resetScrollRegions
in interfaceTerminal
-
characterAttributes
- Specified by:
characterAttributes
in interfaceTerminal
-
beep
public void beep() -
distanceToLineEnd
public int distanceToLineEnd()- Specified by:
distanceToLineEnd
in interfaceTerminal
-
saveCursor
public void saveCursor()- Specified by:
saveCursor
in interfaceTerminal
-
restoreCursor
public void restoreCursor()- Specified by:
restoreCursor
in interfaceTerminal
-
restoreCursor
-
reset
public void reset() -
isOriginMode
public boolean isOriginMode() -
isAutoWrap
public boolean isAutoWrap() -
setTerminalOutput
- Specified by:
setTerminalOutput
in interfaceTerminal
-
setAltSendsEscape
public void setAltSendsEscape(boolean enabled) - Specified by:
setAltSendsEscape
in interfaceTerminal
-
deviceStatusReport
- Specified by:
deviceStatusReport
in interfaceTerminal
-
deviceAttributes
public void deviceAttributes(byte[] response) - Specified by:
deviceAttributes
in interfaceTerminal
-
setBracketedPasteMode
public void setBracketedPasteMode(boolean enabled) - Specified by:
setBracketedPasteMode
in interfaceTerminal
-
getX
public int getX()- Specified by:
getX
in interfaceTerminalCoordinates
-
setX
public void setX(int x) - Specified by:
setX
in interfaceTerminalCoordinates
-
getY
public int getY()- Specified by:
getY
in interfaceTerminalCoordinates
-
setY
public void setY(int y) - Specified by:
setY
in interfaceTerminalCoordinates
-
writeString
-
resize
-
resize
-
fillScreen
public void fillScreen(char c) - Specified by:
fillScreen
in interfaceTerminal
-
getTerminalWidth
public int getTerminalWidth()- Specified by:
getTerminalWidth
in interfaceTerminal
-
getTerminalHeight
public int getTerminalHeight()- Specified by:
getTerminalHeight
in interfaceTerminal
-
getCursorX
public int getCursorX()- Specified by:
getCursorX
in interfaceTerminal
-
getCursorY
public int getCursorY()- Specified by:
getCursorY
in interfaceTerminal
-
getStyleState
- Specified by:
getStyleState
in interfaceTerminal
-