Class DefaultScreen
java.lang.Object
org.springframework.shell.component.view.screen.DefaultScreen
- All Implemented Interfaces:
DisplayLines
,Screen
Default implementation of a
Screen
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.shell.component.view.screen.Screen
Screen.Writer, Screen.WriterBuilder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclip
(int x, int y, int width, int height) Clip a screen with a given bounds.Gets a cursor position.ScreenItem[][]
getItems()
Gets a screen items.ScreenItem[][]
List<org.jline.utils.AttributedString>
Gets a list of screen lines.boolean
Gets if cursor is visible.void
resize
(int rows, int columns) Resize a screen.void
setCursorPosition
(Position cursorPosition) Sets a cursor position.void
setShowCursor
(boolean showCursor) Sets if cursor should be visible.Gets a new instance of aScreen.WriterBuilder
.
-
Constructor Details
-
DefaultScreen
public DefaultScreen() -
DefaultScreen
public DefaultScreen(int rows, int columns)
-
-
Method Details
-
writerBuilder
Description copied from interface:Screen
Gets a new instance of aScreen.WriterBuilder
.- Specified by:
writerBuilder
in interfaceScreen
- Returns:
- a new writer builder
-
setShowCursor
public void setShowCursor(boolean showCursor) Description copied from interface:Screen
Sets if cursor should be visible.- Specified by:
setShowCursor
in interfaceScreen
- Parameters:
showCursor
- true if cursor should be visible
-
isShowCursor
public boolean isShowCursor()Description copied from interface:Screen
Gets if cursor is visible.- Specified by:
isShowCursor
in interfaceScreen
- Returns:
- true if cursor is visible
-
setCursorPosition
Description copied from interface:Screen
Sets a cursor position.- Specified by:
setCursorPosition
in interfaceScreen
- Parameters:
cursorPosition
- new cursor position
-
getCursorPosition
Description copied from interface:Screen
Gets a cursor position.- Specified by:
getCursorPosition
in interfaceScreen
- Returns:
- cursor position
-
resize
public void resize(int rows, int columns) Description copied from interface:Screen
Resize a screen. -
getItems
Description copied from interface:Screen
Gets a screen items. -
clip
Description copied from interface:Screen
Clip a screen with a given bounds. -
getScreenLines
Description copied from interface:DisplayLines
Gets a list of screen lines.- Specified by:
getScreenLines
in interfaceDisplayLines
- Returns:
- list of screen lines
-
getScreenItems
-