Module com.googlecode.lanterna
Package com.googlecode.lanterna.screen
Class TerminalScreen.TerminalScreenResizeListener
java.lang.Object
com.googlecode.lanterna.screen.TerminalScreen.TerminalScreenResizeListener
- All Implemented Interfaces:
TerminalResizeListener
- Enclosing class:
TerminalScreen
private class TerminalScreen.TerminalScreenResizeListener
extends Object
implements TerminalResizeListener
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
onResized
(Terminal terminal, TerminalSize newSize) The terminal has changed its size, most likely because the user has resized the window.
-
Constructor Details
-
TerminalScreenResizeListener
private TerminalScreenResizeListener()
-
-
Method Details
-
onResized
Description copied from interface:TerminalResizeListener
The terminal has changed its size, most likely because the user has resized the window. This callback is invoked by something inside the lanterna library, it could be a signal handler thread, it could be the AWT thread, it could be something else, so please be careful with what kind of operation you do in here. Also, make sure not to take too long before returning. Best practice would be to update an internal status in your program to mark that the terminal has been resized (possibly along with the new size) and then in your main loop you deal with this at the beginning of each redraw.- Specified by:
onResized
in interfaceTerminalResizeListener
- Parameters:
terminal
- Terminal that was resizednewSize
- Size of the terminal after the resize
-