Class TerminalSupport
java.lang.Object
jline.TerminalSupport
- All Implemented Interfaces:
Terminal
- Direct Known Subclasses:
OSvTerminal, UnixTerminal, UnsupportedTerminal, WindowsTerminal
Provides support for
Terminal instances.- Since:
- 2.0
- Author:
- Jason Dillon
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintintgetWidth()booleanDefaults to true which was the behaviour before this method was added.voidinit()booleanbooleanfinal booleanvoidreset()voidrestore()protected voidsetAnsiSupported(boolean supported) voidsetEchoEnabled(boolean enabled) When using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.Subclass to change behavior if needed.
-
Field Details
-
DEFAULT_WIDTH
public static final int DEFAULT_WIDTH- See Also:
-
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHT- See Also:
-
-
Constructor Details
-
TerminalSupport
protected TerminalSupport(boolean supported)
-
-
Method Details
-
init
-
restore
-
reset
-
isSupported
public final boolean isSupported()- Specified by:
isSupportedin interfaceTerminal
-
isAnsiSupported
public boolean isAnsiSupported()- Specified by:
isAnsiSupportedin interfaceTerminal
-
setAnsiSupported
protected void setAnsiSupported(boolean supported) -
wrapOutIfNeeded
Subclass to change behavior if needed.- Specified by:
wrapOutIfNeededin interfaceTerminal- Returns:
- the passed out
-
hasWeirdWrap
public boolean hasWeirdWrap()Defaults to true which was the behaviour before this method was added.- Specified by:
hasWeirdWrapin interfaceTerminal
-
getWidth
-
getHeight
-
isEchoEnabled
public boolean isEchoEnabled()- Specified by:
isEchoEnabledin interfaceTerminal
-
setEchoEnabled
public void setEchoEnabled(boolean enabled) - Specified by:
setEchoEnabledin interfaceTerminal
-
disableInterruptCharacter
public void disableInterruptCharacter()- Specified by:
disableInterruptCharacterin interfaceTerminal
-
enableInterruptCharacter
public void enableInterruptCharacter()- Specified by:
enableInterruptCharacterin interfaceTerminal
-
wrapInIfNeeded
Description copied from interface:TerminalWhen using native support, return the InputStream to use for reading characters else return the input stream passed as a parameter.- Specified by:
wrapInIfNeededin interfaceTerminal- Throws:
IOException
-
getOutputEncoding
- Specified by:
getOutputEncodingin interfaceTerminal
-