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
Constructors -
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.booleanGets if cursor is visible.voidresize(int rows, int columns) Resize a screen.voidsetCursorPosition(Position cursorPosition) Sets a cursor position.voidsetShowCursor(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:ScreenGets a new instance of aScreen.WriterBuilder.- Specified by:
writerBuilderin interfaceScreen- Returns:
- a new writer builder
-
setShowCursor
public void setShowCursor(boolean showCursor) Description copied from interface:ScreenSets if cursor should be visible.- Specified by:
setShowCursorin interfaceScreen- Parameters:
showCursor- true if cursor should be visible
-
isShowCursor
public boolean isShowCursor()Description copied from interface:ScreenGets if cursor is visible.- Specified by:
isShowCursorin interfaceScreen- Returns:
- true if cursor is visible
-
setCursorPosition
Description copied from interface:ScreenSets a cursor position.- Specified by:
setCursorPositionin interfaceScreen- Parameters:
cursorPosition- new cursor position
-
getCursorPosition
Description copied from interface:ScreenGets a cursor position.- Specified by:
getCursorPositionin interfaceScreen- Returns:
- cursor position
-
resize
public void resize(int rows, int columns) Description copied from interface:ScreenResize a screen. -
getItems
Description copied from interface:ScreenGets a screen items. -
clip
Description copied from interface:ScreenClip a screen with a given bounds. -
getScreenLines
Description copied from interface:DisplayLinesGets a list of screen lines.- Specified by:
getScreenLinesin interfaceDisplayLines- Returns:
- list of screen lines
-
getScreenItems
-