Module com.googlecode.lanterna
Class FixedTerminalSizeProvider
java.lang.Object
com.googlecode.lanterna.terminal.ansi.FixedTerminalSizeProvider
- All Implemented Interfaces:
UnixTerminalSizeQuerier
Using this terminal size provider, your terminal will be set to a fixed size and will never receive any resize
events. Of course if the physical terminal is resized, in reality it will have a different size, but the application
won't know about it. The size reported to the user is always the size attached to this object.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreating aFixedTerminalSizeProvider
set to a particular size that it will always report whenever the associatedTerminal
interface queries. -
Method Summary
Modifier and TypeMethodDescriptionChecks what the size of the terminal is, measured in number of rows and columns.
-
Field Details
-
size
-
-
Constructor Details
-
FixedTerminalSizeProvider
Creating aFixedTerminalSizeProvider
set to a particular size that it will always report whenever the associatedTerminal
interface queries.- Parameters:
size
- Size the terminal should be statically initialized to
-
-
Method Details
-
queryTerminalSize
Description copied from interface:UnixTerminalSizeQuerier
Checks what the size of the terminal is, measured in number of rows and columns. The implementer of this interface is expected to know which terminal we are querying for and have all it needs to figure out the size. One way of implementing this could be to read of an external value or variable or calling IPCs or just return a static size at all times.- Specified by:
queryTerminalSize
in interfaceUnixTerminalSizeQuerier
- Returns:
- Size of the terminal at this point in time
-