Interface Screen
- All Known Implementing Classes:
DefaultScreen
public interface Screen
Screen is representing a virtual area which is sitting between a user
and lower level jline terminal providing convenient methods working
with visible content.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface to write into aScreen.static interfaceBuilder interface for aScreen.Writer. -
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.booleanGets if cursor is visible.voidresize(int rows, int columns) Resize a screen.voidsetCursorPosition(Position position) Sets a cursor position.voidsetShowCursor(boolean show) Sets if cursor should be visible.Gets a new instance of aScreen.WriterBuilder.
-
Method Details
-
setShowCursor
void setShowCursor(boolean show) Sets if cursor should be visible.- Parameters:
show- true if cursor should be visible
-
isShowCursor
boolean isShowCursor()Gets if cursor is visible.- Returns:
- true if cursor is visible
-
setCursorPosition
Sets a cursor position.- Parameters:
position- new cursor position
-
getCursorPosition
Position getCursorPosition()Gets a cursor position.- Returns:
- cursor position
-
writerBuilder
Screen.WriterBuilder writerBuilder()Gets a new instance of aScreen.WriterBuilder.- Returns:
- a new writer builder
-
resize
void resize(int rows, int columns) Resize a screen.- Parameters:
rows- the new row countcolumns- the new column count
-
getItems
ScreenItem[][] getItems()Gets a screen items.- Returns:
- a screen items
-
clip
Clip a screen with a given bounds.- Parameters:
x- the x coordinatey- the y coordinatewidth- the widthheight- the height- Returns:
- new clipped screen
-