Module com.googlecode.lanterna
Package com.googlecode.lanterna.terminal
Interface IOSafeExtendedTerminal
-
- All Superinterfaces:
java.lang.AutoCloseable
,java.io.Closeable
,ExtendedTerminal
,InputProvider
,IOSafeTerminal
,Scrollable
,Terminal
- All Known Implementing Classes:
IOSafeTerminalAdapter.Extended
public interface IOSafeExtendedTerminal extends IOSafeTerminal, ExtendedTerminal
Interface extending ExtendedTerminal that removes the IOException throw clause.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deiconify()
De-iconifies the terminal, which likely means restoring it from minimized state with most window managersvoid
iconify()
Iconifies the terminal, this likely means minimizing the window with most window managersvoid
maximize()
Maximizes the terminal, so that it takes up all available spacevoid
popTitle()
Replaces the terminal title with the top element from the title stack managed by the terminal (the element is removed from the stack as expected)void
pushTitle()
Saves the current window title on a stack managed internally by the terminal.void
scrollLines(int firstLine, int lastLine, int distance)
Scroll a range of lines of this Scrollable according to given distance.void
setMouseCaptureMode(MouseCaptureMode mouseCaptureMode)
Enabled or disables capturing of mouse event.void
setTerminalSize(int columns, int rows)
Attempts to resize the terminal through dtterm extensions "CSI 8 ; rows ; columns ; t".void
setTitle(java.lang.String title)
This methods sets the title of the terminal, which is normally only visible if you are running the application in a terminal emulator in a graphical environment.void
unmaximize()
Restores the terminal back to its previous size, after having been maximized-
Methods inherited from interface com.googlecode.lanterna.terminal.IOSafeTerminal
bell, clearScreen, close, disableSGR, enableSGR, enquireTerminal, enterPrivateMode, exitPrivateMode, flush, getCursorPosition, getTerminalSize, pollInput, putCharacter, putString, readInput, resetColorAndSGR, setBackgroundColor, setCursorPosition, setCursorPosition, setCursorVisible, setForegroundColor
-
Methods inherited from interface com.googlecode.lanterna.terminal.Terminal
addResizeListener, newTextGraphics, removeResizeListener
-
-
-
-
Method Detail
-
setTerminalSize
void setTerminalSize(int columns, int rows)
Description copied from interface:ExtendedTerminal
Attempts to resize the terminal through dtterm extensions "CSI 8 ; rows ; columns ; t". This isn't widely supported, which is why the method is not exposed through the common Terminal interface.- Specified by:
setTerminalSize
in interfaceExtendedTerminal
- Parameters:
columns
- New size (columns)rows
- New size (rows)
-
setTitle
void setTitle(java.lang.String title)
Description copied from interface:ExtendedTerminal
This methods sets the title of the terminal, which is normally only visible if you are running the application in a terminal emulator in a graphical environment.- Specified by:
setTitle
in interfaceExtendedTerminal
- Parameters:
title
- Title to set on the terminal
-
pushTitle
void pushTitle()
Description copied from interface:ExtendedTerminal
Saves the current window title on a stack managed internally by the terminal.- Specified by:
pushTitle
in interfaceExtendedTerminal
-
popTitle
void popTitle()
Description copied from interface:ExtendedTerminal
Replaces the terminal title with the top element from the title stack managed by the terminal (the element is removed from the stack as expected)- Specified by:
popTitle
in interfaceExtendedTerminal
-
iconify
void iconify()
Description copied from interface:ExtendedTerminal
Iconifies the terminal, this likely means minimizing the window with most window managers- Specified by:
iconify
in interfaceExtendedTerminal
-
deiconify
void deiconify()
Description copied from interface:ExtendedTerminal
De-iconifies the terminal, which likely means restoring it from minimized state with most window managers- Specified by:
deiconify
in interfaceExtendedTerminal
-
maximize
void maximize()
Description copied from interface:ExtendedTerminal
Maximizes the terminal, so that it takes up all available space- Specified by:
maximize
in interfaceExtendedTerminal
-
unmaximize
void unmaximize()
Description copied from interface:ExtendedTerminal
Restores the terminal back to its previous size, after having been maximized- Specified by:
unmaximize
in interfaceExtendedTerminal
-
setMouseCaptureMode
void setMouseCaptureMode(MouseCaptureMode mouseCaptureMode)
Description copied from interface:ExtendedTerminal
Enabled or disables capturing of mouse event. This is not recommended to use as most users are not familiar with the fact that terminal emulators allow capturing mouse input. You can decide which events you want to capture but be careful since different terminal emulators will support these modes differently. Mouse capture mode will be automatically disabled when the application exits through a shutdown hook.- Specified by:
setMouseCaptureMode
in interfaceExtendedTerminal
- Parameters:
mouseCaptureMode
- Which mouse events to capture, pass innull
to disable mouse input capturing
-
scrollLines
void scrollLines(int firstLine, int lastLine, int distance)
Description copied from interface:Scrollable
Scroll a range of lines of this Scrollable according to given distance. If scroll-range is empty (firstLine > lastLine || distance == 0) then this method does nothing. Lines that are scrolled away from are cleared. If absolute value of distance is equal or greater than number of lines in range, then all lines within the range will be cleared.- Specified by:
scrollLines
in interfaceScrollable
- Parameters:
firstLine
- first line of the range to be scrolled (top line is 0)lastLine
- last (inclusive) line of the range to be scrolleddistance
- if > 0: move lines up, else if < 0: move lines down.
-
-