Module com.googlecode.lanterna
Package com.googlecode.lanterna.screen
Class VirtualScreen.DefaultFrameRenderer
java.lang.Object
com.googlecode.lanterna.screen.VirtualScreen.DefaultFrameRenderer
- All Implemented Interfaces:
VirtualScreen.FrameRenderer
- Enclosing class:
VirtualScreen
private static class VirtualScreen.DefaultFrameRenderer
extends Object
implements VirtualScreen.FrameRenderer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
drawFrame
(TextGraphics graphics, TerminalSize realSize, TerminalSize virtualSize, TerminalPosition virtualScrollPosition) Drawn the 'frame', meaning anything that is outside the viewport (title, scrollbar, etc)Where in the virtual screen should the top-left position of the viewport be? To draw the viewport from the top-left position of the screen, return 0x0 (or TerminalPosition.TOP_LEFT_CORNER) here.getViewportSize
(TerminalSize realSize, TerminalSize virtualSize) Given the size of the real terminal and the current size of the virtual screen, how large should the viewport where the screen content is drawn be?
-
Constructor Details
-
DefaultFrameRenderer
private DefaultFrameRenderer()
-
-
Method Details
-
getViewportSize
Description copied from interface:VirtualScreen.FrameRenderer
Given the size of the real terminal and the current size of the virtual screen, how large should the viewport where the screen content is drawn be?- Specified by:
getViewportSize
in interfaceVirtualScreen.FrameRenderer
- Parameters:
realSize
- Size of the real terminalvirtualSize
- Size of the virtual screen- Returns:
- Size of the viewport, according to this FrameRenderer
-
getViewportOffset
Description copied from interface:VirtualScreen.FrameRenderer
Where in the virtual screen should the top-left position of the viewport be? To draw the viewport from the top-left position of the screen, return 0x0 (or TerminalPosition.TOP_LEFT_CORNER) here.- Specified by:
getViewportOffset
in interfaceVirtualScreen.FrameRenderer
- Returns:
- Position of the top-left corner of the viewport inside the screen
-
drawFrame
public void drawFrame(TextGraphics graphics, TerminalSize realSize, TerminalSize virtualSize, TerminalPosition virtualScrollPosition) Description copied from interface:VirtualScreen.FrameRenderer
Drawn the 'frame', meaning anything that is outside the viewport (title, scrollbar, etc)- Specified by:
drawFrame
in interfaceVirtualScreen.FrameRenderer
- Parameters:
graphics
- Graphics to use to text drawing operationsrealSize
- Size of the real terminalvirtualSize
- Size of the virtual screenvirtualScrollPosition
- If the virtual screen is larger than the real terminal, this is the current scroll offset the VirtualScreen is using
-